maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r464920 [1/2] - in /maven/plugins/trunk/maven-ant-plugin: ./ src/it/ src/it/ear-it/ src/it/ear-it/ear/ src/it/ear-it/ejbs/ src/it/ear-it/ejbs/src/ src/it/ear-it/ejbs/src/main/ src/it/ear-it/ejbs/src/main/resources/ src/it/ear-it/ejbs/src/ma...
Date Tue, 17 Oct 2006 12:57:56 GMT
Author: vsiveton
Date: Tue Oct 17 05:57:52 2006
New Revision: 464920

URL: http://svn.apache.org/viewvc?view=rev&rev=464920
Log:
MANT-19: Handle more packaging projects (jar, ear, war...)

o added support for jar, ejb, ear, war, maven-plugin in Ant
o default Ant target is now package
o using maven plugin configuration to be wrapped in ant tasks
o added IT tests in profile with maven-clean-plugin + maven-install-plugin + maven-invoker-plugin
o added and reviewed unit tests

Added:
    maven/plugins/trunk/maven-ant-plugin/src/it/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/application.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/resources/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/resources/META-INF/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/resources/META-INF/ejb-jar.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/WEB-INF/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/WEB-INF/web.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/index.jsp   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/src/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/src/main/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/src/main/resources/
    maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/verify.bsh
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/TestMojo.java   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/verify.bsh
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/resources/
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/web.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/index.jsp   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/verify.bsh
    maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-compiler-config-test/
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-compiler-config-test/pom.xml   (with props)
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-nodep-test/pom.xml
      - copied, changed from r453044, maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-nodep-test/ant-nodep-test-plugin-config.xml
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-test/pom.xml
      - copied, changed from r453044, maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-test/ant-test-plugin-config.xml
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-war-config-test/
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-war-config-test/pom.xml   (with props)
Removed:
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-nodep-test/ant-nodep-test-plugin-config.xml
    maven/plugins/trunk/maven-ant-plugin/src/test/resources/unit/ant-test/ant-test-plugin-config.xml
Modified:
    maven/plugins/trunk/maven-ant-plugin/   (props changed)
    maven/plugins/trunk/maven-ant-plugin/pom.xml
    maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
    maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
    maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntMojo.java
    maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/AntBuildWriterUtilTest.java
    maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/AntMojoTest.java
    maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AntNoDepTestMavenProjectStub.java
    maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AntTestMavenProjectStub.java

Propchange: maven/plugins/trunk/maven-ant-plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -5,3 +5,4 @@
 target
 .project
 .classpath
+cobertura.ser

Modified: maven/plugins/trunk/maven-ant-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/pom.xml?view=diff&rev=464920&r1=464919&r2=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-ant-plugin/pom.xml Tue Oct 17 05:57:52 2006
@@ -30,7 +30,7 @@
   <name>Maven Ant Plugin</name>
   <version>2.0-beta-2-SNAPSHOT</version>
   <prerequisites>
-    <maven>2.0.2</maven>
+    <maven>2.0.4</maven>
   </prerequisites>
   <issueManagement>
     <system>jira</system>
@@ -40,19 +40,19 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-project</artifactId>
-      <version>2.0.2</version>
+      <version>2.0.4</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-settings</artifactId>
-      <version>2.0.2</version>
+      <version>2.0.4</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>2.0.2</version>
     </dependency>
-    <!-- For Maven 2.0.2 -->
+    <!-- For Maven 2.0.4 -->
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
@@ -64,12 +64,29 @@
       <version>1.6.5</version>
     </dependency>
     <dependency>
+      <groupId>xalan</groupId>
+      <artifactId>xalan</artifactId>
+      <version>2.7.0</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
       <version>1.0-beta-1</version>
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-embedder</artifactId>
+      <version>2.0.4</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>2.0.4</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>ant</groupId>
       <artifactId>ant-junit</artifactId>
       <version>1.6.5</version>
