You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Scot P. Floess" <sf...@nc.rr.com> on 2008/11/11 18:49:10 UTC

Jar file containing java source being copied - not the jar with class files

I just moved up to Ivy 2.0 RC2 from 2.0 beta 2

I see  down in my ~/.ivy directory there is the appropriate sources and 
jars directory:  in this case 
~/.ivy2/cache/ant-contrib/ant-contrib/sources/ant-contrib-1.0b2-sources.jar
and
~/.ivy2/cache/ant-contrib/ant-contrib/jars/ant-contrib-1.0b2.jar

My ivy line follows:

<ivy:retrieve  pattern = "${keros.dependency.HOME}/[artifact].[ext]"  file 
= "${keros.ant.HOME}/ivy.xml"/>

And my ivy.xml file is:

<ivy-module  version = "2.0">
     <info  organisation = "Keros"  module = "main"/>
     <dependencies>
         <dependency  org = "ant-contrib"          name = "ant-contrib" 
rev = "1.0b2"/>

         <dependency  org = "bsf"                  name = "bsf" 
rev = "2.4.0"/>
         <dependency  org = "bsh"                  name = "bsh" 
rev = "2.0b4"/>

         <dependency  org = "findbugs"             name = "findbugs" 
rev = "1.0.0"/>

         <dependency  org = "org.codehaus.castor"  name = "castor" 
rev = "1.2"/>
         <dependency  org = "org.codehaus.castor"  name = "castor-anttasks" 
rev = "1.2"/>
         <dependency  org = "org.codehaus.castor"  name = 
"castor-codegen-anttask"  rev = "1.1-M3"/>
         <dependency  org = "org.codehaus.castor"  name = "castor-xml" 
rev = "1.3rc1"/>
         <dependency  org = "org.codehaus.castor"  name = 
"castor-xml-schema"       rev = "1.3rc1"/>
     </dependencies>
</ivy-module>

I've looked through the retrieve documentation and do not see anything 
that would lead me to believe I need to use a special attribute to denote 
"copy the jar containing class files instead of java files."

Have I missed something?  When I was using 2.0 beta2 everything seemed to 
download and copy correctly.  I went so far as to delete both ~/.ivy2 and 
the directory where the jars are copied.  Help!  :)



Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

Re: Jar file containing java source being copied - not the jar with class files

Posted by "Scot P. Floess" <sf...@nc.rr.com>.
Wow - thanks a bunch.  I basically looked at that page - and did see the 
type attribute.  However didn't notice anything other than "comma 
separated list of accepted artifact types since 1.4"

Anyway, that fixed my problem.

By chance, have you used Find Bugs in conjunction with Ivy?  i;ve 
encountered some issues (getting java.lang.NoClassDefFoundError: 
org/dom4j/DocumentException).  I googled and it seems there is an issue 
with the pom for Find Bugs...

On Tue, 11 Nov 2008, Daniel Becheanu wrote:

