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 Barry Pape <bp...@netspend.com> on 2009/02/18 23:33:31 UTC

ivy:publish question

Hi all,

I am trying to publish multiple jars and not having any luck so far.
From what I've read it is possible, but I must be missing some part of
the correct configuration.  We have a build that produces 5 different
jar files that are depended on by other builds, so we need to publish
them to our local repository.  I'm new to ivy and this is part of my
testing so that we can decide between ivy+ant and maven.  Right now, I'm
only working with two jars to get the basic concepts/configuration in
place.  Any advice is much appreciated.

Thanks,
Barry

ivy.xml:
<ivy-module version="2.0">
    <info organisation="com.netspend" module="appname"/>
    <publications>
    	<artifact name="jarone" ext="jar"/>
    	<artifact name="jartwo" ext="jar"/>
    </publications>
    <dependencies>
        <dependency org="jboss" name="jbossall-client" rev="4.2.2.GA"/>
        <dependency org="javax.mail" name="mail" rev="1.4"/>
        <dependency org="junit" name="junit" rev="4.0"/>
        <dependency org="log4j" name="log4j" rev="1.2.14"/>
    </dependencies>
</ivy-module>

build.xml:
    <target name="ivy-repo">
	    <ivy:resolve refresh="true"/>
	    <ivy:retrieve/>
	    <ivy:publish
artifactspattern="${build.home}/lib/[artifact].[ext]" 
	    	resolver="local" pubrevision="${revision}"
		status="release"/>
    </target>

ivysettings.xml
<ivysettings>
    <settings defaultResolver="local"/>
    <resolvers>
        <chain name="local">
            <filesystem name="default">
	    	<artifact
pattern="${user.home}/.ivy2/cache/[organisation]/[module]/[artifact]-[re
vision].[ext]"/>
	    </filesystem>        
            <ibiblio name="ibiblio" m2compatible="true"/>
            <ibiblio name="java-net-maven1"
root="http://download.java.net/maven/1" m2compatible="false"/>
	    <ibiblio name="java-net-maven2"
root="http://download.java.net/maven/2" m2compatible="true"/>
	    <url name="http://repository.jboss.org/maven2/jboss"/>
        </chain>
    </resolvers>
</ivysettings>



-----------------------------------------
Confidentiality Notice!
This electronic transmission and any attached documents or other
writings are confidential and are for the sole use of the intended
recipient(s) identified above. This message may contain information
that is privileged, confidential or otherwise protected from
disclosure under applicable law. If the receiver of this
information is not the intended recipient, or the employee, or
agent responsible for delivering the information to the intended
recipient, you are hereby notified that any use, reading,
dissemination, distribution, copying or storage of this information
is strictly prohibited. If you have received this information in
error, please notify the sender by return email and delete the
electronic transmission, including all attachments from your
system.

RE: ivy:publish question

Posted by Barry Pape <bp...@netspend.com>.
Bah! With all my goofing there was an old ivy.xml file in my
${build.home}/lib dir which only contained the reference to "jartwo".
Cleaning that file out and rebuilding did the trick.

Thanks for reading along with me :)

-----Original Message-----
From: Barry Pape [mailto:bpape@netspend.com] 
Sent: Wednesday, February 18, 2009 5:31 PM
To: ivy-user@ant.apache.org
Subject: RE: ivy:publish question

Well shoot, since I've been tinkering with it, I'm not able to get it
back to the error message I was receiving.  Now, it will publish
"jartwo" but not "jarone".

[ivy:publish] :: publishing :: com.netspend#appname
[ivy:publish]   published jartwo to C:\Documents and
Settings\bpape/.ivy2/cache/
com.netspend/jartwo/jartwo-1.0.jar
[ivy:publish]   published ivy to C:\Documents and
Settings\bpape/.ivy2/cache/com
.netspend/jartwo/ivy-1.0.xml

BUILD SUCCESSFUL
Total time: 9 seconds



-----Original Message-----
From: Maarten Coene [mailto:maarten_coene@yahoo.com] 
Sent: Wednesday, February 18, 2009 4:46 PM
To: ivy-user@ant.apache.org
Subject: Re: ivy:publish question

Could you also tell us what's going wrong?
Do you get an error?

Maarten



----- Original Message ----
From: Barry Pape <bp...@netspend.com>
To: ivy-user@ant.apache.org
Sent: Wednesday, February 18, 2009 11:33:31 PM
Subject: ivy:publish question

Hi all,

I am trying to publish multiple jars and not having any luck so far.
>From what I've read it is possible, but I must be missing some part of
the correct configuration.  We have a build that produces 5 different
jar files that are depended on by other builds, so we need to publish
them to our local repository.  I'm new to ivy and this is part of my
testing so that we can decide between ivy+ant and maven.  Right now, I'm
only working with two jars to get the basic concepts/configuration in
place.  Any advice is much appreciated.

