How to convert build.xml to maven pom.xml file?

How to convert build.xml to maven pom file?

  • I have portlet project which runs using build.xml. I want to shift to maven based build management. How can i map build.xml to pom.xml? How can i write goal for every target in build.xml? Whether it is good to use maven maven-antrun-plugin-1.6 for running ant tasks from pom.xml or not? How can i put jars from build path to repository? Thanks, Bhupendra K.

  • Answer:

    Simply not. cause Maven has a http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html You have to understand that Maven has a http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html and that is your plan. You must forget the Ant Targets. The lifecycle has for example test-compile (compile the unit tests) and compile (compiling your production code. And further steps are running the unit tests and finally packaging your production code into a jar file. It's not a good idea to use maven-antrun-plugin (only in very very very very rare cases). Via mvn release:prepare release:perform or via mvn deploy (for SNAPSHOT's) I recommend to read http://sonatype.com/Support/Books in particular Maven by Example and Maven: The Complete Reference If you working in a company you should think hard about setting up a repository manager (for example Nexus or Archiva etc.).

user89749 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.