`
Blackbaby
  • 浏览: 186463 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Ant with Maven environment

    博客分类:
  • java
阅读更多
<?xml version="1.0" encoding="UTF-8"?>   
<project name="elitemark-commons" default="build"   xmlns:artifact="urn:maven-artifact-ant">   
    <description>Ant with Maven</description>   
    <property file="build.properties" />   
    <target name="init">
        <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.1.jar" />
        <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
	       uri="urn:maven-artifact-ant"
                       classpathref="maven-ant-tasks.classpath" />
        <artifact:pom id="maven.project" file="pom.xml" />
        <property name="project.root" value="${maven.project.build.sourceDirectory}" />
        <property name="project.root" value="${maven.project.build.outputDirectory}" />
        <property name="project.root" value="${basedir}" />
        <echo>Maven build version is ${maven.project.artifactId}</echo>  
        <echo>Maven build version is ${maven.project.version}</echo>  
        <echo>Maven build directory is ${maven.project.build.directory}</echo>  
        <echo>Maven build finalName is ${maven.project.build.finalName}</echo>  
        <echo>Maven build sourceDirectory directory is ${maven.project.build.sourceDirectory}</echo>  
        <echo>Maven build outputDirectory directory is ${maven.project.build.outputDirectory}</echo>  
        <echo>Maven build scriptSourceDirectory directory is ${maven.project.build.testSourceDirectory}</echo>  
        <echo>Maven build testOutputDirectory directory is ${maven.project.build.testOutputDirectory}</echo>  
        <echo>Maven build scriptSourceDirectory directory is ${maven.project.build.scriptSourceDirectory}</echo>  
        <echo>Maven build resourceDirectory directory is ${maven.project.build.resources}</echo>  
        <artifact:dependencies pathId="maven.runtime" filesetid="maven.fileset.runtime" useScope="runtime">
        	<pom refid="maven.project" />
        </artifact:dependencies>
        <artifact:dependencies pathId="maven.classpath" filesetid="maven.fileset">
  	<pom refid="maven.project" />
        </artifact:dependencies>
    </target>
    <target name="compile" depends="init">
        <mkdir dir="${build.classes}" />
        <javac srcdir="${src}" destdir="${build.classes}" classpathref="maven.classpath" includeantruntime="on"/>
    </target>
    <target name="build" depends="clean,compile"/>   
</project>

 

分享到:
评论

相关推荐

    Maven-The Complete Reference.pdf

    Gradle, on the other hand, combines the flexibility of Ant with some of the automation features of Maven, using a Groovy-based DSL instead of XML. **1.7 Comparing Maven with Ant** Ant is another ...

    Gradle in Action

    It extends the usage patterns established by its forerunners, Ant and Maven, and allows builds that are expressive, maintainable, and easy to understand. Using a flexible Groovy-based DSL, Gradle ...

    jeecg-boot环境搭建

    1. Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 7.x:解决方法:npm rebuild node-sass 2. ERROR ...

    spring-boot-reference.pdf

    13.4. Ant 13.5. Starters 14. Structuring Your Code 14.1. Using the “default” Package 14.2. Locating the Main Application Class 15. Configuration Classes 15.1. Importing Additional Configuration ...

    drools-distribution-7.10.0.Final

    It contains information how to use it on your project (with Maven, ANT, ...). Sources ------- The source jars are in the sources directory. But to build from sources, pull the sources with git: ...

    groovy_in_action_draft_ch_01.pdf

    This plugin includes advanced features like code analysis, refactoring tools, and integration with Gradle and Maven build systems. **1.6.2 Eclipse Plugin** The Eclipse IDE also provides Groovy ...

Global site tag (gtag.js) - Google Analytics