Author: bentmann
Date: Wed Mar 17 17:48:26 2010
New Revision: 924384

URL: http://svn.apache.org/viewvc?rev=924384&view=rev
Log:
[MEJB-46] classpath entry is missing in ejb MANIFEST when using Maven 
3.0-alpha-7

Added:
    maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/   (with 
props)
    maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/pom.xml   
(with props)
    maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/   (with 
props)
    maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/   
(with props)
    
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/
   (with props)
    
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/it.properties
   (with props)
    maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/verify.bsh   
(with props)
Modified:
    
maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java

Propchange: maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Mar 17 17:48:26 2010
@@ -0,0 +1 @@
+MEJB-\d+

Propchange: maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/pom.xml?rev=924384&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/pom.xml 
(added)
+++ maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/pom.xml Wed 
Mar 17 17:48:26 2010
@@ -0,0 +1,64 @@
+<?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.ejb.mc</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <packaging>ejb</packaging>
+
+  <name>Integration Test</name> 
+  <description>
+    Test the generation of the Class-Path attribute for the MANIFEST.MF 
(MEJB-46).
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.2</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ejb-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <ejbVersion>3.0</ejbVersion>
+          <archive>
+            <manifest>
+              <addClasspath>true</addClasspath>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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

Propchange: maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Mar 17 17:48:26 2010
@@ -0,0 +1 @@
+MEJB-\d+

Propchange: maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Mar 17 17:48:26 2010
@@ -0,0 +1 @@
+MEJB-\d+

Propchange: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Mar 17 17:48:26 2010
@@ -0,0 +1 @@
+MEJB-\d+

Propchange: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/it.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/it.properties?rev=924384&view=auto
==============================================================================
    (empty)

Propchange: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/it.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/src/main/resources/it.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/verify.bsh?rev=924384&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/verify.bsh 
(added)
+++ maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/verify.bsh 
Wed Mar 17 17:48:26 2010
@@ -0,0 +1,22 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+File jarFile = new File( basedir, "target/test-1.0.jar" );
+System.out.println( "Checking for existence of " + jarFile );
+if ( !jarFile.isFile() )
+{
+    throw new FileNotFoundException( "Missing " + jarFile );
+}
+
+JarFile jar = new JarFile( jarFile );
+
+Manifest mf = jar.getManifest();
+String classpath = mf.getMainAttributes().getValue( Attributes.Name.CLASS_PATH 
);
+if ( classpath == null || classpath.indexOf( "junit-3.8.2.jar" ) < 0 )
+{
+    throw new IllegalStateException( "Bad Class-Path " + classpath );
+}
+
+jar.close();

Propchange: 
maven/plugins/trunk/maven-ejb-plugin/src/it/manifest-classpath/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

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

Modified: 
maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java?rev=924384&r1=924383&r2=924384&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
 Wed Mar 17 17:48:26 2010
@@ -40,6 +40,7 @@ import java.util.List;
  * @author <a href="eveni...@apache.org">Emmanuel Venisse</a>
  * @version $Id$
  * @goal ejb
+ * @requiresDependencyResolution runtime
  * @phase package
  */
 public class EjbMojo


Reply via email to