Hi Sascha,

Now I specifically need to create a few new packaging types and I didn't
find good resources on how to do that with Maven3 (I read somewhere that
one can now use Java annotations instead of Javadoc ones). I currently
have a first prototype using the Javadoc annotations and a
copied/modified version of a plexus/components.xml which should resemble
the JAR plugin instead of the packaging phase. Maybe I'm missing
something, I hoped that there would be a more unintrusive way to hook
oneself in the build-lifecycle. I for example didn't find any
components.xml for the maven-jar-plugin (or I'm looking at the wrong
places...).

Not entirely sure what you are looking for ("should resemble the JAR plugin instead of the packaging phase"). But maybe the following plexus/components.xml is useful to you: <https://bitbucket.org/scalabench/dacapo-benchmark-maven-plugin/src/3bcdb24c0c95/src/main/resources/META-INF/plexus/components.xml>

It is part of a Maven plugin I wrote to assemble so-called DaCapo benchmarks (used by JVM researchers for experiments), which are basically pimped JARs. It's just a couple of extra goals bound to various lifecycle phases: <http://www.plugins.scalabench.org/modules/dacapo-benchmark-maven-plugin/lifecycle.html>.

That being said, if you don't use the dacapo-benchmark packaging defined in plexus/components.xml, you can still bind the plugin's goals manually to lifecycle phases (that's when the @phase annotation takes effect if present).

Any pointer would be really appreciated (even pointers to source code, I
already looked into maven-jar, maven-ear and maven-war but they are all
using the "old?" Javadoc annotations

AFAIK, Java-5-style annotations are not there yet.

Hope this helps.

Andreas Sewe

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to