Does anyone have an *end-to-end* example (with files you can send or attach)
that will allow me to create a single jar with all dependencies using maven?

In the end I want to be able to:
  $cd dist
  $java -jar patch-main.jar

and have it run the public static void main(String[] args) method in one of
my classes in a sub module
of the project.  So therefore the super jar needs to package all dependent
jars from other modules and their dependencies.

=> 

I have module dependencies (things I have written in subdirectories that
compile to
a jar) and inside these modules they have dependencies and there are over
400 jars 
in my maven repo (many of them mine but mostly not)

What I am looking for is a *complete end-to-end* example of how to do this
and
what to type on the command line to do this so that I get an output jar in
dist/.

I have looked at the maven assembly plugin and after a day of editing XML
files
and trying things, I have absolutely nothing.

My project looks like this:
        
trunk/
        /patch/
                /dist/
                pom.xml
                /main/src/main/java/com/...
                /main/src/main/resources/
                /main/src/main/assembly/
                /main/pom.xml
                /utils/pom.xml
                /utils/src/main/java/com/...
                <module>/src/main/java/com/...
                <module>pom.xml
                        <sub-module>/src/main/java/com/...
                        <sub-module>/pom.xml
                                <sub-sub-module/src/main/java/com/...
                                <sub-sub-module/pom.xml
                                

    So there is a jar created under /patch/main/target/ under utils/target/
and 
        under each <module> and <sub-module>
        
        What I want to be able to do is cd into /patch/ and run some maven 
command
and
        end up with a single jar in the /dist/ directory that I can then do:
                java -jar patch.jar
                
                the static main method is in
/main/src/main/java/com/company/main/PatchManagerImpl.java
                
---             
        Please help, the maven assembly documemtation does not provide a clear 
cut
example
        of how to do this with modules and sub modules nor does it explain each
line in 
        the examples given.

        If anyone has the xml text that I could simply paste into 
/patch/pom.xml 
        and an assembly.xml that I can drop into place (to be put under
/src/main/assembly/assembly.xml, 
        it would be greatly appreciated.
        
        I have lost a day trying to get this to work and not sure what I am 
doing
wrong so an *end-to-end*
        example would get me going.

thank you so much


Lisa
-- 
View this message in context: 
http://www.nabble.com/Need-*end-to-end*-example-using-the-maven-assembly-plugin-tp20692137p20692137.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to