@@ -82,4 +99,123 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <profiles>
+    <profile>
+      <id>integration-tests</id>
+      <activation>
+        <property>
+          <name>integration-tests</name>
+          <value>true</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+            <configuration>
+              <filesets>
+                <fileset>
+                  <directory>src/it</directory>
+                  <includes>
+                    <include>**/target</include>
+                    <include>**/build.xml</include>
+                    <include>**/maven-build.xml</include>
+                    <include>**/maven-build.properties</include>
+                  </includes>
+                </fileset>
+              </filesets>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-install-plugin</artifactId>
+            <version>2.2-SNAPSHOT</version>
+            <executions>
+              <execution>
+                <id>it-test</id>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <file>${project.build.directory}/${project.build.finalName}.jar</file>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>${project.artifactId}</artifactId>
+                  <version>${project.version}</version>
+                  <packaging>${project.packaging}</packaging>
+                  <pomFile>${basedir}/pom.xml</pomFile>
+                  <createChecksum>true</createChecksum>
+                  <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+                  <localRepositoryId>it-local-repo</localRepositoryId>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <configuration>
+              <debug>true</debug>
+              <projectsDirectory>src/it</projectsDirectory>
+              <pomIncludes>
+                <pomInclude>ear-it/pom.xml</pomInclude>
+                <pomInclude>webapp-it/pom.xml</pomInclude>
+                <pomInclude>plugin-it/pom.xml</pomInclude>
+              </pomIncludes>
+              <postBuildHookScript>verify.bsh</postBuildHookScript>
+              <goals>
+                  <!-- Install to the target local-repo -->
+                <goal>install ant:ant</goal>
+              </goals>
+              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+            </configuration>
+            <executions>
+              <execution>
+                <id>integration-test</id>
+                <phase>integration-test</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <!--  Verify the results by calling Ant -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.1</version>
+            <executions>
+              <execution>
+                <phase>post-integration-test</phase>
+                <configuration>
+                  <tasks>
+                    <ant antfile="${basedir}/src/it/ear-it/build.xml"
+                         dir="${basedir}/src/it/ear-it" target="clean"/>
+                    <ant antfile="${basedir}/src/it/ear-it/build.xml"
+                         dir="${basedir}/src/it/ear-it" target="package"/>
+
+                    <ant antfile="${basedir}/src/it/webapp-it/build.xml"
+                         dir="${basedir}/src/it/webapp-it" target="clean"/>
+                    <ant antfile="${basedir}/src/it/webapp-it/build.xml"
+                         dir="${basedir}/src/it/webapp-it" target="package"/>
+
+                    <ant antfile="${basedir}/src/it/plugin-it/build.xml"
+                         dir="${basedir}/src/it/plugin-it" target="clean"/>
+                    <ant antfile="${basedir}/src/it/plugin-it/build.xml"
+                         dir="${basedir}/src/it/plugin-it" target="package"/>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,4 @@
+
+target
+build.xml
+maven-build.xml

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+
+target
+build.xml
+maven-build.properties
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/application.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/application.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/application.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC
+	"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
+	"http://java.sun.com/dtd/application_1_3.dtd">
+<application>
+  <display-name>ear</display-name>
+  <module>
+    <web>
+      <web-uri>servlet-1.0.war</web-uri>
+      <context-root>/servlet</context-root>
+    </web>
+  </module>
+  <module>
+    <ejb>ejbs-1.0.jar</ejb>
+  </module>
+</application>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/application.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+  <artifactId>ear</artifactId>
+  <packaging>ear</packaging>
+  <version>1.0</version>
+  <name>ear assembly</name>
+  <parent>
+    <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+    <artifactId>ear-it</artifactId>
+    <version>1.0</version>
+  </parent>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>ejbs</artifactId>
+      <type>ejb</type>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}.servlets</groupId>
+      <artifactId>servlet</artifactId>
+      <type>war</type>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>primary-source</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}.projects</groupId>
+      <artifactId>logging</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-ear-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <addClasspath>true</addClasspath>
+            </manifest>
+          </archive>
+          <applicationXml>${basedir}/application.xml</applicationXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ear/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+
+target
+build.xml
+maven-build.properties
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+  <artifactId>ejbs</artifactId>
+  <packaging>ejb</packaging>
+  <version>1.0</version>
+  <name>enterprise java beans</name>
+  <parent>
+    <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+    <artifactId>ear-it</artifactId>
+    <version>1.0</version>
+  </parent>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>primary-source</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}.projects</groupId>
+      <artifactId>logging</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-ejb-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <addClasspath>true</addClasspath>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/resources/META-INF/ejb-jar.xml?view=auto&rev=464920
==============================================================================
    (empty)

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/ejbs/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+  <artifactId>ear-it</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+  <name>Ear project</name>
+  <modules>
+    <module>projects</module>
+    <module>primary-source</module>
+    <module>servlets</module>
+    <module>ejbs</module>
+    <module>ear</module>
+  </modules>
+
+  <repositories>
+     <!-- Local repo defined by the maven-install-plugin in maven-ant-plugin pom -->
+    <repository>
+      <id>it-local-repo</id>
+      <url>file://${basedir}/../../../target/local-repo</url>
+    </repository>
+     <!-- Need Apache Snapshot -->
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Maven Snapshots</name>
+      <url>http://people.apache.org/maven-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <!-- No Plugin Snapshot -->
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots</id>
+      <name>Maven Plugin Snapshots</name>
+      <url>http://people.apache.org/maven-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ant-plugin</artifactId>
+        <version>2.0-beta-2-SNAPSHOT</version>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <configuration>
+            <unzipCommand>/usr/bin/unzip -o > err.txt</unzipCommand>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.groupId}.${project.artifactId}.projects</groupId>
+        <artifactId>logging</artifactId>
+        <version>1.0</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}.${project.artifactId}</groupId>
+        <artifactId>primary-source</artifactId>
+        <version>1.0</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}.${project.artifactId}.servlets</groupId>
+        <artifactId>servlet</artifactId>
+        <version>1.0</version>
+        <type>war</type>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}.${project.artifactId}</groupId>
+        <artifactId>ejbs</artifactId>
+        <version>1.0</version>
+        <type>ejb</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <distributionManagement>
+    <site>
+      <id>site</id>
+      <name>project website</name>
+      <url>scp://local.company.com/websites/project.company.com/</url>
+    </site>
+  </distributionManagement>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+
+target
+build.xml
+maven-build.properties
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+  <artifactId>primary-source</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+  <name>core project classes</name>
+  <parent>
+    <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+    <artifactId>ear-it</artifactId>
+    <version>1.0</version>
+  </parent>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}.projects</groupId>
+      <artifactId>logging</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <encoding>iso-8859-1</encoding>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <minmemory>128m</minmemory>
+          <maxmemory>512m</maxmemory>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/primary-source/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,3 @@
+
+build.xml
+maven-build.xml

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+
+target
+build.xml
+maven-build.properties
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it.projects</groupId>
+  <artifactId>logging</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+  <name>logging</name>
+  <parent>
+    <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+    <artifactId>projects</artifactId>
+    <version>1.0</version>
+  </parent>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/logging/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+  <artifactId>projects</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+  <name>sub projects</name>
+  <parent>
+    <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+    <artifactId>ear-it</artifactId>
+    <version>1.0</version>
+  </parent>
+  <modules>
+    <module>logging</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/projects/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,3 @@
+
+build.xml
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+  <artifactId>servlets</artifactId>
+  <packaging>pom</packaging>
+  <name>servlets</name>
+  <version>1.0</version>
+  <parent>
+    <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+    <artifactId>ear-it</artifactId>
+    <version>1.0</version>
+  </parent>
+  <modules>
+    <module>servlet</module>
+  </modules>
+</project>
+

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+
+target
+build.xml
+maven-build.properties
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it.servlets</groupId>
+  <artifactId>servlet</artifactId>
+  <packaging>war</packaging>
+  <name>servlet</name>
+  <parent>
+    <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+    <artifactId>servlets</artifactId>
+    <version>1.0</version>
+  </parent>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugins.maven-ant-plugin.it.ear-it</groupId>
+      <artifactId>primary-source</artifactId>
+      <version>1.0</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/WEB-INF/web.xml?view=auto&rev=464920
==============================================================================
    (empty)

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/index.jsp?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/index.jsp (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/index.jsp Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/servlets/servlet/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/verify.bsh?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/verify.bsh (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/ear-it/verify.bsh Tue Oct 17 05:57:52 2006
@@ -0,0 +1,161 @@
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+
+import org.codehaus.plexus.util.IOUtil;
+
+File build;
+File mavenBuild;
+File mavenBuildProperties;
+
+// Root project
+
+build = new File( basedir, "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir, "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+// EAR project
+
+build = new File( basedir + "/ear", "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir + "/ear", "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuildProperties = new File( basedir + "/ear", "maven-build.properties" );
+if ( mavenBuildProperties.isDirectory() || !mavenBuildProperties.exists() )
+{
+  System.err.println( "The file '" + mavenBuildProperties.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+// EJBS project
+
+build = new File( basedir + "/ejbs", "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir + "/ejbs", "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuildProperties = new File( basedir + "/ejbs", "maven-build.properties" );
+if ( mavenBuildProperties.isDirectory() || !mavenBuildProperties.exists() )
+{
+  System.err.println( "The file '" + mavenBuildProperties.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+// PRImARY-SOURCE project
+
+build = new File( basedir + "/primary-source", "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir + "/primary-source", "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuildProperties = new File( basedir + "/primary-source", "maven-build.properties" );
+if ( mavenBuildProperties.isDirectory() || !mavenBuildProperties.exists() )
+{
+  System.err.println( "The file '" + mavenBuildProperties.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+// PROJECTS project
+
+build = new File( basedir + "/projects", "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir + "/projects", "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+// LOGGING project
+
+build = new File( basedir + "/projects/logging", "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir + "/projects/logging", "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuildProperties = new File( basedir + "/projects/logging", "maven-build.properties" );
+if ( mavenBuildProperties.isDirectory() || !mavenBuildProperties.exists() )
+{
+  System.err.println( "The file '" + mavenBuildProperties.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+// SERVLETS project
+
+build = new File( basedir + "/servlets", "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir + "/servlets", "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+// SERVLET project
+
+build = new File( basedir + "/servlets/servlet", "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir + "/servlets/servlet", "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuildProperties = new File( basedir + "/servlets/servlet", "maven-build.properties" );
+if ( mavenBuildProperties.isDirectory() || !mavenBuildProperties.exists() )
+{
+  System.err.println( "The file '" + mavenBuildProperties.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+return true;

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+
+target
+build.xml
+maven-build.properties
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+  <artifactId>plugin-it</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+
+  <repositories>
+     <!-- Local repo defined by the maven-install-plugin in maven-ant-plugin pom -->
+    <repository>
+      <id>it-local-repo</id>
+      <url>file://${basedir}/../../../target/local-repo</url>
+    </repository>
+     <!-- Need Apache Snapshot -->
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Maven Snapshots</name>
+      <url>http://people.apache.org/maven-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <!-- No Plugin Snapshot -->
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots</id>
+      <name>Maven Plugin Snapshots</name>
+      <url>http://people.apache.org/maven-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ant-plugin</artifactId>
+        <version>2.0-beta-2-SNAPSHOT</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <!-- Ant can use the same command line arguments as the javac of the current VM -->
+  <properties>
+    <build.compiler>extJavac</build.compiler>
+  </properties>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/TestMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/TestMojo.java?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/TestMojo.java (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/TestMojo.java Tue Oct 17 05:57:52 2006
@@ -0,0 +1,37 @@
+package org.apache.maven.plugin.ant.it;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+
+/**
+ * @goal test
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class TestMojo
+    extends AbstractMojo
+{
+    /**
+     * @see org.apache.maven.plugin.Mojo#execute()
+     */
+    public void execute()
+    {
+        System.out.println( "Hello World!" );
+    }
+}

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/TestMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/src/main/java/org/apache/maven/plugin/ant/it/TestMojo.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/verify.bsh?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/verify.bsh (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/plugin-it/verify.bsh Tue Oct 17 05:57:52 2006
@@ -0,0 +1,32 @@
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+
+import org.codehaus.plexus.util.IOUtil;
+
+File build;
+File mavenBuild;
+File mavenBuildProperties;
+
+// Plugin project
+
+build = new File( basedir, "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir, "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuildProperties = new File( basedir, "maven-build.properties" );
+if ( mavenBuildProperties.isDirectory() || !mavenBuildProperties.exists() )
+{
+  System.err.println( "The file '" + mavenBuildProperties.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+return true;

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+
+target
+build.xml
+maven-build.properties
+maven-build.xml

Added: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/pom.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/pom.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/pom.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-ant-plugin.it</groupId>
+  <artifactId>webapp-it</artifactId>
+  <packaging>war</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>Webapp project</name>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <repositories>
+     <!-- Local repo defined by the maven-install-plugin in maven-ant-plugin pom -->
+    <repository>
+      <id>it-local-repo</id>
+      <url>file://${basedir}/../../../target/local-repo</url>
+    </repository>
+     <!-- Need Apache Snapshot -->
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Maven Snapshots</name>
+      <url>http://people.apache.org/maven-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <!-- No Plugin Snapshot -->
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots</id>
+      <name>Maven Plugin Snapshots</name>
+      <url>http://people.apache.org/maven-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <build>
+    <finalName>ant-webapp-test</finalName>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ant-plugin</artifactId>
+        <version>2.0-beta-2-SNAPSHOT</version>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/web.xml?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/web.xml (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/web.xml Tue Oct 17 05:57:52 2006
@@ -0,0 +1,7 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+  <display-name>Archetype Created Web Application</display-name>
+</web-app>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/index.jsp?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/index.jsp (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/index.jsp Tue Oct 17 05:57:52 2006
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/verify.bsh?view=auto&rev=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/verify.bsh (added)
+++ maven/plugins/trunk/maven-ant-plugin/src/it/webapp-it/verify.bsh Tue Oct 17 05:57:52 2006
@@ -0,0 +1,32 @@
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+
+import org.codehaus.plexus.util.IOUtil;
+
+File build;
+File mavenBuild;
+File mavenBuildProperties;
+
+// Webapp project
+
+build = new File( basedir, "build.xml" );
+if ( build.isDirectory() || !build.exists() )
+{
+  System.err.println( "The file '" + build.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuild = new File( basedir, "maven-build.xml" );
+if ( mavenBuild.isDirectory() || !mavenBuild.exists() )
+{
+  System.err.println( "The file '" + mavenBuild.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+mavenBuildProperties = new File( basedir, "maven-build.properties" );
+if ( mavenBuildProperties.isDirectory() || !mavenBuildProperties.exists() )
+{
+  System.err.println( "The file '" + mavenBuildProperties.getAbsolutePath() + "' is a directory or doesn't exist." );
+  return false;
+}
+
+return true;

Modified: maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java?view=diff&rev=464920&r1=464919&r2=464920
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java (original)
+++ maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java Tue Oct 17 05:57:52 2006
@@ -20,13 +20,9 @@
 import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.IOException;
-import java.text.DateFormat;
-import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;
 
@@ -119,7 +115,7 @@
     protected void writeBuildProperties()
         throws IOException
     {
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             return;
         }
@@ -231,7 +227,7 @@
         // <!-- comments -->
         // ----------------------------------------------------------------------
 
-        writeHeader( writer );
+        AntBuildWriterUtil.writeHeader( writer );
 
         // ----------------------------------------------------------------------
         // <project/>
@@ -239,7 +235,7 @@
 
         writer.startElement( "project" );
         writer.addAttribute( "name", project.getArtifactId() + "-from-maven" );
-        writer.addAttribute( "default", "jar" );
+        writer.addAttribute( "default", "package" );
         writer.addAttribute( "basedir", "." );
 
         AntBuildWriterUtil.writeLineBreak( writer );
@@ -266,14 +262,15 @@
         // <target name="compile" />
         // ----------------------------------------------------------------------
 
-        List compileSourceRoots = removeEmptyCompileSourceRoots( project.getCompileSourceRoots() );
+        List compileSourceRoots = AntBuildWriterUtil.removeEmptyCompileSourceRoots( project.getCompileSourceRoots() );
         writeCompileTarget( writer, compileSourceRoots );
 
         // ----------------------------------------------------------------------
         // <target name="compile-tests" />
         // ----------------------------------------------------------------------
 
-        List testCompileSourceRoots = removeEmptyCompileSourceRoots( project.getTestCompileSourceRoots() );
+        List testCompileSourceRoots = AntBuildWriterUtil.removeEmptyCompileSourceRoots( project
+            .getTestCompileSourceRoots() );
         writeCompileTestsTarget( writer, testCompileSourceRoots );
 
         // ----------------------------------------------------------------------
@@ -283,10 +280,9 @@
         writeTestTargets( writer, testCompileSourceRoots );
 
         // ----------------------------------------------------------------------
-        // <target name="jar" />
+        // <target name="package" />
         // ----------------------------------------------------------------------
-        // TODO: what if type is not JAR?
-        writeJarTarget( writer );
+        writePackageTarget( writer );
 
         // ----------------------------------------------------------------------
         // <target name="get-deps" />
@@ -321,7 +317,7 @@
         // <!-- comments -->
         // ----------------------------------------------------------------------
 
-        writeAntVersionHeader( writer );
+        AntBuildWriterUtil.writeAntVersionHeader( writer );
 
         // ----------------------------------------------------------------------
         // <project/>
@@ -329,7 +325,7 @@
 
         writer.startElement( "project" );
         writer.addAttribute( "name", project.getArtifactId() );
-        writer.addAttribute( "default", "jar" );
+        writer.addAttribute( "default", "package" );
         writer.addAttribute( "basedir", "." );
 
         AntBuildWriterUtil.writeLineBreak( writer );
@@ -339,7 +335,7 @@
 
         writer.startElement( "import" );
         writer.addAttribute( "file", DEFAULT_MAVEN_BUILD_FILENAME );
-        writer.endElement(); // echo
+        writer.endElement(); // import
 
         AntBuildWriterUtil.writeLineBreak( writer, 1, 1 );
 
@@ -368,7 +364,7 @@
      */
     private void writeProperties( XMLWriter writer )
     {
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             return;
         }
@@ -503,7 +499,7 @@
      */
     private void writeBuildPathDefinition( XMLWriter writer )
     {
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             return;
         }
@@ -572,18 +568,14 @@
         writer.addAttribute( "name", "clean" );
         writer.addAttribute( "description", "Clean the output directory" );
 
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             if ( project.getModules() != null )
             {
                 for ( Iterator it = project.getModules().iterator(); it.hasNext(); )
                 {
                     String moduleSubPath = (String) it.next();
-                    writer.startElement( "ant" );
-                    writer.addAttribute( "antfile", "build.xml" );
-                    writer.addAttribute( "dir", PathUtils.toRelative( project.getBasedir(), moduleSubPath ) );
-                    writer.addAttribute( "target", "clean" );
-                    writer.endElement(); // ant
+                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "clean" );
                 }
             }
         }
@@ -604,12 +596,14 @@
      *
      * @param writer
      * @param compileSourceRoots
+     * @throws IOException if any
      */
     private void writeCompileTarget( XMLWriter writer, List compileSourceRoots )
+        throws IOException
     {
         AntBuildWriterUtil.writeCommentText( writer, "Compilation target", 1 );
 
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             writer.startElement( "target" );
             writer.addAttribute( "name", "compile" );
@@ -619,11 +613,7 @@
                 for ( Iterator it = project.getModules().iterator(); it.hasNext(); )
                 {
                     String moduleSubPath = (String) it.next();
-                    writer.startElement( "ant" );
-                    writer.addAttribute( "antfile", "build.xml" );
-                    writer.addAttribute( "dir", PathUtils.toRelative( project.getBasedir(), moduleSubPath ) );
-                    writer.addAttribute( "target", "compile" );
-                    writer.endElement(); // ant
+                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "compile" );
                 }
             }
             writer.endElement(); // target
@@ -649,12 +639,14 @@
      *
      * @param writer
      * @param testCompileSourceRoots
+     * @throws IOException if any
      */
     private void writeCompileTestsTarget( XMLWriter writer, List testCompileSourceRoots )
+        throws IOException
     {
         AntBuildWriterUtil.writeCommentText( writer, "Test-compilation target", 1 );
 
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             writer.startElement( "target" );
             writer.addAttribute( "name", "compile-tests" );
@@ -664,11 +656,7 @@
                 for ( Iterator it = project.getModules().iterator(); it.hasNext(); )
                 {
                     String moduleSubPath = (String) it.next();
-                    writer.startElement( "ant" );
-                    writer.addAttribute( "antfile", "build.xml" );
-                    writer.addAttribute( "dir", PathUtils.toRelative( project.getBasedir(), moduleSubPath ) );
-                    writer.addAttribute( "target", "compile-tests" );
-                    writer.endElement(); // ant
+                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "compile-tests" );
                 }
             }
             writer.endElement(); // target
@@ -700,7 +688,7 @@
     {
         AntBuildWriterUtil.writeCommentText( writer, "Run all tests", 1 );
 
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             writer.startElement( "target" );
             writer.addAttribute( "name", "test" );
@@ -710,11 +698,7 @@
                 for ( Iterator it = project.getModules().iterator(); it.hasNext(); )
                 {
                     String moduleSubPath = (String) it.next();
-                    writer.startElement( "ant" );
-                    writer.addAttribute( "antfile", "build.xml" );
-                    writer.addAttribute( "dir", PathUtils.toRelative( project.getBasedir(), moduleSubPath ) );
-                    writer.addAttribute( "target", "test" );
-                    writer.endElement(); // ant
+                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "test" );
                 }
             }
             writer.endElement(); // target
@@ -779,8 +763,8 @@
                      writeIncludesExcludes( writer, unitTest.getIncludes(), unitTest.getExcludes() );
                      // TODO: m1 allows additional test exclusions via maven.ant.excludeTests
                      */
-                    writeIncludesExcludes( writer, Collections.singletonList( "**/*Test.java" ), Collections
-                        .singletonList( "**/*Abstract*Test.java" ) );
+                    AntBuildWriterUtil.writeIncludesExcludes( writer, Collections.singletonList( "**/*Test.java" ),
+                                                              Collections.singletonList( "**/*Abstract*Test.java" ) );
                     writer.endElement(); // fileset
                 }
                 writer.endElement(); // batchtest
@@ -827,54 +811,66 @@
     }
 
     /**
-     * Write jar target in the writer depending the packaging of the project.
+     * Write package target in the writer depending the packaging of the project.
      *
      * @param writer
+     * @throws IOException if any
      */
-    private void writeJarTarget( XMLWriter writer )
+    private void writePackageTarget( XMLWriter writer )
+        throws IOException
     {
-        AntBuildWriterUtil.writeCommentText( writer, "Creation target", 1 );
+        AntBuildWriterUtil.writeCommentText( writer, "Package target", 1 );
 
-        if ( isPomPackaging( project ) )
+        writer.startElement( "target" );
+        writer.addAttribute( "name", "package" );
+        if ( !AntBuildWriterUtil.isPomPackaging( project ) )
+        {
+            writer.addAttribute( "depends", "compile,test" );
+        }
+        writer.addAttribute( "description", "Package the application" );
+
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
-            writer.startElement( "target" );
-            writer.addAttribute( "name", "jar" );
-            writer.addAttribute( "description", "Create the JAR" );
             if ( project.getModules() != null )
             {
                 for ( Iterator it = project.getModules().iterator(); it.hasNext(); )
                 {
                     String moduleSubPath = (String) it.next();
-                    writer.startElement( "ant" );
-                    writer.addAttribute( "antfile", "build.xml" );
-                    writer.addAttribute( "dir", PathUtils.toRelative( project.getBasedir(), moduleSubPath ) );
-                    writer.addAttribute( "target", "jar" );
-                    writer.endElement(); // ant
+                    AntBuildWriterUtil.writeAntTask( writer, project, moduleSubPath, "package" );
                 }
             }
-            writer.endElement(); // target
         }
         else
         {
-            writer.startElement( "target" );
-            writer.addAttribute( "name", "jar" );
-            writer.addAttribute( "depends", "compile,test" );
-            writer.addAttribute( "description", "Create the JAR" );
-
-            writer.startElement( "jar" );
-            writer.addAttribute( "jarfile", "${maven.build.dir}/${maven.build.finalName}.jar" );
-            AntBuildWriterUtil.addWrapAttribute( writer, "jar", "basedir", "${maven.build.outputDir}", 3 );
-            AntBuildWriterUtil.addWrapAttribute( writer, "jar", "excludes", "**/package.html", 3 );
-            writer.endElement(); // jar
-
-            writer.endElement(); // target
+            if ( AntBuildWriterUtil.isJarPackaging( project ) )
+            {
+                AntBuildWriterUtil.writeJarTask( writer, project );
+            }
+            else if ( AntBuildWriterUtil.isEarPackaging( project ) )
+            {
+                AntBuildWriterUtil.writeEarTask( writer, project );
+            }
+            else if ( AntBuildWriterUtil.isWarPackaging( project ) )
+            {
+                AntBuildWriterUtil.writeWarTask( writer, project, localRepository );
+            }
+            else
+            {
+                writer.startElement( "echo" );
+                writer.addAttribute( "message", "No Ant task exists for the packaging '" + project.getPackaging()
+                    + "'. " + "You could overrided the Ant package target in your build.xml." );
+                writer.endElement(); // echo
+            }
         }
 
+        writer.endElement(); // target
+
         AntBuildWriterUtil.writeLineBreak( writer );
     }
 
     private void writeCompileTasks( XMLWriter writer, File basedir, String outputDirectory, List compileSourceRoots,
                                    List resources, String additionalClassesDirectory, boolean isTest )
+        throws IOException
     {
         writer.startElement( "mkdir" );
         writer.addAttribute( "dir", outputDirectory );
@@ -993,7 +989,7 @@
                     writer.addAttribute( "dir", "${maven.build.resourceDir." + i + "}" );
                 }
 
-                writeIncludesExcludes( writer, resource.getIncludes(), resource.getExcludes() );
+                AntBuildWriterUtil.writeIncludesExcludes( writer, resource.getIncludes(), resource.getExcludes() );
 
                 writer.endElement(); // fileset
 
@@ -1009,7 +1005,7 @@
      */
     private void writeGetDepsTarget( XMLWriter writer )
     {
-        if ( isPomPackaging( project ) )
+        if ( AntBuildWriterUtil.isPomPackaging( project ) )
         {
             return;
         }
@@ -1048,24 +1044,27 @@
             // TODO: should the artifacthandler be used instead?
             String path = PathUtils.toRelative( localRepository, artifact.getFile().getPath() );
 
-            File parentDirs = new File( path ).getParentFile();
-            if ( parentDirs != null )
+            if ( !new File( path ).exists() )
             {
-                writer.startElement( "mkdir" );
-                writer.addAttribute( "dir", "${maven.repo.local}/" + parentDirs.getPath() );
-                writer.endElement(); // mkdir
-            }
+                File parentDirs = new File( path ).getParentFile();
+                if ( parentDirs != null )
+                {
+                    writer.startElement( "mkdir" );
+                    writer.addAttribute( "dir", "${maven.repo.local}/" + parentDirs.getPath() );
+                    writer.endElement(); // mkdir
+                }
 
-            for ( Iterator j = project.getRepositories().iterator(); j.hasNext(); )
-            {
-                Repository repository = (Repository) j.next();
+                for ( Iterator j = project.getRepositories().iterator(); j.hasNext(); )
+                {
+                    Repository repository = (Repository) j.next();
 
-                writer.startElement( "get" );
-                writer.addAttribute( "src", repository.getUrl() + "/" + path );
-                AntBuildWriterUtil.addWrapAttribute( writer, "get", "dest", "${maven.repo.local}/" + path, 3 );
-                AntBuildWriterUtil.addWrapAttribute( writer, "get", "usetimestamp", "true", 3 );
-                AntBuildWriterUtil.addWrapAttribute( writer, "get", "ignoreerrors", "true", 3 );
-                writer.endElement(); // get
+                    writer.startElement( "get" );
+                    writer.addAttribute( "src", repository.getUrl() + "/" + path );
+                    AntBuildWriterUtil.addWrapAttribute( writer, "get", "dest", "${maven.repo.local}/" + path, 3 );
+                    AntBuildWriterUtil.addWrapAttribute( writer, "get", "usetimestamp", "true", 3 );
+                    AntBuildWriterUtil.addWrapAttribute( writer, "get", "ignoreerrors", "true", 3 );
+                    writer.endElement(); // get
+                }
             }
         }
 
@@ -1079,106 +1078,14 @@
     // ----------------------------------------------------------------------
 
     /**
-     * @param compileSourceRoots
-     * @return not null list
-     */
-    private static List removeEmptyCompileSourceRoots( List compileSourceRoots )
-    {
-        List newCompileSourceRootsList = new ArrayList();
-        if ( compileSourceRoots != null )
-        {
-            // copy as I may be modifying it
-            for ( Iterator i = compileSourceRoots.iterator(); i.hasNext(); )
-            {
-                String srcDir = (String) i.next();
-                if ( new File( srcDir ).exists() )
-                {
-                    newCompileSourceRootsList.add( srcDir );
-                }
-            }
-        }
-
-        return newCompileSourceRootsList;
-    }
-
-    /**
-     * @param writer
-     * @param includes
-     * @param excludes
-     */
-    private static void writeIncludesExcludes( XMLWriter writer, List includes, List excludes )
-    {
-        for ( Iterator i = includes.iterator(); i.hasNext(); )
-        {
-            String include = (String) i.next();
-            writer.startElement( "include" );
-            writer.addAttribute( "name", include );
-            writer.endElement(); // include
-        }
-        for ( Iterator i = excludes.iterator(); i.hasNext(); )
-        {
-            String exclude = (String) i.next();
-            writer.startElement( "exclude" );
-            writer.addAttribute( "name", exclude );
-            writer.endElement(); // exclude
-        }
-    }
-
-    /**
-     * Write comments in the Ant build file header
-     *
-     * @param writer
-     */
-    private static void writeHeader( XMLWriter writer )
-    {
-        writeAntVersionHeader( writer );
-
-        AntBuildWriterUtil.writeCommentLineBreak( writer );
-        AntBuildWriterUtil.writeComment( writer, StringUtils.repeat( "=", 21 ) + " - DO NOT EDIT THIS FILE! - "
-            + StringUtils.repeat( "=", 21 ) );
-        AntBuildWriterUtil.writeCommentLineBreak( writer );
-        AntBuildWriterUtil.writeComment( writer, " " );
-        AntBuildWriterUtil.writeComment( writer, "Any modifications will be overwritten." );
-        AntBuildWriterUtil.writeComment( writer, " " );
-        DateFormat dateFormat = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT, Locale.US );
-        AntBuildWriterUtil.writeComment( writer, "Generated by Maven Ant Plugin on "
-            + dateFormat.format( new Date( System.currentTimeMillis() ) ) );
-        AntBuildWriterUtil.writeComment( writer, "See: http://maven.apache.org/plugins/maven-ant-plugin/" );
-        AntBuildWriterUtil.writeComment( writer, " " );
-        AntBuildWriterUtil.writeCommentLineBreak( writer );
-
-        AntBuildWriterUtil.writeLineBreak( writer );
-    }
-
-    /**
-     * Write comment for the Ant supported version
-     *
-     * @param writer
-     */
-    private static void writeAntVersionHeader( XMLWriter writer )
-    {
-        AntBuildWriterUtil.writeCommentText( writer, "Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above.",
-                                             0 );
-    }
-
-    /**
      * Put a property in properties defined by a name and a value
      *
-     * @param properties
+     * @param properties not null
      * @param name
-     * @param value
+     * @param value not null
      */
     private static void addProperty( Properties properties, String name, String value )
     {
         properties.put( name, StringUtils.isNotEmpty( value ) ? value : "" );
-    }
-
-    /**
-     * @param mavenProject
-     * @return true if project packaging equals <code>pom</code>
-     */
-    private boolean isPomPackaging( MavenProject mavenProject )
-    {
-        return mavenProject.getPackaging().toLowerCase().equals( "pom" );
     }
 }



Mime
View raw message