[maven-release-plugin] copy for tag maven-jar-plugin-3.0.0
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/tags/maven-jar-plugin-3.0.0@1740872 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index b451c81..65bc513 100644
--- a/pom.xml
+++ b/pom.xml
@@ -132,6 +132,13 @@
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>src/main/resources/META-INF/plexus</directory>
+ <filtering>true</filtering>
+ <targetPath>META-INF/plexus</targetPath>
+ </resource>
+ </resources>
<pluginManagement>
<plugins>
<plugin>
diff --git a/src/it/MJAR-183/invoker.properties b/src/it/MJAR-183/invoker.properties
new file mode 100644
index 0000000..5e07ba5
--- /dev/null
+++ b/src/it/MJAR-183/invoker.properties
@@ -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
diff --git a/src/it/MJAR-183/pom.xml b/src/it/MJAR-183/pom.xml
new file mode 100755
index 0000000..ede6b4a
--- /dev/null
+++ b/src/it/MJAR-183/pom.xml
@@ -0,0 +1,41 @@
+<?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-jar-plugin-test-mjar-183</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <description>MJAR-183 integration test</description>
+ <build>
+ <plugins>
+ <plugin>
+ <inherited>false</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/src/it/MJAR-183/src/main/java/A.java b/src/it/MJAR-183/src/main/java/A.java
new file mode 100755
index 0000000..474b0a6
--- /dev/null
+++ b/src/it/MJAR-183/src/main/java/A.java
@@ -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) {
+
+ }
+}
diff --git a/src/it/MJAR-183/verify.bsh b/src/it/MJAR-183/verify.bsh
new file mode 100644
index 0000000..a9aeea5
--- /dev/null
+++ b/src/it/MJAR-183/verify.bsh
@@ -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-jar-plugin-test-mjar-183-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;
diff --git a/src/it/MJAR-199-change-classifier/invoker.properties b/src/it/MJAR-199-change-classifier/invoker.properties
new file mode 100644
index 0000000..a644cb7
--- /dev/null
+++ b/src/it/MJAR-199-change-classifier/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.goals = clean package
diff --git a/src/it/MJAR-199-change-classifier/pom.xml b/src/it/MJAR-199-change-classifier/pom.xml
new file mode 100755
index 0000000..fd0d534
--- /dev/null
+++ b/src/it/MJAR-199-change-classifier/pom.xml
@@ -0,0 +1,52 @@
+<?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-jar-plugin-test-mjar-199</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <description>MJAR-199 integration test</description>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <classifier>xyz</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/src/it/MJAR-199-change-classifier/src/test/java/A.java b/src/it/MJAR-199-change-classifier/src/test/java/A.java
new file mode 100755
index 0000000..474b0a6
--- /dev/null
+++ b/src/it/MJAR-199-change-classifier/src/test/java/A.java
@@ -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) {
+
+ }
+}
diff --git a/src/it/MJAR-199-change-classifier/verify.bsh b/src/it/MJAR-199-change-classifier/verify.bsh
new file mode 100644
index 0000000..2f82c46
--- /dev/null
+++ b/src/it/MJAR-199-change-classifier/verify.bsh
@@ -0,0 +1,58 @@
+
+/*
+ * 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-jar-plugin-test-mjar-199-1.0-SNAPSHOT.jar" );
+ if ( !artifact.exists() )
+ {
+ System.err.println( "default artifact should exist." );
+ return false;
+ }
+
+ File artifact = new File( target, "maven-jar-plugin-test-mjar-199-1.0-SNAPSHOT-xyz.jar" );
+ if ( !artifact.exists() )
+ {
+ System.err.println( "test artifact should exist with classifier from pom file." );
+ return false;
+ }
+ return true;
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ return false;
+}
+
+return false;
diff --git a/src/it/MJAR-199/invoker.properties b/src/it/MJAR-199/invoker.properties
new file mode 100644
index 0000000..a644cb7
--- /dev/null
+++ b/src/it/MJAR-199/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.goals = clean package
diff --git a/src/it/MJAR-199/pom.xml b/src/it/MJAR-199/pom.xml
new file mode 100755
index 0000000..2fcaf99
--- /dev/null
+++ b/src/it/MJAR-199/pom.xml
@@ -0,0 +1,49 @@
+<?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-jar-plugin-test-mjar-199</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <description>MJAR-199 integration test</description>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/src/it/MJAR-199/src/test/java/A.java b/src/it/MJAR-199/src/test/java/A.java
new file mode 100755
index 0000000..474b0a6
--- /dev/null
+++ b/src/it/MJAR-199/src/test/java/A.java
@@ -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) {
+
+ }
+}
diff --git a/src/it/MJAR-199/verify.bsh b/src/it/MJAR-199/verify.bsh
new file mode 100644
index 0000000..18c8b25
--- /dev/null
+++ b/src/it/MJAR-199/verify.bsh
@@ -0,0 +1,58 @@
+
+/*
+ * 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-jar-plugin-test-mjar-199-1.0-SNAPSHOT.jar" );
+ if ( !artifact.exists() )
+ {
+ System.err.println( "default artifact should exist." );
+ return false;
+ }
+
+ File artifact = new File( target, "maven-jar-plugin-test-mjar-199-1.0-SNAPSHOT-tests.jar" );
+ if ( !artifact.exists() )
+ {
+ System.err.println( "test artifact should exist." );
+ return false;
+ }
+ return true;
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ return false;
+}
+
+return false;
diff --git a/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java b/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
index e087680..a70591e 100644
--- a/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
@@ -68,11 +68,9 @@
private File outputDirectory;
/**
- * Name of the generated JAR.<br/>
- * Starting with <b>3.0.0</b> the property has been renamed from <code>jar.finalName</code> to
- * <code>maven.jar.finalName</code>.
+ * Name of the generated JAR.
*/
- @Parameter( property = "maven.jar.finalName", defaultValue = "${project.build.finalName}" )
+ @Parameter( defaultValue = "${project.build.finalName}", readonly = true )
private String finalName;
/**
@@ -131,18 +129,20 @@
private boolean forceCreation;
/**
- * Skip creating empty archives.<br/>
- * Starting with <b>3.0.0</b> the property has been renamed from <code>jar.skipIfEmpty</code> to
- * <code>maven.jar.skipIfEmpty</code>.
+ * Skip creating empty archives.
*/
- @Parameter( property = "maven.jar.skipIfEmpty", defaultValue = "false" )
+ @Parameter( defaultValue = "false" )
private boolean skipIfEmpty;
/**
* Return the specific output directory to serve as the root for the archive.
+ * @return get classes directory.
*/
protected abstract File getClassesDirectory();
+ /**
+ * @return the {@link #project}
+ */
protected final MavenProject getProject()
{
return project;
@@ -150,11 +150,13 @@
/**
* Overload this to produce a jar with another classifier, for example a test-jar.
+ * @return get the classifier.
*/
protected abstract String getClassifier();
/**
* Overload this to produce a test-jar, for example.
+ * @return return the type.
*/
protected abstract String getType();
@@ -162,22 +164,22 @@
* Returns the Jar file to generate, based on an optional classifier.
*
* @param basedir the output directory
- * @param finalName the name of the ear file
+ * @param resultFinalName the name of the ear file
* @param classifier an optional classifier
* @return the file to generate
*/
- protected File getJarFile( File basedir, String finalName, String classifier )
+ protected File getJarFile( File basedir, String resultFinalName, String classifier )
{
if ( basedir == null )
{
throw new IllegalArgumentException( "basedir is not allowed to be null" );
}
- if ( finalName == null )
+ if ( resultFinalName == null )
{
throw new IllegalArgumentException( "finalName is not allowed to be null" );
}
- StringBuilder fileName = new StringBuilder( finalName );
+ StringBuilder fileName = new StringBuilder( resultFinalName );
if ( hasClassifier() )
{
@@ -191,6 +193,8 @@
/**
* Generates the JAR.
+ * @return The instance of File for the created archive file.
+ * @throws MojoExecutionException in case of an error.
*/
public File createArchive()
throws MojoExecutionException
@@ -230,6 +234,7 @@
/**
* Generates the JAR.
+ * @throws MojoExecutionException in case of an error.
*/
public void execute()
throws MojoExecutionException
diff --git a/src/main/java/org/apache/maven/plugins/jar/JarMojo.java b/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
index 2d0c5b5..4172028 100644
--- a/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
@@ -49,16 +49,19 @@
* If not given this will create the main artifact which is the default behavior.
* If you try to do that a second time without using a classifier the build will fail.
*/
- @Parameter( property = "maven.jar.classifier" )
+ @Parameter
private String classifier;
+ /**
+ * {@inheritDoc}
+ */
protected String getClassifier()
{
return classifier;
}
/**
- * @return type of the generated artifact
+ * {@inheritDoc}
*/
protected String getType()
{
@@ -66,7 +69,7 @@
}
/**
- * Return the main classes directory, so it's used as the root of the jar.
+ * {@inheritDoc}
*/
protected File getClassesDirectory()
{
diff --git a/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java b/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
index 5556b00..5c90449 100644
--- a/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
@@ -40,7 +40,7 @@
{
/**
- * Set this to <code>true</code> to bypass unit tests entirely. Its use is <b>NOT RECOMMENDED</b>, but quite
+ * Set this to <code>true</code> to bypass test-jar generation. Its use is <b>NOT RECOMMENDED</b>, but quite
* convenient on occasion.
*/
@Parameter( property = "maven.test.skip" )
@@ -55,16 +55,19 @@
/**
* Classifier to used for {@code test-jar}.
*/
- @Parameter( property = "maven.jar.testClassifier", defaultValue = "tests" )
+ @Parameter( defaultValue = "tests" )
private String classifier;
+ /**
+ * {@inheritDoc}
+ */
protected String getClassifier()
{
return classifier;
}
/**
- * @return type of the generated artifact
+ * {@inheritDoc}
*/
protected String getType()
{
@@ -72,13 +75,16 @@
}
/**
- * Return the test-classes directory, to serve as the root of the tests jar.
+ * {@inheritDoc}
*/
protected File getClassesDirectory()
{
return testClassesDirectory;
}
+ /**
+ * {@inheritDoc}
+ */
public void execute()
throws MojoExecutionException
{
diff --git a/src/main/resources/META-INF/plexus/components.xml b/src/main/resources/META-INF/plexus/components.xml
new file mode 100644
index 0000000..2665d7f
--- /dev/null
+++ b/src/main/resources/META-INF/plexus/components.xml
@@ -0,0 +1,101 @@
+<?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>
+ <!--
+ | JAR
+ -->
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>jar</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>jar</type>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+ <!--
+ | TEST JAR
+ |-->
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>test-jar</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <classifier>tests</classifier>
+ <extension>jar</extension>
+ <type>test-jar</type>
+ <packaging>jar</packaging>
+ <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.
+ -->
+ <component>
+ <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+ <role-hint>jar</role-hint>
+ <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
+ <configuration>
+ <lifecycles>
+ <lifecycle>
+ <id>default</id>
+ <!-- START SNIPPET: jar-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-jar-plugin:${project.version}:jar
+ </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: jar-lifecycle -->
+ </lifecycle>
+ </lifecycles>
+ </configuration>
+ </component>
+
+ </components>
+</component-set>