[jboss-cvs] JBossAS SVN: r108131 - in trunk/testsuite: imports/sections and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 13 23:06:53 EDT 2010


Author: flavia.rainone at jboss.com
Date: 2010-09-13 23:06:52 -0400 (Mon, 13 Sep 2010)
New Revision: 108131

Added:
   trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java
   trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/
   trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/
   trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml
Removed:
   trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldPlainEjbTranslatorExampleUnitTestCase.java
Modified:
   trunk/testsuite/
   trunk/testsuite/imports/sections/weld.xml
   trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml
Log:
[JBAS-8250] Add WeldTranslatorManifestCPTestCase, for testing archives with libs referenced in the manifest class-path entry


Property changes on: trunk/testsuite
___________________________________________________________________
Name: svn:ignore
   - .git
.metadata
target
bin
*.ipr
*.iws
*.iml
.idea
*.patch
.settings
.classpath
.project
output
junit*.properties
build.log
failed.txt
transaction.log
run.tstamp

   + .git
.metadata
target
bin
*.ipr
*.iws
*.iml
.idea
*.patch
.settings
.classpath
.project
output
junit*.properties
build.log
failed.txt
transaction.log
run.tstamp
manifest_test


Modified: trunk/testsuite/imports/sections/weld.xml
===================================================================
--- trunk/testsuite/imports/sections/weld.xml	2010-09-14 02:31:32 UTC (rev 108130)
+++ trunk/testsuite/imports/sections/weld.xml	2010-09-14 03:06:52 UTC (rev 108131)
@@ -47,17 +47,54 @@
          </fileset>
       </jar>
       
-      <jar destfile="${build.lib}/weld-plainejbtranslator.ear">
+      <jar destfile="${build.lib}/weld-translatorplainejb.ear">
          <fileset dir="${build.lib}">
             <include name="weld-translator-without-beans.jar"/>
             <include name="weld-translator.war"/>
          </fileset>
-   <fileset dir="${source.resources}/deployers/weld/plainEjbTranslator">
+         <fileset dir="${source.resources}/deployers/weld/plainEjbTranslator">
             <include name="META-INF/application.xml"/>
          </fileset>
       </jar>
    </target>
    
+   <target name="translatorWithManifestClasspath" depends="compile">
+      <mkdir dir="${build.lib}" />
+      
+      <jar destfile="${build.lib}/weld-translator-manifestclasspath.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/deployers/weld/translator/ejb/**"/>
+            <exclude name="org/jboss/test/deployers/weld/translator/ejb/SentenceParser.class"/>
+         </fileset>
+         <fileset dir="${source.resources}/deployers/weld/translator/ejb">
+            <include name="META-INF/beans.xml"/>
+         </fileset>
+         <manifest>
+            <attribute name="Class-Path" value="../weld-translator-lib.jar"/>
+         </manifest>
+      </jar>
+      
+      <jar destfile="${build.lib}/weld-translator-lib.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/deployers/weld/translator/ejb/SentenceParser.class"/>
+         </fileset>
+         <fileset dir="${source.resources}/deployers/weld/translator/ejb">
+            <include name="META-INF/beans.xml"/>
+         </fileset>
+      </jar>
+      
+      <jar destfile="${build.lib}/weld-translatormanifestcp.ear">
+         <fileset dir="${build.lib}">
+            <include name="weld-translator-manifestclasspath.jar"/>
+            <include name="weld-translator-lib.jar"/>
+            <include name="weld-translator.war"/>
+         </fileset>
+         <fileset dir="${source.resources}/deployers/weld/translatorWithManifestClasspath">
+            <include name="META-INF/application.xml"/>
+         </fileset>
+      </jar>
+   </target>
+   
    <target name="numberguess" depends="compile">
       <mkdir dir="${build.lib}" />
       
@@ -79,7 +116,7 @@
 
    </target>
 
-   <target name="_jars-weld" depends="numberguess, translator, plainEjbTranslator">
+   <target name="_jars-weld" depends="numberguess, translator, plainEjbTranslator,translatorWithManifestClasspath">
       <mkdir dir="${build.lib}" />
    </target>
   

Deleted: trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldPlainEjbTranslatorExampleUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldPlainEjbTranslatorExampleUnitTestCase.java	2010-09-14 02:31:32 UTC (rev 108130)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldPlainEjbTranslatorExampleUnitTestCase.java	2010-09-14 03:06:52 UTC (rev 108131)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.deployers.weld.test;
-
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.Test;
-
-/**
- * Same as WeldTranslatorExampleUnitTestCase, with the difference that this
- * test deploys an ear whose ejb jar file is a non-weld archive
- * (i.e, it lacks the META-INF/beans.xml).
- * This example asserts that Deployment.loadBeanDeploymentArchive works
- * correctly in such scenario.
- * 
- * 
- * @author <a href="mailto:flavia.rainone at jboss.com">Flavia Rainone</a>
- *
- */
-public class WeldPlainEjbTranslatorExampleUnitTestCase extends WeldExampleTest
-{
-   public WeldPlainEjbTranslatorExampleUnitTestCase(String test)
-   {
-      super(test);
-      setTestExpected(true);
-   }
-
-    @Override
-    protected URL getBaseURL() throws Exception {
-        return new URL(getBaseURLString() + getWebContextName() + "/home.jsf");
-    }
-    
-    @Override
-    protected Set<String> getExpectedDeployments(String topLevelDeployment, String exampleName)
-    {
-       final Set<String> expected = new HashSet<String>();
-       expected.add(topLevelDeployment);
-       expected.add(String.format(exampleJar, "translator-without-beans"));
-       expected.add(String.format(exampleWar, "translator"));
-       return expected;
-    }
-
-    public static Test suite() throws Exception
-   {
-      return deploy(WeldPlainEjbTranslatorExampleUnitTestCase.class, false);
-   }
-}
-

