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

JAR for artifacts generated

Samaresh Gupte

Joined: Oct 03, 2009
Posts: 20
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

I would appreciate any guidance.
Thank you.

[Download folder structure.bmp] Download

Samaresh Gupte
Peter Johnson

Joined: May 14, 2008
Posts: 5852

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

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.
I agree. Here's the link:
subject: JAR for artifacts generated
It's not a secret anymore!