> -----Original Message-----
> From: Bailey, Darragh
> Sent: 18 October 2010 17:53
> To: [email protected]
> Subject: Problem getting a publish to local filesystem working
<snipage>
> 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
By modifying the artifacts pattern and specifying a src ivy pattern I can get
it to work, but it doesn't seem like it's the best way to do this.
Substituted in the value for the following 2 properties where used to make it
clearer.
> project.version.main = 1.0.1
> project.version.full = 1.0.1-1
<ivy:publish artifactspattern="${dist.dir}/[artifact]-1.0.1.[ext]"
srcivypattern="${dist.dir}/ivy-1.0.1.xml"
conf="*(public)"
pubrevision="1.0.1-1"
resolver="local"
status="integration"
/>
Is this really the only way to publish with a different revision?
I get the feeling I had an incorrect interpretation of how the
artifactspattern, revision and pubrevision are intended to work.
I assumed that revision would set the value used for [revision] in
srcivypattern and artifactspattern, but that doesn't appear to be true.
Using the following:
<ivy:publish artifactspattern="${dist.dir}/[artifact]-1.0.1.[ext]"
srcivypattern="${dist.dir}/ivy-[revision].xml"
revision="1.0.1"
conf="*(public)"
pubrevision="1.0.1-1"
resolver="local"
status="integration"
overwrite="true"
/>
The ivy file created is dist/ivy-1.0.1-1.xml, I would have expected it to be
dist/ivy-1.0.1.xml and then to be uploaded to the repository as
dist/ivy-1.0.1-1.xml.
Certainly the documentation would suggest that this is the way it should work:
"revision the revision of the module to publish and also the published
revision unless pubrevision is set" to me sayes: the value used for the src
patterns, and also for targets if pubrevision is not set.
"pubrevision the revision to use for the publication" to me sayes: used to
publish the artifact with a different revision to what is used to locate the
file on the local filesystem.
Is my understanding incorrect?
--
Regards,
Darragh Bailey