Added: trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java	2010-09-14 03:06:52 UTC (rev 108131)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.weld.test;
+
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+/**
+ * Same as WeldTranslatorExampleUnitTestCase, with the difference that this
+ * test deploys an ear whose ejb jar lacks the class SentenceParser. This class
+ * is located in the weld-translator-lib.jar, referenced in the classpath entry
+ * of the ejb-jar manifest file. The weld-translator-lib.jar contains
+ * the META-INF/beans.xml file and should be also scanned by the Weld deployers.
+ * 
+ * @author <a href="mailto:flavia.rainone at jboss.com">Flavia Rainone</a>
+ *
+ */
+public class WeldTranslatorManifestCPExampleUnitTestCase extends WeldExampleTest
+{
+   public WeldTranslatorManifestCPExampleUnitTestCase(String test)
+   {
+      super(test);
+      setTestExpected(true);
+   }
+
+    @Override
+    protected URL getBaseURL() throws Exception {
+        return new URL(getBaseURLString() + getWebContextName() + "/home.jsf");
+    }
+    
+    @Override
+    protected Set<String> getExpectedDeployments(String topLevelDeployment, String exampleName)
+    {
+       final Set<String> expected = new HashSet<String>();
+       expected.add(topLevelDeployment);
+       expected.add(String.format(exampleJar, "translator-manifestclasspath"));
+       expected.add(String.format(exampleWar, "translator"));
+       return expected;
+    }
+
+    public static Test suite() throws Exception
+   {
+      return deploy(WeldTranslatorManifestCPExampleUnitTestCase.class, false);
+   }
+}
+


Property changes on: trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java (from rev 108001, trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldPlainEjbTranslatorExampleUnitTestCase.java)
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java	2010-09-14 03:06:52 UTC (rev 108131)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.weld.test;
+
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+/**
+ * Same as WeldTranslatorExampleUnitTestCase, with the difference that this
+ * test deploys an ear whose ejb jar file is a non-weld archive
+ * (i.e, it lacks the META-INF/beans.xml).
+ * This example asserts that Deployment.loadBeanDeploymentArchive works
+ * correctly in such scenario.
+ * 
+ * 
+ * @author <a href="mailto:flavia.rainone at jboss.com">Flavia Rainone</a>
+ *
+ */
+public class WeldTranslatorPlainEjbExampleUnitTestCase extends WeldExampleTest
+{
+   public WeldTranslatorPlainEjbExampleUnitTestCase(String test)
+   {
+      super(test);
+      setTestExpected(true);
+   }
+
+    @Override
+    protected URL getBaseURL() throws Exception {
+        return new URL(getBaseURLString() + getWebContextName() + "/home.jsf");
+    }
+    
+    @Override
+    protected Set<String> getExpectedDeployments(String topLevelDeployment, String exampleName)
+    {
+       final Set<String> expected = new HashSet<String>();
+       expected.add(topLevelDeployment);
+       expected.add(String.format(exampleJar, "translator-without-beans"));
+       expected.add(String.format(exampleWar, "translator"));
+       return expected;
+    }
+
+    public static Test suite() throws Exception
+   {
+      return deploy(WeldTranslatorPlainEjbExampleUnitTestCase.class, false);
+   }
+}
+

Modified: trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml	2010-09-14 02:31:32 UTC (rev 108130)
+++ trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml	2010-09-14 03:06:52 UTC (rev 108131)
@@ -5,11 +5,11 @@
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
              version="5">
 
-  <display-name>weld-plainejbtranslator-ear</display-name>
+  <display-name>weld-translatorplainejb-ear</display-name>
   <module>
     <web>
       <web-uri>weld-translator.war</web-uri>
-      <context-root>/weld-plainejbtranslator</context-root>
+      <context-root>/weld-translatorplainejb</context-root>
     </web>
   </module>
   <module>

Added: trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml	2010-09-14 03:06:52 UTC (rev 108131)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<application xmlns="http://java.sun.com/xml/ns/javaee" 
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+             version="5">
+
+  <display-name>weld-translatormanifestcp-ear</display-name>
+  <module>
+    <web>
+      <web-uri>weld-translator.war</web-uri>
+      <context-root>/weld-translatormanifestcp</context-root>
+    </web>
+  </module>
+  <module>
+    <ejb>weld-translator-manifestclasspath.jar</ejb>
+  </module>
+</application>



More information about the jboss-cvs-commits mailing list