On 4/26/07, jeff <[EMAIL PROTECTED]> wrote:
i did try this, and it results in the two JARs being published to the same 
artifact ... the latter simply overwrites the former ... for examples ...

[ivy:publish] :: publishing :: [ com.sun.portal | admin ]
[ivy:publish]   published ps_util to 
/home/jtb/src/ps.trunk/admin/../dependencies/private-repository/com.sun.portal/admin/7.2/admin-7.2.jar
[ivy:publish]   published admin_common to 
/home/jtb/src/ps.trunk/admin/../dependencies/private-repository/com.sun.portal/admin/7.2/admin-7.2.jar
[ivy:publish]   published ivy to 
/home/jtb/src/ps.trunk/admin/../dependencies/private-repository/com.sun.portal/admin/ivys/ivy-7.2.xml

two JARs, ps_util.jar and admin_common.jar. they are indeed both published, but 
to the same JAR in the repo, admin-7.2.jar. looking at that JAR, it contains 
the contents of admin_common.jar, not ps_util.jar

maybe i did not make it clear what i was trying to accomplish. i want to publish two 
artifacts, what i want is from the "admin" project, to publish two artifacts,

com.sun.portal/admin_common
com.sun.portal/util

there are different artifacts, i do NOT want a single artifact with two JARs 
(which i *think* what the example you gave is supposed to accomplish, but it 
didn't seem to work like that).

any ideas?
I don't know what you mean by a single artifact with two jars. A jar
is an artifact. Actually any file can be an artifact, as lon as it is
declared in the publication section.

So for your problem, it seems that the pattern of the resolver to
which you publish your files is malformed, resulting in two artifacts
going at the same location. Do you use the [artifact] token in your
resolver artifact pattern? If so, could you give us more insight on
your ivy settings (especially the resolver to which you publish)?

Xavier

Xavier Hanin <[EMAIL PROTECTED]> wrote: On 4/26/07, jeff  wrote:
> i did find a hack to accomplish this ... which was to create a new build file 
that just had the ant code to publish the second artifact. note from my previous 
email that i had to set ivy.dep.file in the seconard build file.

You don't need to call publish twice to do what you want, but rather
use tokens in your publication pattern:

                    organisation="com.sun.portal"
                    module="admin"
                    revision="${PS.product.version}"
                    pubdate="${pubdate}"
                    status="integration"
                    overwrite="true"
       >



HTH,

Xavier
>
> i needed to publish the secondary artifact in a separate ant file, i am 
guessing because once the primary ivy.xml is loaded, i could not overwrite the 
variables setup by it to point to the primary artifact.
>
> is there some better way to accomplish this?
>
> jeff  wrote: i have one project (one build.xml), that generates multiple JARs 
that i wish to publish. i can't find the right approach to this.
>
> i've tried too many permutations to list here, but this is the latest i have 
tried ...
>
> my two artifacts ...
>
>
>
>
>
>
>
> and ...
>
>
>                      organisation="com.sun.portal"
>                      module="admin"
>                      revision="${PS.product.version}"
>                      pubdate="${pubdate}"
>                      status="integration"
>                      overwrite="true"
>         >
>
>
>
>
> thus publishes both of the JARs, but both as the same name, admin-7.2.jar, so 
one overwrites the other.
>
> any ideas?
>
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
>  Check outnew cars at Yahoo! Autos.
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
>  Check outnew cars at Yahoo! Autos.


--
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/



---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


--
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Reply via email to