Thanks,
Barry

ivy.xml:
<ivy-module version="2.0">
    <info organisation="com.netspend" module="appname"/>
    <publications>
        <artifact name="jarone" ext="jar"/>
        <artifact name="jartwo" ext="jar"/>
    </publications>
    <dependencies>
        <dependency org="jboss" name="jbossall-client" rev="4.2.2.GA"/>
        <dependency org="javax.mail" name="mail" rev="1.4"/>
        <dependency org="junit" name="junit" rev="4.0"/>
        <dependency org="log4j" name="log4j" rev="1.2.14"/>
    </dependencies>
</ivy-module>

build.xml:
    <target name="ivy-repo">
        <ivy:resolve refresh="true"/>
        <ivy:retrieve/>
        <ivy:publish
artifactspattern="${build.home}/lib/[artifact].[ext]" 
            resolver="local" pubrevision="${revision}"
        status="release"/>
    </target>

ivysettings.xml
<ivysettings>
    <settings defaultResolver="local"/>
    <resolvers>
        <chain name="local">
            <filesystem name="default">
            <artifact
pattern="${user.home}/.ivy2/cache/[organisation]/[module]/[artifact]-[re
vision].[ext]"/>
        </filesystem>        
            <ibiblio name="ibiblio" m2compatible="true"/>
            <ibiblio name="java-net-maven1"
root="http://download.java.net/maven/1" m2compatible="false"/>
        <ibiblio name="java-net-maven2"
root="http://download.java.net/maven/2" m2compatible="true"/>
        <url name="http://repository.jboss.org/maven2/jboss"/>
        </chain>
    </resolvers>
</ivysettings>



-----------------------------------------
Confidentiality Notice!
This electronic transmission and any attached documents or other
writings are confidential and are for the sole use of the intended
recipient(s) identified above. This message may contain information
that is privileged, confidential or otherwise protected from
disclosure under applicable law. If the receiver of this
information is not the intended recipient, or the employee, or
agent responsible for delivering the information to the intended
recipient, you are hereby notified that any use, reading,
dissemination, distribution, copying or storage of this information
is strictly prohibited. If you have received this information in
error, please notify the sender by return email and delete the
electronic transmission, including all attachments from your
system.



      

RE: ivy:publish question

Posted by Barry Pape <bp...@netspend.com>.
Well shoot, since I've been tinkering with it, I'm not able to get it
back to the error message I was receiving.  Now, it will publish
"jartwo" but not "jarone".

[ivy:publish] :: publishing :: com.netspend#appname
[ivy:publish]   published jartwo to C:\Documents and
Settings\bpape/.ivy2/cache/
com.netspend/jartwo/jartwo-1.0.jar
[ivy:publish]   published ivy to C:\Documents and
Settings\bpape/.ivy2/cache/com
.netspend/jartwo/ivy-1.0.xml

BUILD SUCCESSFUL
Total time: 9 seconds



-----Original Message-----
From: Maarten Coene [mailto:maarten_coene@yahoo.com] 
Sent: Wednesday, February 18, 2009 4:46 PM
To: ivy-user@ant.apache.org
Subject: Re: ivy:publish question

Could you also tell us what's going wrong?
Do you get an error?

Maarten



----- Original Message ----
From: Barry Pape <bp...@netspend.com>
To: ivy-user@ant.apache.org
Sent: Wednesday, February 18, 2009 11:33:31 PM
Subject: ivy:publish question

Hi all,

I am trying to publish multiple jars and not having any luck so far.
>From what I've read it is possible, but I must be missing some part of
the correct configuration.  We have a build that produces 5 different
jar files that are depended on by other builds, so we need to publish
them to our local repository.  I'm new to ivy and this is part of my
testing so that we can decide between ivy+ant and maven.  Right now, I'm
only working with two jars to get the basic concepts/configuration in
place.  Any advice is much appreciated.

Thanks,
Barry

ivy.xml:
<ivy-module version="2.0">
    <info organisation="com.netspend" module="appname"/>
    <publications>
        <artifact name="jarone" ext="jar"/>
        <artifact name="jartwo" ext="jar"/>
    </publications>
    <dependencies>
        <dependency org="jboss" name="jbossall-client" rev="4.2.2.GA"/>
        <dependency org="javax.mail" name="mail" rev="1.4"/>
        <dependency org="junit" name="junit" rev="4.0"/>
        <dependency org="log4j" name="log4j" rev="1.2.14"/>
    </dependencies>
