You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/09/23 14:52:35 UTC

svn commit: r698164 - in /maven/plugins/trunk/maven-ear-plugin: ./ src/it/ src/it/basic/ src/it/basic/src/ src/it/basic/src/main/ src/it/basic/src/main/application/ src/it/basic/src/main/application/META-INF/

Author: bentmann
Date: Tue Sep 23 05:52:34 2008
New Revision: 698164

URL: http://svn.apache.org/viewvc?rev=698164&view=rev
Log:
o Migrated core IT 0033 over to its corresponding plugin project

Added:
    maven/plugins/trunk/maven-ear-plugin/src/it/
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/pom.xml   (with props)
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/appserver-application.xml   (with props)
    maven/plugins/trunk/maven-ear-plugin/src/it/basic/verify.bsh   (with props)
    maven/plugins/trunk/maven-ear-plugin/src/it/settings.xml   (with props)
Modified:
    maven/plugins/trunk/maven-ear-plugin/pom.xml

Modified: maven/plugins/trunk/maven-ear-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/pom.xml?rev=698164&r1=698163&r2=698164&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-ear-plugin/pom.xml Tue Sep 23 05:52:34 2008
@@ -119,6 +119,34 @@
               </includes>
             </configuration>
           </plugin>
+          <plugin>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <configuration>
+              <debug>true</debug>
+              <projectsDirectory>src/it</projectsDirectory>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <pomIncludes>
+                <pomInclude>*/pom.xml</pomInclude>
+              </pomIncludes>
+              <preBuildHookScript>setup.bsh</preBuildHookScript>
+              <postBuildHookScript>verify.bsh</postBuildHookScript>
+              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <goals>
+                <goal>clean</goal>
+                <goal>package</goal>
+              </goals>
+            </configuration>
+            <executions>
+              <execution>
+                <id>integration-test</id>
+                <goals>
+                  <goal>install</goal>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>

Added: maven/plugins/trunk/maven-ear-plugin/src/it/basic/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/it/basic/pom.xml?rev=698164&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/it/basic/pom.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/it/basic/pom.xml Tue Sep 23 05:52:34 2008
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.it0033</groupId>
+  <artifactId>maven-it-it0033</artifactId>
+  <version>1.0</version>
+  <packaging>ear</packaging>
+
+  <name>Maven Integration Test :: it0033</name> 
+  <description>Test an EAR generation</description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <generateApplicationXml>true</generateApplicationXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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

Added: maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/appserver-application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/appserver-application.xml?rev=698164&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/appserver-application.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/appserver-application.xml Tue Sep 23 05:52:34 2008
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<appserver-app>
+  <whatever/>
+</appserver-app>

Propchange: maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/appserver-application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/it/basic/src/main/application/META-INF/appserver-application.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/it/basic/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/it/basic/verify.bsh?rev=698164&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/it/basic/verify.bsh (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/it/basic/verify.bsh Tue Sep 23 05:52:34 2008
@@ -0,0 +1,40 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+try
+{
+    File jarFile = new File( basedir, "target/maven-it-it0033-1.0.ear" );
+    System.out.println( "Checking for existence of " + jarFile );
+    if ( !jarFile.isFile() )
+    {
+        System.out.println( "FAILURE!" );
+        return false;
+    }
+
+    JarFile jar = new JarFile( jarFile );
+
+    String[] includedEntries = {
+        "META-INF/application.xml",
+        "META-INF/appserver-application.xml",
+    };
+    for ( String included : includedEntries )
+    {
+        System.out.println( "Checking for existence of " + included );
+        if ( jar.getEntry( included ) == null )
+        {
+            System.out.println( "FAILURE!" );
+            return false;
+        }
+    }
+
+    jar.close();
+}
+catch( Throwable t )
+{
+    t.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: maven/plugins/trunk/maven-ear-plugin/src/it/basic/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/it/basic/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/it/settings.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/it/settings.xml?rev=698164&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/it/settings.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/it/settings.xml Tue Sep 23 05:52:34 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>file:///@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+        <repository>
+          <id>apache.snapshots</id>
+          <name>Apache Snapshot Repository</name>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>file:///@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

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

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