aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven - compile into a jar and war the same time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven - compile into a jar and war the same time" Watch "Maven - compile into a jar and war the same time" New topic
Author

Maven - compile into a jar and war the same time

Cristian Vrabie
Ranch Hand

Joined: Jul 09, 2008
Posts: 71
Hi guys! Anybody knows how i might compile a maven project both into a war and a jar the same time.

I would need this for a project in which i use GWT and the same java file will get compiled into a java class to use on server side (thus i need a jar as a dependency) and into js which needs to be overlay-ed with my project (thus the war dependency).

If you have an idea about how to handle this otherwise, please share.

Thanks, Cristian
[ October 28, 2008: Message edited by: Cristian Vrabie ]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

The Maven paradigm is one project, one object. Usually, if you want to produce 2 objects, you'd make them sub-projects of a common project.


Customer surveys are for companies who didn't pay proper attention to begin with.
Cristian Vrabie
Ranch Hand

Joined: Jul 09, 2008
Posts: 71
True. Anyway, when you try to do what i was trying to do you should know something is wrong
I managed to obtain the same effect by some war overlay configuration.

Thanks for the alarm signal.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven - compile into a jar and war the same time
 
Similar Threads
question regarding packaging utility jars
Maven target folder is empty when using Eclipse M2 plugin
Could not resolve dependencies for maven project
Jar Hell Resolution
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoade