You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/03/09 19:19:19 UTC

[maven-ear-plugin] branch MEAR-261 updated (3279437 -> 16ce3cd)

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a change to branch MEAR-261
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git.


 discard 3279437  [MEAR-261] - In cases where fileNameMapping is used fail the build  o Added IT to check if it's working correct.  o Fixed other IT's which would fail otherwise and would    mask the real intention of the IT's.
     add 1c32f19  Fixed URL in link to Git repo.
     add 2568cd3  [MEAR-260] - Remove finalName as a parameter
     add 032dfa3  [MEAR-259] - Fix formatting date issues in apt files
     new 16ce3cd  [MEAR-261] - In cases where fileNameMapping is used fail the build  o Added IT to check if it's working correct.  o Fixed other IT's which would fail otherwise and would    mask the real intention of the IT's.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3279437)
            \
             N -- N -- N   refs/heads/MEAR-261 (16ce3cd)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/java/org/apache/maven/plugins/ear/EarMojo.java               | 2 +-
 src/site/apt/examples/customize-file-name-mapping.apt.vm              | 2 +-
 src/site/apt/examples/customizing-a-module-filename.apt.vm            | 2 +-
 src/site/apt/examples/customizing-context-root.apt.vm                 | 2 +-
 src/site/apt/examples/customizing-module-uri.apt.vm                   | 2 +-
 src/site/apt/examples/eclipse-and-maven-integration.apt.vm            | 4 ++--
 src/site/apt/examples/excluding-a-module.apt.vm                       | 2 +-
 src/site/apt/examples/filtering-advanced.apt.vm                       | 2 +-
 src/site/apt/examples/filtering-sources.apt.vm                        | 2 +-
 src/site/apt/examples/generating-jboss-app.apt.vm                     | 2 +-
 src/site/apt/examples/generating-modules-id.apt.vm                    | 2 +-
 .../including-a-third-party-library-in-application-xml.apt.vm         | 2 +-
 .../specifying-env-entries-for-the-generated-application-xml.apt.vm   | 2 +-
 ...ying-resource-ref-entries-for-the-generated-application-xml.apt.vm | 2 +-
 ...specifying-security-roles-for-the-generated-application-xml.apt.vm | 2 +-
 src/site/apt/examples/unpacking-a-module.apt.vm                       | 2 +-
 src/site/apt/examples/using-app-client.apt.vm                         | 2 +-
 src/site/apt/modules.apt.vm                                           | 2 +-
 src/site/apt/tests.apt                                                | 4 ++--
 19 files changed, 21 insertions(+), 21 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.

[maven-ear-plugin] 01/01: [MEAR-261] - In cases where fileNameMapping is used fail the build o Added IT to check if it's working correct. o Fixed other IT's which would fail otherwise and would mask the real intention of the IT's.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MEAR-261
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git

commit 16ce3cdd91b78e0d453d3a932df486212a404718
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Thu Mar 8 21:05:09 2018 +0100

    [MEAR-261] - In cases where fileNameMapping is used fail the build
     o Added IT to check if it's working correct.
     o Fixed other IT's which would fail otherwise and would
       mask the real intention of the IT's.
---
 .../ear-module/pom.xml                             |  1 -
 .../filenamemapping-usage-fail/invoker.properties  | 18 +++++++++++
 src/it/filenamemapping-usage-fail/pom.xml          | 36 ++++++++++++++++++++++
 src/it/filenamemapping-usage-fail/verify.groovy    | 32 +++++++++++++++++++
 .../war-module}/pom.xml                            | 26 +++-------------
 .../war-module/src/main/webapp/WEB-INF/web.xml     | 23 ++++++++++++++
 .../ear-module/pom.xml                             |  1 -
 .../apache/maven/plugins/ear/AbstractEarMojo.java  |  8 +++++
 src/test/resources/projects/project-035/pom.xml    |  1 -
 src/test/resources/projects/project-078/pom.xml    |  1 -
 10 files changed, 122 insertions(+), 25 deletions(-)

diff --git a/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml b/src/it/filenamemapping-usage-fail/ear-module/pom.xml
similarity index 94%
copy from src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml
copy to src/it/filenamemapping-usage-fail/ear-module/pom.xml
index 8b860dd..0cfc8c5 100644
--- a/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml
+++ b/src/it/filenamemapping-usage-fail/ear-module/pom.xml
@@ -54,7 +54,6 @@ under the License.
             ! Only artifactId.extension
             ! no groupId/version etc. 
            -->
-          <outputFileNameMapping>@{artifactId}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
           <fileNameMapping>no-version</fileNameMapping>
         </configuration>
       </plugin>
