You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marcos <ma...@softingsystems.com.br> on 2007/05/28 16:04:37 UTC

How to "hook" into the package goal

Hi all :-)

I've been using Maven to build my application and it's structured in the 
following way.:
- 12 modules (01 of these has the class with the main entry point)
- Each module has its own pom.xml file

Ok what I want is something similar to JBoss directory structure ... for 
example, when I
run "mvn package" on my main module (the module that has the main class) 
I get the full
application built at 
${app.home}/target/executable-netbeans/my-app-1.0.0.jar and at
the same level I have a lib directory with all dependencies.:

       ${app.home}/target/executable-netbeans/my-app-1.0.0.jar
       ${app.home}/target/executable-netbeans/lib
                                                                         
/dependency1.jar
                                                                         
/dependency2.jar ....

What I really want is to have a directory structure "similar" to the 
JBoss AS structure,
I mean something like.:

       bin/run.bat     //Application's launcher script
       bin/run.jar
       lib/*.jar         // Application's libraries

So I was trying to figure out how to "hook" into the goal "package" so I 
could copy the
necessary files/dependencies to where I really want then ....
Is this the right approach ?

Thank you very much

-- 
Marcos H. W.
Softing Systems
Systems Analyst
+55 11 38770360

/** 
 * @see https://jaxb2-commons.dev.java.net
 */

/**
 * "...Use the Force ...;-)" */
 *
 * @see http://www.gentoo.org/
 */



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


Re: How to "hook" into the package goal

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
 Hi Marcos,

Check out the assembly plugin (see [1]), which should be able to help
you with you what you want.

Cheers,

Johan

[1] http://maven.apache.org/plugins/maven-assembly-plugin/

Marcos wrote:
> Hi all :-)
> 
> I've been using Maven to build my application and it's structured in the
> following way.:
> - 12 modules (01 of these has the class with the main entry point)
> - Each module has its own pom.xml file
> 
> Ok what I want is something similar to JBoss directory structure ... for
> example, when I
> run "mvn package" on my main module (the module that has the main class)
> I get the full
> application built at
> ${app.home}/target/executable-netbeans/my-app-1.0.0.jar and at
> the same level I have a lib directory with all dependencies.:
> 
>       ${app.home}/target/executable-netbeans/my-app-1.0.0.jar
>       ${app.home}/target/executable-netbeans/lib
>                                                                        
> /dependency1.jar
>                                                                        
> /dependency2.jar ....
> 
> What I really want is to have a directory structure "similar" to the
> JBoss AS structure,
> I mean something like.:
> 
>       bin/run.bat     //Application's launcher script
>       bin/run.jar
>       lib/*.jar         // Application's libraries
> 
> So I was trying to figure out how to "hook" into the goal "package" so I
> could copy the
> necessary files/dependencies to where I really want then ....
> Is this the right approach ?
> 
> Thank you very much
> 

-- 
you too?

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