From 65bc9e27f21b3e3a8767d9812fc4f80cbf30a638 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sat, 1 May 2010 12:19:13 +0000 Subject: [PATCH] o Extended ITs git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@939992 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/plugin/coreit/SecondMojo.java | 39 +++++++++++++++++++ .../src/it/java-basic/verify.groovy | 7 ++++ 2 files changed, 46 insertions(+) create mode 100644 maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/SecondMojo.java diff --git a/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/SecondMojo.java b/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/SecondMojo.java new file mode 100644 index 0000000..ef12e16 --- /dev/null +++ b/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/SecondMojo.java @@ -0,0 +1,39 @@ +package org.apache.maven.plugin.coreit; + +/* + * 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 org.apache.maven.plugin.AbstractMojo; + +/** + * Does nothing special. + * + * @goal second + * @requiresDependencyCollection compile + * @threadSafe + */ +public class SecondMojo + extends AbstractMojo +{ + + public void execute() + { + } + +} diff --git a/maven-plugin-plugin/src/it/java-basic/verify.groovy b/maven-plugin-plugin/src/it/java-basic/verify.groovy index c3ed03d..3d274c5 100644 --- a/maven-plugin-plugin/src/it/java-basic/verify.groovy +++ b/maven-plugin-plugin/src/it/java-basic/verify.groovy @@ -14,10 +14,12 @@ assert mojo.language.text() == 'java' assert mojo.description.text() == 'Touches a test file.' assert mojo.deprecated.text() == "Don't use!" assert mojo.requiresDependencyResolution.text() == 'test' +assert mojo.requiresDependencyCollection.text() == '' assert mojo.requiresProject.text() == 'true' assert mojo.requiresOnline.text() == 'false' assert mojo.requiresDirectInvocation.text() == 'false' assert mojo.aggregator.text() == 'false' +assert mojo.threadSafe.text() == 'false' assert mojo.phase.text() == 'integration-test' assert mojo.executePhase.text() == 'generate-sources' assert mojo.executeLifecycle.text() == 'cobertura' @@ -62,4 +64,9 @@ assert mojo.parameters.parameter[2].required.text() == 'true' assert mojo.parameters.parameter[2].editable.text() == 'true' assert mojo.parameters.parameter[2].description.text() == '' +mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "second"}[0] + +assert mojo.requiresDependencyCollection.text() == 'compile' +assert mojo.threadSafe.text() == 'true' + return true;