问题描述
您好我已经使用Ant现在我需要一个运行code项目构建是将其转换为Maven的时候,我浏览解决方案,我所做的一切只是建立一个新的Maven web项目,并补充我所有的src文件为src /主/ java和所有的XML文件(如security.xml文件,瓷砖-config.xml中,web.xml中,属性文件,JSP文件夹等)的webapp / WEB-INF /文件夹。那是正确的,到目前为止??
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 ??
主要的问题是如何创建一个POM文件,我的意思是,我用了很多罐子支持code,如何一提的是在我的POM文件..Did我不得不提到为他们每个人??
请给一个想法。
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 ..
推荐答案
我开发了一个脚本,以转变传统的ANT项目Maven的基础设施:
I developed a script to transition legacy ANT projects to a Maven infrastructure:
- ant2ivy
它侧重于产生依赖性的列表,其中插件
从Maven仓库下载。它也能够创建一个本地回购为jar文件的5-10%,可从来没有被识别(没人记得谁添加到他们的项目...)
It focuses on generating a list of dependencies, which the Apache ivy plugindownloads 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...)
这code可以适用于产生一个Maven POM,一个作品我一直在考虑。现在的问题是,它真的很难到Maven的无缝切换的方式ANT工程.... Maven有一个标准化的生命周期行为,而Ant构建脚本是自由的形式。这就解释了为什么我专注于依赖管理。
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.
这篇关于转换蚂蚁Web应用程序项目到Maven项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!