This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Build a java application using Maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Build a java application using Maven" Watch "Build a java application using Maven" New topic
Author

Build a java application using Maven

Cow Yeung
Greenhorn

Joined: Oct 07, 2008
Posts: 16

I am building a software that need to use Maven for project management. The software can export a library out. Therefore, I need to use some project management library. If there is some libraries or plug-in of Maven that I can call function in java application instead of using command in DOS mode to build a project?


SCJP 5 72%
OCEJPA 6 86%
OCEEJB 6 91%
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

"Eric OX" please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
Edwin Stephens
Greenhorn

Joined: Dec 30, 2008
Posts: 15
Hi,

I think the "Maven 2 Exec Plugin" offers the capabilities that you are looking for. In summary, "The plugin provides 2 goals to make execution of system and Java programs."

The plugin's two goals are:
exec::exec - execute programs and Java programs in a separate process
exec::java - execute Java programs in the same VM

The project's homepage and documentation can be found at:
http://mojo.codehaus.org/exec-maven-plugin/

The plugin exists in the central maven repository. Links to the versions of the plugin in the central repo (including dependency information) can be found here:
http://www.jarvana.com/jarvana/search?search_type=project&project=exec-maven-plugin

Hope that helps,
Edwin
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

This isn't quite clear. Maven has its own project management library. It's one of the core features (and major advantages) of Maven.

If you're just developing a Jar that you want to go into a repository and be usable as a dependency by other Maven project(s), use the goal "mvn install". It will do the build and check a copy of the JAR and POM info into your local Maven repository.


Customer surveys are for companies who didn't pay proper attention to begin with.
Cow Yeung
Greenhorn

Joined: Oct 07, 2008
Posts: 16

Maybe it is not so clear that what do I want.

I mean the Application software can generate some folder and some files after clicking a button in the application. The file generating process is as same as Maven. However, Maven is using command on command mode and my application is using some code to control the generation process. Or, maybe I would like to find a java library that using code instead of the command.

Thanks~~
 
Consider Paul's rocket mass heater.
 
subject: Build a java application using Maven
 
Similar Threads
adding external jars to a project in eclipse
How can I get Eclipse, Maven and Glassfish work together while developing?
Maven and parallel builds
Do you need Maven if you are using an IDE
Maven target folder is empty when using Eclipse M2 plugin