the difference is that version has to be evaluated prior to any lifecycle phase or plugin execution

if you define a property in your pom it is available when constructing the model

the buildnumber plugin is attached to the first phase and the property is defined at that point, but by then version had been defined and you are stuck

Sent from my iPod

On 5 Sep 2008, at 17:54, Matthias Grunwalde <[EMAIL PROTECTED]> wrote:


Wayne, you state that the groupId, artifactId and version are always used
when publishing to a repo, so I tried specifying ${buildNumber} as the
version, as in
<version>${buildNumber}</version>

However, this didn't get interpolated correctly, leading to an artifact in
my repo called ArtifactId-${buildNumber}.

If I do the same using a "normal" property, as in:
<version>${my.property}</version>
...
<properties>
  <my.property>111</my.property>
</properties>

Then I get an ArtifactId-111 in my repo.

Does this seem like a bug in the build number plugin, that it isn't
interpolating correctly, or that the ${buildNumber} is a kind of property that doesn't get interpolated when specified in a <version>...</ version>
section?

Is this the same problem as
http://jira.codehaus.org/browse/MOJO-909
?

Kind regards,
Matthias.



Wayne Fay wrote:

Sorry, I didn't intend to mislead you. I was only trying to address
part of your question, the "how do I get buildnumber to put its number
in my artifact's name during the build" part, not the "how do I get
that artifact installed with that same name" which, as Wendy says, is
not possible.

Artifacts always go into the local repo cache using the groupId,
artifactId, and version you have declared in the pom -- it completely
ignores the finalName.

finalName is only useful for changing the name of a war/ear and then
pulling it out of /target to use it for something else directly.

Wayne


--
View this message in context: 
http://www.nabble.com/problem-using-the-buildnumber-plugin-with-maven-tp17077968p19335391.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to