Actually i try to publish some self-created jars to our ivy repository.
Anything works fine if i use the following settings for the local resolver:
<filesystem name="local">
<ivy
pattern="${ivy.settings.dir}/[organisation]/[module]/[module]_[revision].xml" />
<artifact
pattern="${ivy.settings.dir}/[organisation]/[module]/[module]_[revision].[ext]"
/>
</filesystem>
And the following build.xml publish task:
<ivy:info file="${project.home}/ivy.xml" settingsRef="bportal.ivy"/>
<property file="${project.name}/trunk/build.properties"/>
<property name="ivy.bundle" value="${project.version}"/>
<ivy:buildnumber resolver="local" settingsRef="bportal.ivy"
organisation="${ivy.organisation}"
module="${ivy.module}"
revision="${project.version}" defaultBuildnumber="1"/>
<ivy:resolve settingsRef="bportal.ivy"/>
<ivy:publish resolver="local"
pubrevision="${project.version}_build${ivy.new.build.number}" overwrite="false">
<artifacts
pattern="${project.home}/bin/${ivy.module}_${project.version}.[ext]"/>
</ivy:publish>
<echo message="Published in Ivy-Repository:
${ivy.module}_${project.version}_build${ivy.new.build.number}"/>
On each publish a new jar file is published with a new incremented buildnumber.
Now I've to add a subfolder to separate those published files by revision
number, but without the buildnumber extension. By this reason i could not use
the [revision] tag in the resolver to separate those files, while it's
overwritten with the buildnumber postfix.
So i tried to set up an ivy property ivy.bundle before the publish starts with
the origin revisison number. The definition of this property works fine and i
could access it in my resolver. But now the trouble starts:
If i use this property to extend the pattern to:
<filesystem name="local">
<ivy
pattern="${ivy.settings.dir}/[organisation]/[module]/${ivy.bundle}/[module]_[revision].xml"
/>
<artifact
pattern="${ivy.settings.dir}/[organisation]/[module]/${ivy.bundle}/[module]_[revision].[ext]"
/>
</filesystem>
Any publish fails while the buildnumber is not incremented anymore, the
returned new build number is always 1 (default value). And i got the following
error message:
C:\iPAD_SDE\CruiseControl_2.8.2\projects\build.xml:131: impossible to publish
artifacts for bportal#ena.ejb;working@vwagwocob02x: java.io.IOException: file
copy not done from
C:\iPAD_SDE\CruiseControl_2.8.2\projects\ena.ejb\trunk\bin\ena.ejb_1.3.0.jar to
X:\iPAD_SDE_Updates\ivy-repo\bportal\ena.ejb\1.3.0\ena.ejb_1.3.0_build1.jar:
destination already exists and overwrite is false
If i replace the ${ivy.bundle} property from the resolver with hard text (i.e.
1.3.0) or an ivy extra attribute defined in the ivy module anything is working
fine again and the buildnumber is incremented on each publish. The ivy extra
attribute is not an option, while I've to change the ivy.xml file anytime I've
got a new revision.
I have no idea what is the difference between using hard text and ivy
properties in the resolver to determine the correct buildnumber ...
Any suggestion? I would be greatful for any help.
Best regards,
Christian Heine
T-Systems on site services GmbH
Procurement Systems
Telefon/phone: +49-5361-9-78564
E-Mail: [email protected]
--------------------------------------------------------------------------------
Christian Heine
Consultant
Alessandro-Volta-Straße 11, 38440 Wolfsburg
+49-5361-464 78-x (Tel.)
+49-5361-464 78-10 (Fax)
E-Mail: [email protected]
Internet: http://www.t-systems-onsite.de
Geschäftsführung: Stefan Kappe, Georg Rätker
Handelsregister: Amtsgericht Berlin HRB 51336
Sitz der Gesellschaft: Berlin
Ust.-Id Nr. DE 181 120 485
--------------------------------------------------------------------------------
Notice: This transmittal and/or attachments may be privileged or confidential.
If you are not the intended recipient, you are hereby notified that you have
received this transmittal in error; any review, dissemination, or copying is
strictly prohibited. If you received this transmittal in error, please notify
us immediately by reply and immediately delete this message and all its
attachments. Thank you.