aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes JAR for artifacts generated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "JAR for artifacts generated" Watch "JAR for artifacts generated" New topic
Author

JAR for artifacts generated

Samaresh Gupte
Greenhorn

Joined: Oct 03, 2009
Posts: 20
Hello,
I have generated artifacts for a webservice using WSDL. However I am unable to package them in a jar.
I am trying to generate a jar file for all the class files of the artifacts which are under com/fmr/brokerage

Following is the code snippet.


after checking the jar using 'jar -tf mvn_edb-1.0.0-edb.jar' i get
META-INF/
META-INF/MANIFEST.MF
META-INF/maven/
META-INF/maven/com/
META-INF/maven/com/mvn_edb/
META-INF/maven/com/mvn_edb/pom.xml
META-INF/maven/com/mvn_edb/pom.properties

I would appreciate any guidance.
Thank you.


[Download folder structure.bmp] Download



Regards,
Samaresh Gupte
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Exactly where, relative to ${basedir}, is "com/fmr/brokerage"? (Oh, I see it in the screenshot you attached...)

Why are you running the jar plugin during the compile phase? What is the packaging type defined in your pom.xml? Is it war or jar?

Also, for the <includes> I would use <include>com/fmr/brokerage/**/*.class</include>. The "/target/classes" is implied (via classesDirectory property), and could actually be causing the classes to not match the include pattern (if I read the docs correctly, the include pattern is relative to classesDirectory).


JBoss In Action
Samaresh Gupte
Greenhorn

Joined: Oct 03, 2009
Posts: 20
Thank you Peter Johnson.

What you suggested worked for us.

I am creating the jar during compile phase just to check the contents of the jar generated without wasting much time
for packaging.I wont be doing so on the production.

Thanks once again.
 
wood burning stoves
 
subject: JAR for artifacts generated