I'm running into a problem with performing a local publish:
Currently using Ivy 2.2.x-local-20100609212354
Resolver used for local publishing.
<filesystem name="local" local="true">
<ivy
pattern="${dest.repo.dir}/[organisation]/[module]/[revision]/ivy-[revision].xml"
/>
<artifact
pattern="${dest.repo.dir}/[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].[ext]"
/>
<!-- <artifact
pattern="${dest.repo.dir}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
/> -->
</filesystem>
This works:
<ivy:publish artifactspattern="${dist.dir}/[artifact]-[revision].[ext]"
conf="*(public)"
pubrevision="${project.version.main}"
resolver="local"
status="integration"
forcedeliver="true"
/>
:: delivering :: org.my#my-module#trunk;work...@my-build-machine :: 1.0.1 ::
integration :: Mon Oct 18 17:14:11 IST 2010
delivering ivy file to
/build/user/me/my/module/dir/trunk/dist/ivy-1.0.1.xml
:: publishing :: org.my#my-module
published my-module to
/home/me/.ivyrepo/org.my/my-module/1.0.1.part/jars/my-module-1.0.1.jar
published ivy to
/home/me/.ivyrepo/org.my/my-module/1.0.1.part/ivy-1.0.1.xml
publish commited: moved /home/me/.ivyrepo/org.my/my-module/1.0.1.part
to /home/me/.ivyrepo/org.my/my-module/1.0.1
This doesn't:
<ivy:publish artifactspattern="${dist.dir}/[artifact]-[revision].[ext]"
conf="*(public)"
revision="${project.version.main}"
pubrevision="${project.version.full}"
resolver="local"
status="integration"
forcedeliver="true"
/>
BUILD FAILED
[ivy:publish] :: delivering :: org.my#my-module#trunk;1.0.1 :: 1.0.1-1 ::
integration :: Mon Oct 18 17:48:14 IST 2010
/build/user/me/my/module/dir/trunk/build.xml:162: org.my#my-module#trunk;1.0.1:
java.lang.IllegalStateException: ivy file not found in cache for
org.my#my-module#trunk;1.0.1: please resolve dependencies before delivering
(/home/me/.ivy2/cache/resolved-org.my-my-module-1.0.1.xml)
at
org.apache.ivy.core.deliver.DeliverEngine.deliver(DeliverEngine.java:112)
at org.apache.ivy.Ivy.deliver(Ivy.java:586)
Property values used for versions:
project.version.main = 1.0.1
project.version.full = 1.0.1-1
The jar file built looks like ${dist.dir}/my-module-1.0.1.jar but I would like
the ability to publish it as my-module-1.0.1-1.jar in certain cases.
For local publishes I don't care so much about being able to add extra version
information to identify minor changes i.e. the "-1" part. But it will be useful
once I add publishing to a shared repo for automated builds, so I'd like to
understand whether it is possible. I assumed from reading the doc reference
with the different options revision & pubrevision it would be, but not so sure
now.
Tested with the latest 2.2.0 release version as well and same problem exists.
I'm sure I'm missing something, I just don't know what.
--
Regards,
Darragh Bailey