如何转换的pom.xml到build.xml [英] how to convert pom.xml to build.xml

查看:208
本文介绍了如何转换的pom.xml到build.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这方面的一个新的蜜蜂。

得到了在类似下面,我需要在蚂蚁buid.xml改变pom.xml中的一部分。

我该怎么办呢?我可以从教程任何帮助或任何人能解释一下

 <&依赖性GT;
    <&的groupId GT;&LT com.ask.core; /的groupId>
    <&的artifactId GT; wzlogging< / artifactId的>
    <&版GT; 1.5 LT; /版本>
    <&排除GT;
        <&排斥GT;
            <&的groupId GT;&的javax LT; /的groupId>
            <&的artifactId GT;的JavaEE-API< / artifactId的>
        < /排除>
        <&排斥GT;
            <&的groupId GT; org.glassfish.extras< /的groupId>
            <&的artifactId GT;与GlassFish嵌入所有< / artifactId的>
        < /排除>
    < /排除>
< /依赖性>


解决方案

Maven和蚂蚁有很大的不同的工具。

Ant是一个构建工具为主,这意味着它知道如何编译和打包源$ C ​​$ c和运行测试,但没有管理项目依赖的能力。蚂蚁的build.xml使用文件来定义在哪里可以找到源头code和采取哪些步骤来建立你的项目。

Maven是不仅仅是一个构建工具,更是一个项目管理工具。它可以让你在pom.xml proect定义定义依赖,以及构建,测试和分发应用程序。它还允许子项目,父项目等方面存在许多其他的功能很多插件。 Maven会自动下载的依赖关系和项目之间管理这些依赖关系。

简单地说,它是不可能的,只是一个Maven POM项目转换为Ant构建。

有替代品允许使用的二进制Maven依赖内蚂蚁构建。看一看在常春藤依赖管理获得实例。

Am a new bee in this area.

Got a part in pom.xml like below which i need to change in ant buid.xml.

How do i do it? Can i get any help from tutorial or anyone can explain what

<dependency>
    <groupId>com.ask.core</groupId>
    <artifactId>wzlogging</artifactId>
    <version>1.5</version>
    <exclusions>
        <exclusion>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.glassfish.extras</groupId>
            <artifactId>glassfish-embedded-all</artifactId>
        </exclusion>
    </exclusions>
</dependency>

解决方案

Maven and ant are very different tools.

Ant is a build tool primarily, this means it knows how to compile and package source code and run tests, but has no ability to manage project dependencies. Ant uses build.xml files to define where to find the source code and which steps to take to build your project.

Maven is more than just a build tool, it is a project management tool. It allows you to define dependencies in the pom.xml proect definition, as well build, test and distribute the application. It also allows sub projects, parent projects and there exist many plugins for many other features. Maven will automatically download the dependencies and manages these dependencies between projects.

Simply put, it is not possible to just convert a Maven POM project into an Ant build.

There are alternatives that allow binary maven dependencies to be utilized within ant builds. Have a look at the Ivy dependency manager for instance.

这篇关于如何转换的pom.xml到build.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