From 46777e5300f162b7612a2f224f8daf7af3e2904c Mon Sep 17 00:00:00 2001 From: aheritier Date: Sat, 26 Feb 2005 23:00:28 +0000 Subject: [PATCH] Ant user can set proxy settings. New property maven.ant.compatibility if you want a script compatible with ant 1.5 (actually for proxy settings). Update copyrights Update documentations git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@155597 13f79535-47bb-0310-9956-ffa450edef68 --- ant/maven.xml | 23 ++++ ant/plugin.jelly | 7 +- ant/plugin.properties | 5 +- ant/project.properties | 7 +- ant/project.xml | 2 +- .../plugin-resources/templates/build.jelly | 70 ++++++++-- ant/src/plugin-test/maven.xml | 4 +- ant/src/plugin-test/project.xml | 2 +- ant/src/plugin-test/src/main/AClass.java | 4 +- ant/src/plugin-test/src/test/AClassTest.java | 2 +- ant/xdocs/ant-settings.xml | 128 ++++++++++++++++++ ant/xdocs/changes.xml | 8 +- ant/xdocs/goals.xml | 63 +++++---- ant/xdocs/images/asf_logo_wide_clear.gif | Bin 0 -> 6614 bytes ant/xdocs/images/maven.gif | Bin 0 -> 2578 bytes ant/xdocs/index.xml | 58 +------- ant/xdocs/navigation.xml | 17 +-- ant/xdocs/properties.xml | 47 +++---- 18 files changed, 301 insertions(+), 146 deletions(-) create mode 100644 ant/maven.xml create mode 100644 ant/xdocs/ant-settings.xml create mode 100644 ant/xdocs/images/asf_logo_wide_clear.gif create mode 100644 ant/xdocs/images/maven.gif diff --git a/ant/maven.xml b/ant/maven.xml new file mode 100644 index 00000000..aff34951 --- /dev/null +++ b/ant/maven.xml @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/ant/plugin.jelly b/ant/plugin.jelly index 0444f6fe..a1956cd7 100644 --- a/ant/plugin.jelly +++ b/ant/plugin.jelly @@ -1,7 +1,7 @@ diff --git a/ant/src/plugin-test/maven.xml b/ant/src/plugin-test/maven.xml index 90cede90..0d045905 100644 --- a/ant/src/plugin-test/maven.xml +++ b/ant/src/plugin-test/maven.xml @@ -1,6 +1,6 @@ - diff --git a/ant/src/plugin-test/project.xml b/ant/src/plugin-test/project.xml index 821a3d04..fa09f455 100644 --- a/ant/src/plugin-test/project.xml +++ b/ant/src/plugin-test/project.xml @@ -1,7 +1,7 @@ + + + Ant Settings + Arnaud Heritier + + +
+ +

When you generate the build file with maven, if the property + "maven.ant.use.properties" + is setted to true (default behaviour), the build file will load successively the properties stored in files "build.properties" located in :

+
    +
  1. the project's root directory,
  2. +
  3. the user's home directory.
  4. +
+

If this property is setted to false the generated build file doesn't load this properties, so it will help you to avoid conflicts.

+

The following properties are defined in the build files and thus can be overridden in the files described previously :

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Property nameDescriptionDefault value
defaulttargetdirThe directory where the generated files are stored${basedir}/target
libdirThe directory where are downloaded dependencies${basedir}/target/lib
classesdirThe directory where compiled classes are stored${basedir}/target/classes
testclassesdirThe directory where compiled classes for unit tests are stored (only if there are unit tests classes in your project)${basedir}/target/test-classes
testreportdirThe directory where tests reports are stored (only if there are unit tests classes in your project)${basedir}/target/test-reports
distdirThe directory where the distribution is created${basedir}/dist
javadocdirThe directory where is stored the javadoc${basedir}/dist/docs/api
final.nameThe name used for the generated jar${maven.final.name}
${dep.artifactId}.jarA property is created for each project's dependency (for example : activation.jar). This property can be used to override the default url used to download the dependency (for example : activation.jar=http://myhost/repository/sun/jars/activation-1.0.2.jar)
proxy.hostThe proxy host used to download dependencies.${maven.proxy.host}
proxy.portThe proxy port.${maven.proxy.port}
proxy.usernameThe username used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)${maven.proxy.username}
proxy.passwordThe password used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)${maven.proxy.password}
+
+ +

