That sounds promising. I'll check on that very shortly.

I still have a couple other major issues for which I probably will need a 
custom lifecycle phase. For example, I need to to execute javadoc:javadoc and 
javadoc:jar whenever "mvn package" is run. The complexity here is that both 
need different output directories: 

javadoc:javadoc: outputDirectory = 
target/mhave/docs/apidocs/javadoc/${project.artifactId}-${project.version}

javadoc:jar: outputDirectory = target/mhave/dist

As there are no other suitable lifecycle phases, I attach both goals to the 
phase "package". However, then I'm not able to use different outputDirectories, 
as there can only be one specific plugin configuration per phase, and not per 
goal. 

To get around this, I'd like to introduce a new lifecycle phase called "docs", 
which should be run just between the phases "test" and "package". Then I would 
bind javadoc:javadoc to the phase "docs" using one plugin config and 
"javadoc:jar" would be bound to "package", using another plugin config. 

This is just an example of several similar issues I'm facing with plugin 
configs and the constraint that I can have only one plugin config per phase, 
but not per goal.

Chris  


dan tran <[EMAIL PROTECTED]> wrote: bind assembly:attach as the last execution 
in package phase, of course you need to configure your assembly descriptor.
  
 -D

 
 On 1/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: But there is no way 
for me to insert a new lifecycle phase?

Chris

Brett Porter < [EMAIL PROTECTED]> wrote: You can use the assembly plugin to do 
the distribution archive.
However, it can't be attached to the lifecycle in its current release
(a version that does is in SVN now and is being tested and 
documented).

A workaround is to run:
mvn assembly:assembly install
which will still attach the assembly and install it alongside the others.

Hope that helps.

- Brett

On 1/10/06,  [EMAIL PROTECTED]  wrote:
> I admit it, I'm now completely confused about lifecycle phases and goals and 
> packages.
>
> The first thing is that I need to create a JAR archive of my code. Ok, this 
> works fine using the standard stuff. 
>
> In a second step, I need to create a source code archive of my code. Ok, this 
> I can get working easily.
>
> In a third step, I need to create an archive of the generated Javadoc of my 
> code. Ok, this I can get working easily. 
>
> In a fourth step however, I need to be able to create a distribution for my 
> library. This distribution is a zip archive of the following content:
>
> - README.TXT (copied from src/main/packaging and filtering applied) 
> - docs/javadoc (Javadoc generated from source code, plus ideally Javadoc for 
> dependencies)
> - docs/release-notes.html (Release Notes generated using my own custom plugin)
> - docs/dependencies.html (Dependency Report generated using my own custom 
> plugin) 
> - lib (containing the JAR version of my library, but also any dependencies)
> - some other files (e.g. licenses, etc. copied from src/main/packaging, but 
> no filtering applied)
>
> I'd like to use "mvn package" to create my distribution archive, use "mvn 
> install" to install the distribution archive, the JAR archive, the source 
> code archive and the Javadoc archive in the repository. 
>
> Originally, I was planning to customize the lifecycle to add new phases to 
> it, each mapped to one or more goals. However, this doesn't seem to be 
> possible  as I wasn't able to create custom lifecycle phases. 
>
> Any idea, how to have a single POM, be able to create all those different 
> artifacts, and to be able to install them in the repository using a single 
> phase (e.g. install)?
>
> Any help is very much appreciated, as I'm at a dead end now. 
>
> Thanks
> Chris
>
>
>
>

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






 

Reply via email to