maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject svn commit: r1741757 - in /maven/plugins/trunk/maven-war-plugin: ./ src/it/MWAR-326/ src/it/MWAR-326/src/ src/it/MWAR-326/src/main/ src/it/MWAR-326/src/main/java/ src/main/filtered-resources/ src/main/filtered-resources/META-INF/ src/main/filtered-reso...
Date Sat, 30 Apr 2016 12:18:34 GMT
Author: khmarbaise
Date: Sat Apr 30 12:18:33 2016
New Revision: 1741757

URL: http://svn.apache.org/viewvc?rev=1741757&view=rev
Log:
[MWAR-326] Add LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
 o Added components.xml which contains
   ArtifactHandler mapping and life cycle mapping and
   the appropriate plugin versions.
 o Added basic integration tests which checks if
   by using the maven-war-plugin with extensions=true
   the build will successfully end.

Added:
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/invoker.properties
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/pom.xml   (with props)
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/java/
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/java/A.java   (with props)
    maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/verify.bsh
    maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/
    maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/META-INF/
    maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/META-INF/plexus/
    maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/META-INF/plexus/components.xml
Modified:
    maven/plugins/trunk/maven-war-plugin/pom.xml

Modified: maven/plugins/trunk/maven-war-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/pom.xml?rev=1741757&r1=1741756&r2=1741757&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/pom.xml Sat Apr 30 12:18:33 2016
@@ -165,6 +165,12 @@
   </dependencies>
 
   <build>
+    <resources>
+      <resource>
+        <directory>src/main/filtered-resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
     <pluginManagement>
       <plugins>
         <plugin>

Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/invoker.properties?rev=1741757&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/invoker.properties (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/invoker.properties Sat Apr 30 12:18:33
2016
@@ -0,0 +1,19 @@
+# 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.description = This test only checks if using extensions works without any issue.
+invoker.goals = clean package

Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/pom.xml?rev=1741757&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/pom.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/pom.xml Sat Apr 30 12:18:33 2016
@@ -0,0 +1,46 @@
+<?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
+  xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-war-plugin-test-mwar-326</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+  <name>Maven Integration Test :: MWAR-326</name> 
+  <description>MWAR-326 integration test</description>
+  <build>
+    <plugins>
+      <plugin>
+        <inherited>false</inherited>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>@project.version@</version>
+        <extensions>true</extensions>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/java/A.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/java/A.java?rev=1741757&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/java/A.java (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/java/A.java Sat Apr 30 12:18:33
2016
@@ -0,0 +1,25 @@
+
+/*
+ * 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.
+ */
+
+public class A {
+    public static void main(String[] args) {
+
+    }
+}

Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/src/main/java/A.java
------------------------------------------------------------------------------
    svn:executable = *

Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/verify.bsh?rev=1741757&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/verify.bsh (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-326/verify.bsh Sat Apr 30 12:18:33 2016
@@ -0,0 +1,52 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+
+    File artifact = new File( target, "maven-war-plugin-test-mwar-326-1.0-SNAPSHOT.war" );
+    if ( !artifact.exists() )
+    {
+        System.err.println( "default artifact should exist." );
+        return false;
+    }
+
+    return true;
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    return false;
+}
+
+return false;

Added: maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/META-INF/plexus/components.xml?rev=1741757&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/META-INF/plexus/components.xml
(added)
+++ maven/plugins/trunk/maven-war-plugin/src/main/filtered-resources/META-INF/plexus/components.xml
Sat Apr 30 12:18:33 2016
@@ -0,0 +1,89 @@
+<?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.
+-->
+
+<component-set>
+  <components>
+    <!--
+     | WAR
+     |-->
+    <component>
+      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+      <role-hint>war</role-hint>
+      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+      <configuration>
+        <type>war</type>
+        <includesDependencies>true</includesDependencies>
+        <language>java</language>
+        <addedToClasspath>false</addedToClasspath>
+      </configuration>
+    </component>
+
+    <!--
+      | Defining the phases with their appropriate plugins
+      ! and versions which will be executed during the 'default'
+      ! life cycle.
+    -->
+    <!--
+     | WAR
+     |-->
+    <component>
+      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+      <role-hint>war</role-hint>
+      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
+      <configuration>
+        <lifecycles>
+          <lifecycle>
+            <id>default</id>
+            <!-- START SNIPPET: war-lifecycle -->
+            <phases>
+              <process-resources>
+                org.apache.maven.plugins:maven-resources-plugin:2.7:resources
+              </process-resources>
+              <compile>
+                org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
+              </compile>
+              <process-test-resources>
+                org.apache.maven.plugins:maven-resources-plugin:2.7:testResources
+              </process-test-resources>
+              <test-compile>
+                org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile
+              </test-compile>
+              <test>
+                org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test
+              </test>
+              <package>
+                org.apache.maven.plugins:maven-war-plugin:${project.version}:war
+              </package>
+              <install>
+                org.apache.maven.plugins:maven-install-plugin:2.5.2:install
+              </install>
+              <deploy>
+                org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
+              </deploy>
+            </phases>
+            <!-- END SNIPPET: war-lifecycle -->
+          </lifecycle>
+        </lifecycles>
+      </configuration>
+    </component>
+
+  </components>
+</component-set>



Mime
View raw message