> You can use type attribute on ivy:retrieve
> Ex
> <ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]" type="jar"
> log="download-only"/>
>
> Look at
> http://ant.apache.org/ivy/history/trunk/use/retrieve.html for more details.
>
> Daniel
>
> On Tue, Nov 11, 2008 at 11:49 AM, Scot P. Floess <sf...@nc.rr.com> wrote:
>
>> I just moved up to Ivy 2.0 RC2 from 2.0 beta 2
>>
>> I see  down in my ~/.ivy directory there is the appropriate sources and
>> jars directory:  in this case
>> ~/.ivy2/cache/ant-contrib/ant-contrib/sources/ant-contrib-1.0b2-sources.jar
>> and
>> ~/.ivy2/cache/ant-contrib/ant-contrib/jars/ant-contrib-1.0b2.jar
>>
>> My ivy line follows:
>>
>> <ivy:retrieve  pattern = "${keros.dependency.HOME}/[artifact].[ext]"  file
>> = "${keros.ant.HOME}/ivy.xml"/>
>>
>> And my ivy.xml file is:
>>
>> <ivy-module  version = "2.0">
>>    <info  organisation = "Keros"  module = "main"/>
>>    <dependencies>
>>        <dependency  org = "ant-contrib"          name = "ant-contrib" rev =
>> "1.0b2"/>
>>
>>        <dependency  org = "bsf"                  name = "bsf" rev =
>> "2.4.0"/>
>>        <dependency  org = "bsh"                  name = "bsh" rev =
>> "2.0b4"/>
>>
>>        <dependency  org = "findbugs"             name = "findbugs" rev =
>> "1.0.0"/>
>>
>>        <dependency  org = "org.codehaus.castor"  name = "castor" rev =
>> "1.2"/>
>>        <dependency  org = "org.codehaus.castor"  name = "castor-anttasks"
>> rev = "1.2"/>
>>        <dependency  org = "org.codehaus.castor"  name =
>> "castor-codegen-anttask"  rev = "1.1-M3"/>
>>        <dependency  org = "org.codehaus.castor"  name = "castor-xml" rev =
>> "1.3rc1"/>
>>        <dependency  org = "org.codehaus.castor"  name = "castor-xml-schema"
>>       rev = "1.3rc1"/>
>>    </dependencies>
>> </ivy-module>
>>
>> I've looked through the retrieve documentation and do not see anything that
>> would lead me to believe I need to use a special attribute to denote "copy
>> the jar containing class files instead of java files."
>>
>> Have I missed something?  When I was using 2.0 beta2 everything seemed to
>> download and copy correctly.  I went so far as to delete both ~/.ivy2 and
>> the directory where the jars are copied.  Help!  :)
>>
>>
>>
>> Scot P. Floess
>> 27 Lake Royale
>> Louisburg, NC  27549
>>
>> 252-478-8087 (Home)
>> 919-754-4592 (Work)
>>
>> Chief Architect JPlate   http://sourceforge.net/projects/jplate
>> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>>
>> Architect Keros          http://sourceforge.net/projects/keros
>>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

Re: Jar file containing java source being copied - not the jar with class files

Posted by Daniel Becheanu <da...@gmail.com>.
You can use type attribute on ivy:retrieve
Ex
<ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]" type="jar"
log="download-only"/>

Look at
http://ant.apache.org/ivy/history/trunk/use/retrieve.html for more details.

Daniel

On Tue, Nov 11, 2008 at 11:49 AM, Scot P. Floess <sf...@nc.rr.com> wrote:

> I just moved up to Ivy 2.0 RC2 from 2.0 beta 2
>
> I see  down in my ~/.ivy directory there is the appropriate sources and
> jars directory:  in this case
> ~/.ivy2/cache/ant-contrib/ant-contrib/sources/ant-contrib-1.0b2-sources.jar
> and
> ~/.ivy2/cache/ant-contrib/ant-contrib/jars/ant-contrib-1.0b2.jar
>
> My ivy line follows:
>
> <ivy:retrieve  pattern = "${keros.dependency.HOME}/[artifact].[ext]"  file
> = "${keros.ant.HOME}/ivy.xml"/>
>
> And my ivy.xml file is:
>
> <ivy-module  version = "2.0">
>    <info  organisation = "Keros"  module = "main"/>
>    <dependencies>
>        <dependency  org = "ant-contrib"          name = "ant-contrib" rev =
> "1.0b2"/>
>
>        <dependency  org = "bsf"                  name = "bsf" rev =
> "2.4.0"/>
>        <dependency  org = "bsh"                  name = "bsh" rev =
> "2.0b4"/>
>
>        <dependency  org = "findbugs"             name = "findbugs" rev =
> "1.0.0"/>
>
>        <dependency  org = "org.codehaus.castor"  name = "castor" rev =
> "1.2"/>
>        <dependency  org = "org.codehaus.castor"  name = "castor-anttasks"
> rev = "1.2"/>
>        <dependency  org = "org.codehaus.castor"  name =
> "castor-codegen-anttask"  rev = "1.1-M3"/>
>        <dependency  org = "org.codehaus.castor"  name = "castor-xml" rev =
> "1.3rc1"/>
>        <dependency  org = "org.codehaus.castor"  name = "castor-xml-schema"
>       rev = "1.3rc1"/>
>    </dependencies>
> </ivy-module>
>
> I've looked through the retrieve documentation and do not see anything that
> would lead me to believe I need to use a special attribute to denote "copy
> the jar containing class files instead of java files."
>
> Have I missed something?  When I was using 2.0 beta2 everything seemed to
> download and copy correctly.  I went so far as to delete both ~/.ivy2 and
> the directory where the jars are copied.  Help!  :)
>
>
>
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>
> Architect Keros          http://sourceforge.net/projects/keros
>