</ivy-module>

build.xml:
    <target name="ivy-repo">
        <ivy:resolve refresh="true"/>
        <ivy:retrieve/>
        <ivy:publish
artifactspattern="${build.home}/lib/[artifact].[ext]" 
            resolver="local" pubrevision="${revision}"
        status="release"/>
    </target>

ivysettings.xml
<ivysettings>
    <settings defaultResolver="local"/>
    <resolvers>
        <chain name="local">
            <filesystem name="default">
            <artifact
pattern="${user.home}/.ivy2/cache/[organisation]/[module]/[artifact]-[re
vision].[ext]"/>
        </filesystem>        
            <ibiblio name="ibiblio" m2compatible="true"/>
            <ibiblio name="java-net-maven1"
root="http://download.java.net/maven/1" m2compatible="false"/>
        <ibiblio name="java-net-maven2"
root="http://download.java.net/maven/2" m2compatible="true"/>
        <url name="http://repository.jboss.org/maven2/jboss"/>
        </chain>
    </resolvers>
</ivysettings>



-----------------------------------------
Confidentiality Notice!
This electronic transmission and any attached documents or other
writings are confidential and are for the sole use of the intended
recipient(s) identified above. This message may contain information
that is privileged, confidential or otherwise protected from
disclosure under applicable law. If the receiver of this
information is not the intended recipient, or the employee, or
agent responsible for delivering the information to the intended
recipient, you are hereby notified that any use, reading,
dissemination, distribution, copying or storage of this information
is strictly prohibited. If you have received this information in
error, please notify the sender by return email and delete the
electronic transmission, including all attachments from your
system.



      

Re: ivy:publish question

Posted by Maarten Coene <ma...@yahoo.com>.
Could you also tell us what's going wrong?
Do you get an error?

Maarten



----- Original Message ----
From: Barry Pape <bp...@netspend.com>
To: ivy-user@ant.apache.org
Sent: Wednesday, February 18, 2009 11:33:31 PM
Subject: ivy:publish question

Hi all,

I am trying to publish multiple jars and not having any luck so far.
>From what I've read it is possible, but I must be missing some part of
the correct configuration.  We have a build that produces 5 different
jar files that are depended on by other builds, so we need to publish
them to our local repository.  I'm new to ivy and this is part of my
testing so that we can decide between ivy+ant and maven.  Right now, I'm
only working with two jars to get the basic concepts/configuration in
place.  Any advice is much appreciated.

Thanks,
Barry

ivy.xml:
<ivy-module version="2.0">
    <info organisation="com.netspend" module="appname"/>
    <publications>
        <artifact name="jarone" ext="jar"/>
        <artifact name="jartwo" ext="jar"/>
    </publications>
    <dependencies>
        <dependency org="jboss" name="jbossall-client" rev="4.2.2.GA"/>
        <dependency org="javax.mail" name="mail" rev="1.4"/>
        <dependency org="junit" name="junit" rev="4.0"/>
        <dependency org="log4j" name="log4j" rev="1.2.14"/>
    </dependencies>
</ivy-module>

build.xml:
    <target name="ivy-repo">
        <ivy:resolve refresh="true"/>
        <ivy:retrieve/>
        <ivy:publish
artifactspattern="${build.home}/lib/[artifact].[ext]" 
            resolver="local" pubrevision="${revision}"
        status="release"/>
    </target>

ivysettings.xml
<ivysettings>
    <settings defaultResolver="local"/>
    <resolvers>
        <chain name="local">
            <filesystem name="default">
            <artifact
pattern="${user.home}/.ivy2/cache/[organisation]/[module]/[artifact]-[re
vision].[ext]"/>
        </filesystem>        
            <ibiblio name="ibiblio" m2compatible="true"/>
            <ibiblio name="java-net-maven1"
root="http://download.java.net/maven/1" m2compatible="false"/>
        <ibiblio name="java-net-maven2"
root="http://download.java.net/maven/2" m2compatible="true"/>
        <url name="http://repository.jboss.org/maven2/jboss"/>
        </chain>
    </resolvers>
</ivysettings>



-----------------------------------------
Confidentiality Notice!
This electronic transmission and any attached documents or other
writings are confidential and are for the sole use of the intended
recipient(s) identified above. This message may contain information
that is privileged, confidential or otherwise protected from
disclosure under applicable law. If the receiver of this
information is not the intended recipient, or the employee, or
agent responsible for delivering the information to the intended
recipient, you are hereby notified that any use, reading,
dissemination, distribution, copying or storage of this information
is strictly prohibited. If you have received this information in
error, please notify the sender by return email and delete the
electronic transmission, including all attachments from your
system.