问题
Hi I have a running code project build using Ant now what i need is to convert it to maven , i browse for the solution and what i done is simply creating a new maven web project and added all my src files to src/main/java and all the xml files (e.g security.xml,tiles-config.xml,web.xml,properties files,jsp folder etc) to webapp/web-inf/ folder. Is that correct so far ??
The main question how to create a pom file , I mean as I used a lot of jar to support the code , how to mention that in my pom file ..Did I have to mention for each one of them ?? Please give an idea ..
回答1:
I developed a script to transition legacy ANT projects to a Maven infrastructure:
- ant2ivy
It focuses on generating a list of dependencies, which the Apache ivy plugin downloads from Maven repositories. It is also able to create a local repo for those 5-10% of jar files that can never be identified (nobody remembers who added them into the project...)
This code could be adapted to generate a Maven POM, a piece of work I've been considering. The problem is that it's really hard to switch ANT projects over to Maven in a seamless manner.... Maven has a standardized set of life-cycle actions, whereas ANT build scripts are free-form. This explains why I concentrated on dependency management.
来源:https://stackoverflow.com/questions/15083245/converting-ant-web-application-project-to-maven-project