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 2016/05/02 19:43:19 UTC
svn commit: r1742014 - in /maven/plugins/trunk/maven-ejb-plugin: ./
filtered-resources/ filtered-resources/META-INF/
filtered-resources/META-INF/plexus/ src/it/MEJB-72/ src/it/MEJB-72/src/
src/it/MEJB-72/src/main/ src/it/MEJB-72/src/main/java/
Author: khmarbaise
Date: Mon May 2 17:43:07 2016
New Revision: 1742014
URL: http://svn.apache.org/viewvc?rev=1742014&view=rev
Log:
[MEJB-72] 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-ejb-plugin with extensions=true
the build will successfully end.
Added:
maven/plugins/trunk/maven-ejb-plugin/filtered-resources/
maven/plugins/trunk/maven-ejb-plugin/filtered-resources/META-INF/
maven/plugins/trunk/maven-ejb-plugin/filtered-resources/META-INF/plexus/
maven/plugins/trunk/maven-ejb-plugin/filtered-resources/META-INF/plexus/components.xml
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/invoker.properties
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/pom.xml (with props)
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/main/
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/main/java/
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/main/java/A.java (with props)
maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/verify.bsh
Modified:
maven/plugins/trunk/maven-ejb-plugin/pom.xml
Added: maven/plugins/trunk/maven-ejb-plugin/filtered-resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/filtered-resources/META-INF/plexus/components.xml?rev=1742014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/filtered-resources/META-INF/plexus/components.xml (added)
+++ maven/plugins/trunk/maven-ejb-plugin/filtered-resources/META-INF/plexus/components.xml Mon May 2 17:43:07 2016
@@ -0,0 +1,103 @@
+<?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>
+ <!--
+ | EJB
+ | -->
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>ejb</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>ejb</type>
+ <extension>jar</extension>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>ejb-client</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>ejb-client</type>
+ <extension>jar</extension>
+ <packaging>ejb</packaging>
+ <classifier>client</classifier>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <!--
+ | Defining the phases with their appropriate plugins
+ ! and versions which will be executed during the 'default'
+ ! life cycle.
+ -->
+ <!--
+ | EJB
+ | -->
+ <component>
+ <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+ <role-hint>ejb</role-hint>
+ <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
+ <configuration>
+ <lifecycles>
+ <lifecycle>
+ <id>default</id>
+ <!-- START SNIPPET: ejb-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-ejb-plugin:${project.version}:ejb
+ </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: ejb-lifecycle -->
+ </lifecycle>
+ </lifecycles>
+ </configuration>
+ </component>
+
+
+ </components>
+</component-set>
Modified: maven/plugins/trunk/maven-ejb-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/pom.xml?rev=1742014&r1=1742013&r2=1742014&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-ejb-plugin/pom.xml Mon May 2 17:43:07 2016
@@ -139,6 +139,15 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+
<profiles>
<profile>
<id>run-its</id>
Added: maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/invoker.properties?rev=1742014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/invoker.properties (added)
+++ maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/invoker.properties Mon May 2 17:43:07 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-ejb-plugin/src/it/MEJB-72/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/pom.xml?rev=1742014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/pom.xml (added)
+++ maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/pom.xml Mon May 2 17:43:07 2016
@@ -0,0 +1,47 @@
+<?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>
+ <parent>
+ <groupId>org.apache.maven.its.ejb</groupId>
+ <artifactId>maven-ejb-it-setup</artifactId>
+ <version>1.0</version>
+ </parent>
+
+ <groupId>org.apache.maven.its.ejb.default</groupId>
+ <artifactId>maven-it-mejb72</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <description>MEJB-72 integration test</description>
+ <build>
+ <plugins>
+ <plugin>
+ <inherited>false</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>@project.artifactId@</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Added: maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/main/java/A.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/main/java/A.java?rev=1742014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/main/java/A.java (added)
+++ maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/src/main/java/A.java Mon May 2 17:43:07 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-ejb-plugin/src/it/MEJB-72/src/main/java/A.java
------------------------------------------------------------------------------
svn:executable = *
Added: maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/verify.bsh?rev=1742014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/verify.bsh (added)
+++ maven/plugins/trunk/maven-ejb-plugin/src/it/MEJB-72/verify.bsh Mon May 2 17:43:07 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-it-mejb72-1.0-SNAPSHOT.jar" );
+ if ( !artifact.exists() )
+ {
+ System.err.println( "default artifact should exist." );
+ return false;
+ }
+
+ return true;
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ return false;
+}
+
+return false;