diff --git a/src/it/filenamemapping-usage-fail/invoker.properties b/src/it/filenamemapping-usage-fail/invoker.properties
new file mode 100644
index 0000000..f2a7dfb
--- /dev/null
+++ b/src/it/filenamemapping-usage-fail/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.buildResult = failure
diff --git a/src/it/filenamemapping-usage-fail/pom.xml b/src/it/filenamemapping-usage-fail/pom.xml
new file mode 100644
index 0000000..d8b6339
--- /dev/null
+++ b/src/it/filenamemapping-usage-fail/pom.xml
@@ -0,0 +1,36 @@
+<?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.skinnywars</groupId>
+  <artifactId>pom</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <description>Test MEAR-261</description>
+
+  <modules>
+      <module>ear-module</module>
+      <module>war-module</module>
+  </modules>
+</project>
diff --git a/src/it/filenamemapping-usage-fail/verify.groovy b/src/it/filenamemapping-usage-fail/verify.groovy
new file mode 100644
index 0000000..96b6b37
--- /dev/null
+++ b/src/it/filenamemapping-usage-fail/verify.groovy
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+def buildLog = new File( basedir, "build.log" ).getText('UTF-8')
+
+if (!buildLog.contains ( '[ERROR] fileNameMapping has been removed with version 3.0.0. You are still using it.' )) {
+  println ( "missing output about fileNameMapping removement.")
+  return false
+}
+if (!buildLog.contains ( '[ERROR] Use outputFileNameMapping instead.' )) {
+  println ( "missing information about usage today.")
+  return false
+}
+
+
+return true;
diff --git a/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml b/src/it/filenamemapping-usage-fail/war-module/pom.xml
similarity index 59%
copy from src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml
copy to src/it/filenamemapping-usage-fail/war-module/pom.xml
index 8b860dd..c6be50e 100644
--- a/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml
+++ b/src/it/filenamemapping-usage-fail/war-module/pom.xml
@@ -23,9 +23,9 @@ under the License.
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.apache.maven.its.ear.skinnywars</groupId>
-  <artifactId>ear-module</artifactId>
+  <artifactId>war-module</artifactId>
   <version>1.0</version>
-  <packaging>ear</packaging>
+  <packaging>war</packaging>
 
   <dependencies>
     <dependency>
@@ -33,30 +33,14 @@ under the License.
       <artifactId>commons-lang</artifactId>
       <version>2.5</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven.its.ear.skinnywars</groupId>
-      <artifactId>war-module</artifactId>
-      <version>1.0</version>
-      <type>war</type>
-    </dependency>
   </dependencies>
 
   <build>
     <plugins>
       <plugin>
-        <groupId>@project.groupId@</groupId>
-        <artifactId>@project.artifactId@</artifactId>
-        <version>@project.version@</version>
-        <configuration>
-          <skinnyWars>true</skinnyWars>
-          <defaultLibBundleDir>lib/</defaultLibBundleDir>
-          <!--
-            ! Only artifactId.extension
-            ! no groupId/version etc. 
-           -->
-          <outputFileNameMapping>@{artifactId}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
-          <fileNameMapping>no-version</fileNameMapping>
-        </configuration>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.1.1</version>
       </plugin>
     </plugins>
   </build>
diff --git a/src/it/filenamemapping-usage-fail/war-module/src/main/webapp/WEB-INF/web.xml b/src/it/filenamemapping-usage-fail/war-module/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..c1af95d
--- /dev/null
+++ b/src/it/filenamemapping-usage-fail/war-module/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app >
+</web-app>
diff --git a/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml b/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml
index 8b860dd..474fcf1 100644
--- a/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml
+++ b/src/it/skinny-wars-filenamemapping-no-version/ear-module/pom.xml
@@ -55,7 +55,6 @@ under the License.
             ! no groupId/version etc. 
            -->
           <outputFileNameMapping>@{artifactId}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
-          <fileNameMapping>no-version</fileNameMapping>
         </configuration>
       </plugin>
     </plugins>
diff --git a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
index f8285d9..5488426 100644
--- a/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/AbstractEarMojo.java
@@ -173,6 +173,14 @@ public abstract class AbstractEarMojo
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        if ( fileNameMapping != null )
+        {
+            getLog().error( "fileNameMapping has been removed with version 3.0.0. You are still using it." );
+            getLog().error( "Use outputFileNameMapping instead." );
+            throw new MojoExecutionException( "fileNameMapping has ben removed with version 3.0.0 "
+                + "but you are still using it." );
+        }
+
         final JavaEEVersion javaEEVersion = JavaEEVersion.getJavaEEVersion( version );
         getLog().debug( "Resolving artifact type mappings ..." );
         ArtifactTypeMappingService typeMappingService;
diff --git a/src/test/resources/projects/project-035/pom.xml b/src/test/resources/projects/project-035/pom.xml
index 6ee0f6f..4556e4f 100644
--- a/src/test/resources/projects/project-035/pom.xml
+++ b/src/test/resources/projects/project-035/pom.xml
@@ -65,7 +65,6 @@ under the License.
         <artifactId>maven-ear-plugin</artifactId>
         <version>@project.version@</version>
         <configuration>
-          <fileNameMapping>full</fileNameMapping>
           <defaultLibBundleDir>libs</defaultLibBundleDir>
           <modules>
             <sarModule>
diff --git a/src/test/resources/projects/project-078/pom.xml b/src/test/resources/projects/project-078/pom.xml
index cbf7c74..2fd5d5d 100644
--- a/src/test/resources/projects/project-078/pom.xml
+++ b/src/test/resources/projects/project-078/pom.xml
@@ -54,7 +54,6 @@ under the License.
         <configuration>
           <version>1.3</version>
           <outputFileNameMapping>@{artifactId}@.@{extension}@</outputFileNameMapping>
-          <fileNameMapping>no-version-for-ejb</fileNameMapping>
         </configuration>
       </plugin>
     </plugins>

-- 
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.