Author: krosenvold
Date: Tue Feb 21 08:51:51 2012
New Revision: 1291662

URL: http://svn.apache.org/viewvc?rev=1291662&view=rev
Log:
Revert "MEAR-141: Fix String.isEmpty() signature"

The build was failing on 32 bit linux (Not 64 bit).

I'm reopening MEAR-141

Removed:
    
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EnvEntry.java
    
maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/specifying-env-entries-for-the-generated-application-xml.apt.vm
    
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/EnvEntryTest.java
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-074/expected-META-INF/application.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-074/pom.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-075/expected-META-INF/application.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-075/pom.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-076/expected-META-INF/application.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-076/pom.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-077/expected-META-INF/application.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-077/pom.xml
Modified:
    maven/plugins/trunk/maven-ear-plugin/pom.xml
    
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriter.java
    
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriterContext.java
    
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java
    
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java
    maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt
    maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt
    maven/plugins/trunk/maven-ear-plugin/src/site/site.xml
    
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java

Modified: maven/plugins/trunk/maven-ear-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/pom.xml?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-ear-plugin/pom.xml Tue Feb 21 08:51:51 2012
@@ -119,7 +119,7 @@ under the License.
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.8.1</version>
+      <version>3.8.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriter.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriter.java?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriter.java
 (original)
+++ 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriter.java
 Tue Feb 21 08:51:51 2012
@@ -111,14 +111,6 @@ final class ApplicationXmlWriter
             securityRole.appendSecurityRole( writer );
         }
 
-        if ( version.ge( JavaEEVersion.Six ) )
-        {
-            for ( EnvEntry envEntry : context.getEnvEntries() )
-            {
-                envEntry.appendEnvEntry( writer );
-            }
-        }
-        
         if ( version.ge( JavaEEVersion.Five ) )
         {
             writeLibraryDirectory( context.getLibraryDirectory(), writer );

Modified: 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriterContext.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriterContext.java?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriterContext.java
 (original)
+++ 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/ApplicationXmlWriterContext.java
 Tue Feb 21 08:51:51 2012
@@ -36,8 +36,6 @@ class ApplicationXmlWriterContext
     private final List<EarModule> earModules;
 
     private final List<SecurityRole> securityRoles;
-    
-    private final List<EnvEntry> envEntries;
 
     private final String displayName;
 
@@ -49,15 +47,13 @@ class ApplicationXmlWriterContext
 
     private final Boolean initializeInOrder;
 
-    public ApplicationXmlWriterContext( File destinationFile, List<EarModule> 
earModules, List<SecurityRole> securityRoles, 
-                                        List<EnvEntry> envEntries, String 
displayName,
+    public ApplicationXmlWriterContext( File destinationFile, List<EarModule> 
earModules, List<SecurityRole> securityRoles, String displayName,
                                         String description, String 
libraryDirectory, String applicationName,
                                         Boolean initializeInOrder )
     {
         this.destinationFile = destinationFile;
         this.earModules = earModules;
         this.securityRoles = securityRoles;
-        this.envEntries = envEntries;
         this.displayName = displayName;
         this.description = description;
         this.libraryDirectory = libraryDirectory;
@@ -96,16 +92,6 @@ class ApplicationXmlWriterContext
     }
 
     /**
-     * Returns the list of {@link EnvEntry} instances (as per JavaEE 6).
-     *
-     * @return the env-entry elements
-     */
-    public List<EnvEntry> getEnvEntries()
-    {
-        return envEntries;
-    }
-    
-    /**
      * Returns the display name.
      *
      * @return the display name

Modified: 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/GenerateApplicationXmlMojo.java
 Tue Feb 21 08:51:51 2012
@@ -104,15 +104,7 @@ public class GenerateApplicationXmlMojo
      * @parameter
      */
     private PlexusConfiguration security;
-    
-    /**
-     * The env-entries to be added to the auto-generated
-     * application.xml file. Since JavaEE6.
-     *
-     * @parameter alias="env-entries"
-     */
-    private PlexusConfiguration envEntries;
-    
+
 
     public void execute()
         throws MojoExecutionException, MojoFailureException
@@ -198,8 +190,8 @@ public class GenerateApplicationXmlMojo
 
         final ApplicationXmlWriter writer = new ApplicationXmlWriter( 
javaEEVersion, encoding, generateModuleId );
         final ApplicationXmlWriterContext context =
-            new ApplicationXmlWriterContext( descriptor, getModules(), 
buildSecurityRoles(), buildEnvEntries(), displayName,
-                                             description, defaultLibBundleDir, 
applicationName, initializeInOrder );
+            new ApplicationXmlWriterContext( descriptor, getModules(), 
buildSecurityRoles(), displayName, description,
+                                             defaultLibBundleDir, 
applicationName, initializeInOrder );
         writer.write( context );
     }
 
@@ -267,46 +259,4 @@ public class GenerateApplicationXmlMojo
         }
 
     }
