Mauro Talevi wrote:

Ben Walding wrote:

Here's how you go about answering this question for yourself!

thanks for the info below!  quite useful for a newcomer to maven.

4. Unfortunately the plugin only puts LICENSE.txt into META-INF, so you're going to have to raise a feature request and include a patch (well we can all dream!)
<metainf dir="${basedir}">
<include name="LICENSE.txt"/>
<your paths go here.../>
</metainf>

do you mean to say that you *only* need to change plugin.jelly?
say, changing it to something like:
<metainf dir="${basedir}"
includes="${maven.jar.metainf.includes}"
excludes="${maven.jar.metainf.excludes}">
<include name="LICENSE.txt"/>
</metainf>
where the properties are defined in one of the properties files?

I've tried this and it doesn't work. Do the properties need to be initialised somewhere?
Properties from your project.properties (I didn't try anywhere else) file will get imported automatically (I just checked against CVS HEAD).

I'd add an <echo>${maven.jar.metainf.includes}</echo> before the jar target to see if the variables are making it in there.
I have unconfirmed suspicion that the ant task might be doing something you don't expect here (I could be completely wrong). I.e. something like the license.txt line overriding the others or similar. Try hardwiring the whole thing and seeing it works.



BTW, is there a way of setting a property *local* to a goal or a task,
rather than in properties files?
Not sure what you mean? The process.of.using.dots.helps show the scope of the property, although it doesn't enforce it.


5. To add extra bits to your jar, take a look at java:jar-resources or if that is too primitive, write a preGoal for java:jar that copies
the appropriate files into ${maven.build.dest} - copy the general concept from java:jar-resources. Essentially the POM build/resources element determines what ends up in the jar.

will look into this.

If you want to "hack" your plugin to make it work for you / experiment... edit $MAVEN_HOME/plugins/<plugin>/plugin.jelly (this will be overwritten during bootstrap, so it is only useful for quick hacks in testing).

sorry - don't follow you. what do you mean by bootstrap here?
Bootstrapping is when you check out all the code from CVS and do a build using ant
eg
ant -f build-bootstrap.xml
It will compile and install maven for you.


you mean when I execute maven? then how are the changes going to show up?


Then when you're satisfied with your changes, submit patches back to the maven developer list.

will do if I get it working :-)

Thanks, Mauro



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




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

Reply via email to