aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Creating build using maven in eclipse 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 "Creating build using maven in eclipse" Watch "Creating build using maven in eclipse" New topic
Author

Creating build using maven in eclipse

ankit pathariya
Greenhorn

Joined: Aug 16, 2011
Posts: 10
Hi i am new to java web development i have created a simple dynamic web project in eclipse now i want to create a build file using maven.
I have installed maven plugin in eclipse but unable to create build file so please help me.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10523
    
    9

Welcome to the Ranch.

We have a dedicated forum for build tools. I will move your question there for a better response.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
ankit pathariya
Greenhorn

Joined: Aug 16, 2011
Posts: 10
thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

You need to start over from scratch and create a new project. When you create a project, choose Maven | Maven Project. Then when you get to the list of archetypes, choose one of the webapp archetypes (such as org.apache.maven.archetypes:maven-archetype-webapp). After you create the project, copy all of your sources from the old dynamic web application project over to the appropriate directories in the new Maven webapp project.

This might also be helpful: http://www.sonatype.com/Support/Books/Developing-with-Eclipse-Maven



JBoss In Action
ankit pathariya
Greenhorn

Joined: Aug 16, 2011
Posts: 10
while creating builf file getting error

Unknown lifecycle phase "HelloWorld". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>.

please help
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

You need to provide more information. Where did you specify HelloWorld as a lifecyle phase? It almost sounds as if your project is a Maven plugin project. Either that or you misconfigured a plugin within pom.xml. Knowing exactly where HelloWorld appears would help. If you are not sure, attach your pom.xml file.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Creating build using maven in eclipse