-    /**
-     * Builds the env-entries based on the configuration.
-     *
-     * @return a list of EnvEntry object(s)
-     * @throws EarPluginException if the configuration is invalid
-     */
-    private List<EnvEntry> buildEnvEntries()
-    throws EarPluginException
-    {
-        final List<EnvEntry> result = new ArrayList<EnvEntry>();
-        if ( envEntries == null )
-        {
-            return result;
-        }
-        try
-        {
-            final PlexusConfiguration[] allEnvEntries = 
envEntries.getChildren( EnvEntry.ENV_ENTRY );
-            
-            for ( PlexusConfiguration envEntry : allEnvEntries )
-            {
-                final String description = envEntry.getChild( 
EnvEntry.DESCRIPTION ).getValue();
-                final String envEntryName = envEntry.getChild( 
EnvEntry.ENV_ENTRY_NAME ).getValue();
-                final String envEntryType = envEntry.getChild( 
EnvEntry.ENV_ENTRY_TYPE ).getValue();
-                final String envEntryValue = envEntry.getChild( 
EnvEntry.ENV_ENTRY_VALUE ).getValue();
-
-                try
-                {
-                    result.add( new EnvEntry( description, envEntryName, 
envEntryType, envEntryValue ) );
-                }
-                catch ( IllegalArgumentException e )
-                {
-                    throw new EarPluginException( "Invalid env-entry [" + 
envEntry + "]", e );
-                }
-            }
-            return result;
-        }
-        catch ( PlexusConfigurationException e )
-        {
-            throw new EarPluginException( "Invalid env-entry configuration", e 
);
-        }
-        
-    }
 }
\ No newline at end of file

Modified: 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java
 (original)
+++ 
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/JavaEEVersion.java
 Tue Feb 21 08:51:51 2012
@@ -45,22 +45,22 @@ public class JavaEEVersion
     /**
      * Represents the J2EE 1.3 version.
      */
-    public static final JavaEEVersion OneDotThree = new JavaEEVersion( 0, 
VERSION_1_3 );
+    public static final JavaEEVersion OneDotThree = new JavaEEVersion( new 
Integer( 0 ), VERSION_1_3 );
 
     /**
      * Represents the J2EE 1.4 version.
      */
-    public static final JavaEEVersion OneDotFour = new JavaEEVersion( 1, 
VERSION_1_4 );
+    public static final JavaEEVersion OneDotFour = new JavaEEVersion( new 
Integer( 1 ), VERSION_1_4 );
 
     /**
      * Represents the JavaEE 5 version.
      */
-    public static final JavaEEVersion Five = new JavaEEVersion( 2, VERSION_5 );
+    public static final JavaEEVersion Five = new JavaEEVersion( new Integer( 2 
), VERSION_5 );
 
     /**
      * Represents the JavaEE 7 version.
      */
-    public static final JavaEEVersion Six = new JavaEEVersion( 3, VERSION_6 );
+    public static final JavaEEVersion Six = new JavaEEVersion( new Integer( 3 
), VERSION_6 );
 
 
     private final Integer index;
@@ -81,7 +81,7 @@ public class JavaEEVersion
         {
             throw new InvalidJavaEEVersion( "Invalid version [" + version + 
"]", version );
         }