The main targets defined in the generated ant's buildfile are :

+
    +
  • + clean : to delete generated directories (${defaulttargetdir} and ${distdir}).
  • +
  • + compile : to compile the code.
  • +
  • + test : to run the test cases.
  • +
  • + jar : to create the jar.
  • +
  • + javadoc : to generate the project's javadoc.
  • +
  • + dist : to create the distribution. It contains the jar, the javadoc, licenses(LICENCE.*) and readme (README.*).
  • +
+
+
+ +
diff --git a/ant/xdocs/changes.xml b/ant/xdocs/changes.xml index b463c02f..c2bc3318 100644 --- a/ant/xdocs/changes.xml +++ b/ant/xdocs/changes.xml @@ -1,7 +1,7 @@ - - - Maven Ant Plug-in Goals + Goals dIon Gillard + Arnaud Heritier - - - - ant - - This is the default goal of the plugin and simply attains - the ant:generate-build goal. - - - - ant:generate-build - - Generates an ant - build.xml in the current directory which has targets to +
+ + + + + + + + + + + + + + + + +
GoalAvailableDescription
antsince 1.0This is the default goal of the plugin and simply attains the ant:generate-build goal. +
ant:generate-buildsince 1.0Generates an ant build file in the current directory which has targets to
    -
  • Compile the java source code
  • -
  • Create a jar from the compiled java code
  • -
  • Create a distribution
  • -
  • Run unit tests
  • -
  • Generate JavaDoc
  • -
  • Download all required jar files
  • -
  • Download and install Maven
  • -
