From 6de708da599bc3d97e20342aa0ed4bcd7acbbbba Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Fri, 6 May 2005 00:36:00 +0000 Subject: [PATCH] IT for testing failure when duplicate goal names are specified in multiple mojos... git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168483 13f79535-47bb-0310-9956-ffa450edef68 --- maven-core-it/it1005/expected-results.txt | 0 maven-core-it/it1005/goals.txt | 2 + maven-core-it/it1005/pom.xml | 16 ++++++++ .../maven/plugin/coreit/CoreIt1005Mojo.java | 41 +++++++++++++++++++ .../maven/plugin/coreit/CoreIt1005Mojo2.java | 41 +++++++++++++++++++ 5 files changed, 100 insertions(+) create mode 100644 maven-core-it/it1005/expected-results.txt create mode 100644 maven-core-it/it1005/goals.txt create mode 100644 maven-core-it/it1005/pom.xml create mode 100644 maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo.java create mode 100644 maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo2.java diff --git a/maven-core-it/it1005/expected-results.txt b/maven-core-it/it1005/expected-results.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/maven-core-it/it1005/goals.txt b/maven-core-it/it1005/goals.txt new file mode 100644 index 0000000000..8af8e5c4ea --- /dev/null +++ b/maven-core-it/it1005/goals.txt @@ -0,0 +1,2 @@ +clean:clean +package diff --git a/maven-core-it/it1005/pom.xml b/maven-core-it/it1005/pom.xml new file mode 100644 index 0000000000..bac667acbf --- /dev/null +++ b/maven-core-it/it1005/pom.xml @@ -0,0 +1,16 @@ + + 4.0.0 + org.apache.maven.plugins + maven-it1005-plugin + maven-plugin + 1.0-SNAPSHOT + + + org.apache.maven + maven-plugin-api + 2.0-SNAPSHOT + jar + compile + + + diff --git a/maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo.java b/maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo.java new file mode 100644 index 0000000000..40846c2692 --- /dev/null +++ b/maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo.java @@ -0,0 +1,41 @@ +package org.apache.maven.plugin.coreit; + +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed 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 org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +/** + * @goal it1005 + * + * @description test for goal collision. This is copy #2 + * + */ +public class CoreIt1005Mojo + extends AbstractMojo +{ + + public void execute() + throws MojoExecutionException + { + System.out.println( "Test mojo (copy 2)." ); + } +} diff --git a/maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo2.java b/maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo2.java new file mode 100644 index 0000000000..f3026abea0 --- /dev/null +++ b/maven-core-it/it1005/src/main/java/org/apache/maven/plugin/coreit/CoreIt1005Mojo2.java @@ -0,0 +1,41 @@ +package org.apache.maven.plugin.coreit; + +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed 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 org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +/** + * @goal it1005 + * + * @description test for goal collision. This is copy #1 + * + */ +public class CoreIt1005Mojo2 + extends AbstractMojo +{ + + public void execute() + throws MojoExecutionException + { + System.out.println("Test mojo (copy 1)."); + } +}