Hi David,

David Weintraub wrote at Donnerstag, 25. Juni 2009 17:34:

>> 1/ A POM is not a programming language, but a project description. It is
>> pointless to define the properties section in the top of the file in the
>> hope that Maven sees the values first before you use them. You can
>> call "mvn help:effective-pom" to see what Maven actually uses for the
>> project description in the end.
> 
> It could be that I simply don't understand how to do something. We
> have a continuous build system, and label each of our builds with a
> build number. We like that build number to part of the maven artifact
> itself. For example, aim-2.1.2-D-32-bin.tar.gz where 2.1.2-D-32 is our
> build number.
> 
> However, there is no need to put these builds into our Maven
> repository since our continuous build system makes them available and
> manages them. Otherwise, I would have to do a constant purge our our
> Maven repository since we can do 10 to 20 builds each day.
> 
> This is why I have the product's version as a property. I can pass it
> into the pom when a build is done. At the same time, I need to allow
> developers to run the builds themselves, and not have
> aim-${aim.version}-bin.tar.gz as the name of the maven artifact. In
> order to avoid this, I put the property inside of the POM. I could put
> this anywhere directly under the <project/>, but putting it at top
> allows the developers to easily find it when they do want to change
> the default (such as when we start work on version 2.1.3).
> 
> So, what is the correct way to set my projects in order to be able to
> have a default version number, yet allow me to override it on the
> command line?

At least I can now understand why you try to do this and that you actually
understood, that declaring the property right in the top does not change
anything.

However, with using a property for the parent's version you're more or less
building on undefined Maven behavior. Main reason is that Maven has to
resolve the parent before it can generate the resulting project model.

Did you had a look at the buildnumber plugin instead? It might help you in
this case.

> That also doesn't cover my other problem: I am using
> net.sf.maven-har:maven-har-plugin which requires me to have my service
> file called jboss-service.xml living in the resource's META-INF
> directory. Unfortunately, our service file is called
> hibernate-service.xml.
> 
> Is it possible to somehow redefine the name of this file in your
> pom.xml? If I was writing this code from scratch, I would simply use
> the default name. But, I have to make sure that the structure of my
> Maven artifact matches the output of our current build artifact.
> 
> Where can I at least find documentation on this plugin? I got the
> basic POM structure by doing a mvn archetype:generate and requesting a
> har project.

This plugin is obviously developed by an independent project at SourceForge,
you will have to ask the developers there.

- Jörg

> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to