-        return versionsMap.get( version );
+        return (JavaEEVersion) versionsMap.get( version );
     }
 
     /**

Modified: maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/index.apt Tue Feb 21 
08:51:51 2012
@@ -124,9 +124,6 @@ Maven EAR Plugin
   * 
{{{./examples/specifying-security-roles-for-the-generated-application-xml.html}
   Specifying Security Roles For The Generated application.xml}}
 
-  * 
{{{./examples/specifying-env-entries-for-the-generated-application-xml.html}
-    Specifying Environment Entries For The Generated application.xml}}
-
   * {{{./examples/generating-jboss-app.html} Generating the jboss-app.xml 
file}}
 
   * {{{./examples/generating-modules-id.html} Generating modules id}}

Modified: maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt Tue Feb 21 
08:51:51 2012
@@ -175,11 +175,3 @@ EAR Plugin Tests
   * project-072: builds an EAR with an application client module (app-client)
 
   * project-073: builds an EAR with an application client module (app-client) 
and a default bundle directory for _java_ modules
-
-  * project-074: builds an EAR with custom env entries settings and J2EE 1.3 
(Not supported by the specification)
-
-  * project-075: builds an EAR with custom env entries settings and J2EE 1.4 
(Not supported by the specification)
-
-  * project-076: builds an EAR with custom env entries settings and JavaEE 5 
(Not supported by the specification)
-
-  * project-077: builds an EAR with custom env entries settings and JavaEE 6

Modified: maven/plugins/trunk/maven-ear-plugin/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/site.xml?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/site.xml Tue Feb 21 08:51:51 
2012
@@ -34,19 +34,18 @@ under the License.
     </menu>
 
     <menu name="Examples">
-      <item name="Filtering EAR resources" 
href="examples/filtering-sources.html"/>
-      <item name="Advanced filtering techniques" 
href="examples/filtering-advanced.html"/>
-      <item name="Creating skinny WARs" href="examples/skinny-wars.html"/>
-      <item name="Customizing a module filename" 
href="examples/customizing-a-module-filename.html"/>
-      <item name="Customizing the context root" 
href="examples/customizing-context-root.html"/>
-      <item name="Customizing a module location" 
href="examples/customizing-module-location.html"/>
-      <item name="Customizing a module URI" 
href="examples/customizing-module-uri.html"/>
-      <item name="Excluding a module" href="examples/excluding-a-module.html"/>
-      <item name="Excluding files from the EAR" 
href="examples/excluding-files-from-ear.html"/>
-      <item name="Unpacking a module" href="examples/unpacking-a-module.html"/>
-      <item name="Including a third party library in application.xml" 
href="examples/including-a-third-party-library-in-application-xml.html"/>
-      <item name="Specifying Security Roles in application.xml" 
href="examples/specifying-security-roles-for-the-generated-application-xml.html"/>
-      <item name="Specifying Environment Entries in application.xml" 
href="examples/specifying-env-entries-for-the-generated-application-xml.html"/>
+      <item name="Filtering EAR Resources" 
href="examples/filtering-sources.html"/>
+      <item name="Advanced Filtering Techniques" 
href="examples/filtering-advanced.html"/>
+      <item name="Creating Skinny WARs" href="examples/skinny-wars.html"/>
+      <item name="Customizing A Module Filename" 
href="examples/customizing-a-module-filename.html"/>
+      <item name="Customizing The Context Root" 
href="examples/customizing-context-root.html"/>
+      <item name="Customizing A Module Location" 
href="examples/customizing-module-location.html"/>
+      <item name="Customizing A Module URI" 
href="examples/customizing-module-uri.html"/>
+      <item name="Excluding A Module" href="examples/excluding-a-module.html"/>
+      <item name="Excluding Files From the EAR" 
href="examples/excluding-files-from-ear.html"/>
+      <item name="Unpacking A Module" href="examples/unpacking-a-module.html"/>
+      <item name="Including A Third Party Library In application.xml" 
href="examples/including-a-third-party-library-in-application-xml.html"/>
+      <item name="Specifying Security Roles For The Generated application.xml" 
href="examples/specifying-security-roles-for-the-generated-application-xml.html"/>
       <item name="Generating jboss-app.xml" 
href="examples/generating-jboss-app.html"/>
       <item name="Customize file name mapping" 
href="examples/customize-file-name-mapping.html"/>
       <item name="Generating modules ID" 
href="examples/generating-modules-id.html"/>

Modified: 
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java?rev=1291662&r1=1291661&r2=1291662&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
 (original)
+++ 
maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
 Tue Feb 21 08:51:51 2012
@@ -773,43 +773,4 @@ public class EarMojoIT
             "APP-INF/lib/jar-sample-one-1.0.jar", 
"APP-INF/lib/jar-sample-two-1.0.jar" } );
     }
 
-    /**
-     * Builds an EAR with custom env entries settings and J2EE 1.3. Not 
supported by the specification
-     * so this should be ignored.
-     */
-    public void testProject074()
-        throws Exception
-    {
-        doTestProject( "project-074", new String[]{ "ejb-sample-one-1.0.jar", 
"ejb-sample-two-1.0.jar" } );
-    }
-
-    /**
-     * Builds an EAR with custom env entries settings and J2EE 1.4. Not 
supported by the specification
-     * so this should be ignored.
-     */
-    public void testProject075()
-        throws Exception
-    {
-        doTestProject( "project-075", new String[]{ "ejb-sample-one-1.0.jar", 
"ejb-sample-two-1.0.jar" } );
-    }
-
-    /**
-     * Builds an EAR with custom env entries settings and JavaEE 5. Not 
supported by the specification
-     * so this should be ignored.
-     */
-    public void testProject076()
-        throws Exception
-    {
-        doTestProject( "project-076", new String[]{ "ejb-sample-one-1.0.jar", 
"ejb-sample-two-1.0.jar" } );
-    }
-
-    /**
-     * Builds an EAR with custom env entries settings and JavaEE 6.
-     */
-    public void testProject077()
-        throws Exception
-    {
-        doTestProject( "project-077", new String[]{ "ejb-sample-one-1.0.jar", 
"ejb-sample-two-1.0.jar" } );
-    }
-
 }


Reply via email to