- - - - +
  • Compile the java source code
  • +
  • Create a jar from the compiled java code
  • +
  • Create a distribution
  • +
  • Run unit tests
  • +
  • Generate JavaDoc
  • +
  • Download all required jar files
  • +
  • Download and install Maven
  • + +
    +
    +
    diff --git a/ant/xdocs/images/asf_logo_wide_clear.gif b/ant/xdocs/images/asf_logo_wide_clear.gif new file mode 100644 index 0000000000000000000000000000000000000000..aab499c7440371c53be0178556153b4e9a6bb206 GIT binary patch literal 6614 zcmeHK={M95-2HxMF?M6$8M{&TbrNR8nCyEfjD5`(A<>L=BwJ;t5JG6|vi-&yQ6VHt z5fzdsAuaRt{0qP0r(WFdl*sb>Ij9c6L5nvAYQJ2_8UHjf{+% z@0+-=#eZMEw9#pMH9Gn!BR+XHqLl zJUcNt8OIu2z~V-&PUz|BIhN6(P$)qbGMWe+RY_&CsxFF@lBJ|jTG!Mce`AA11Zw#} z5+k?5r7>#7P#RLow3N_XIg%lu9=JT#{NQOe>fB!)iI%GIJMwn*m&RMFCkj-=-H@EE zHP1_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5pERtnIo+ujby4(z}Ow z@kg*G^-4~c_g~5xN{L*lB-QFYPOJvYo}9^nZQU?zb3AiHZ-C{qtb3?f>oon?Zi!y$ zTiW8&l?w~a=+Rrjk`Zne7x$4tPWK+`vU6mV7pq1l zURO!PO&X&8K+1vNEk)b&)|M+RZlcpPd_h^EMZ>>ESAhV!FuOYtSEs}CjV3(KW#6dv zZyUH5vHTp|ShHPZ-*SVF8l%L+KrPe|S(TR}IL6I7!wbREi;B<3dve2-=Z#@3ux zVZqH3Nr=Pdtq;Ay7;Pt8j<$4UhZ7F2z+Q2O5LE{h0b^N%o02#Kh{rpKUE1DKv9V&6~5W^y>r}t?hgjzeF?rSvc zgZqDbD%g{3{m6xsn`zN?OUi?btots%w8C9C*0b4LmwPo`tv~eH#zu!^5J`9J$-2Vp&`wBV$ literal 0 HcmV?d00001 diff --git a/ant/xdocs/index.xml b/ant/xdocs/index.xml index 01cb76b9..f0db8db7 100644 --- a/ant/xdocs/index.xml +++ b/ant/xdocs/index.xml @@ -1,7 +1,7 @@ - Maven Ant Plug-in + Home Jason van Zyl Arnaud Heritier @@ -38,56 +38,10 @@ by this plugin, please see the properties document.

    - -
    - -

    When you generate the build file with maven, if the property - "maven.ant.use.properties" - is setted to true (default behaviour), the build file will load successively the properties stored in files "build.properties" located in :

    -
      -
    1. the project's root directory,
    2. -
    3. the user's home directory.
    4. -
    -

    If this property is setted to false the generated build file doesn't load this properties, so it will help you to avoid conflicts.

    -

    The following properties are defined in the build files and thus can be overridden in the files described previously :

    -
      -
    • - defaulttargetdir : the directory where the generated files are stored (default = ${project.home}/target).
    • -
    • - libdir : the directory where are downloaded dependencies (default = ${project.home}/target/lib).
    • -
    • - classesdir : the directory where compiled classes are stored (default = ${project.home}/target/classes).
    • -
    • - testclassesdir (only if there are unit tests classes in your project) : the directory where compiled classes for unit tests are stored (default = ${project.home}/target/test-classes).
    • -
    • - testreportdir (only if there are unit tests classes in your project) : the directory where tests reports are stored (default = ${project.home}/target/test-reports).
    • -
    • - distdir : the directory where the distribution is created (default = ${project.home}/dist).
    • -
    • - javadocdir : the directory where is stored the javadoc (default = ${project.home}/dist/docs/api).
    • -
    • - final.name : the name used for the generated jar (default = ${maven.final.name}.
    • -
    • - ${dep.artifactId}.jar : a property is created for each project's dependency (for example : activation.jar). This property can be used to override the default url used to download the dependency (for example : activation.jar=http://myhost/repository/sun/jars/activation-1.0.2.jar).
    • -
    -
    - -

    The main targets defined in the generated ant's buildfile are :

    -
      -
    • - clean : to delete generated directories (${defaulttargetdir} and ${distdir}).
    • -
    • - compile : to compile the code.
    • -
    • - test : to run the test cases.
    • -
    • - jar : to create the jar.
    • -
    • - javadoc : to generate the project's javadoc.
    • -
    • - dist : to create the distribution. It contains the jar, the javadoc, licenses(LICENCE.*) and readme (README.*).
    • -
    -
    +

    + For more information on the ant script generated, please see + the ant script settings document. +

    diff --git a/ant/xdocs/navigation.xml b/ant/xdocs/navigation.xml index d9049748..084a3fb6 100644 --- a/ant/xdocs/navigation.xml +++ b/ant/xdocs/navigation.xml @@ -1,7 +1,7 @@ - - Maven Ant Plugin - - - + + + - - + + + + + diff --git a/ant/xdocs/properties.xml b/ant/xdocs/properties.xml index eef48dda..948ca4a9 100644 --- a/ant/xdocs/properties.xml +++ b/ant/xdocs/properties.xml @@ -1,7 +1,7 @@ - Maven Ant Plugin Properties + Properties dIon Gillard + Arnaud Heritier
    - + + + + + - + - + + - + - + + +
    Property nameOptional? DescriptionAvailableOptional?Default value
    maven.ant.excludeTestsHolds a comma separated list of source file patterns that will be excluded in the generated Ant build, e.g.since 1.2 Yes - Holds a comma separated list of source file patterns that - will be excluded in the generated Ant build, e.g. -
    - -maven.ant.excludeTests=**/*Test.java,**/*Suite.java - + + maven.ant.excludeTests=**/*Test.java,**/*Suite.java
    maven.ant.generatebuild.fileSets the name of the ant buildfile to create.since 1.0 Yes - Sets the name of the ant buildfile to create. - Defaults to "build.xml". This is used by the "ant:generate-build" - goal. - ${basedir}/build.xml
    maven.ant.use.propertiesYes - Starting with version 1.9 of the Maven ant plugin two lines are - added at the top of the generated buildfile: -
    -  <property file="build.properties"/>
    -  <property file="${user.home}/build.properties"/>
    - If you experience that your own properties are clashing with the - ones used in the generated buildfile you can set this property to - "false" to remove these 2 lines from the generated buildfile. - Valid values are "true" or "false". Defaults to "true". +

    The maven plugin for ant adds two lines at the top of the generated buildfile :

    + <property file="build.properties"/> +<property file="${user.home}/build.properties"/> +

    If you experience that your own properties are clashing with the ones used in the generated buildfile you can set this property to "false" to remove these 2 lines from the generated buildfile. Valid values are "true" or "false".

    since 1.9Yestrue