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 2009/08/28 20:37:11 UTC

svn commit: r808984 - in /maven/plugins/trunk/maven-ear-plugin/src/it/jboss: ./ pom.xml src/ src/main/ src/main/application/ src/main/application/META-INF/ src/main/application/META-INF/appserver-application.xml verify.bsh

Author: bentmann
Date: Fri Aug 28 18:37:10 2009
New Revision: 808984

URL: http://svn.apache.org/viewvc?rev=808984&view=rev
Log:
o Added IT to check JBoss-specific configuration

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

Added: maven/plugins/trunk/maven-ear-plugin/src/it/jboss/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/it/jboss/pom.xml?rev=808984&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/it/jboss/pom.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/it/jboss/pom.xml Fri Aug 28 18:37:10 2009
@@ -0,0 +1,50 @@
+<?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.ear.basic</groupId>
+  <artifactId>test</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>2.3.3-SNAPSHOT</version>
+        <configuration>
+          <generateApplicationXml>true</generateApplicationXml>
+          <jboss>
+            <version>4</version>
+            <unauthenticated-principal>guest</unauthenticated-principal>
+            <loader-repository>com.foo:loader=foo-application-1.0.ear</loader-repository>
+          </jboss>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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

Added: maven/plugins/trunk/maven-ear-plugin/src/it/jboss/src/main/application/META-INF/appserver-application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/it/jboss/src/main/application/META-INF/appserver-application.xml?rev=808984&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/it/jboss/src/main/application/META-INF/appserver-application.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/it/jboss/src/main/application/META-INF/appserver-application.xml Fri Aug 28 18:37:10 2009
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<appserver-app>
+  <whatever/>
+</appserver-app>

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

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

Added: maven/plugins/trunk/maven-ear-plugin/src/it/jboss/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/it/jboss/verify.bsh?rev=808984&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/it/jboss/verify.bsh (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/it/jboss/verify.bsh Fri Aug 28 18:37:10 2009
@@ -0,0 +1,31 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+File jarFile = new File( basedir, "target/test-1.0.ear" );
+System.out.println( "Checking for existence of " + jarFile );
+if ( !jarFile.isFile() )
+{
+    throw new IllegalStateException( "Missing file: " + jarFile );
+}
+
+JarFile jar = new JarFile( jarFile );
+
+String[] includedEntries = {
+    "META-INF/application.xml",
+    "META-INF/appserver-application.xml",
+    "META-INF/jboss-app.xml",
+};
+for ( String included : includedEntries )
+{
+    System.out.println( "Checking for existence of " + included );
+    if ( jar.getEntry( included ) == null )
+    {
+        throw new IllegalStateException( "Missing archive entry: " + included );
+    }
+}
+
+jar.close();
+
+return true;

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

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