Compare commits

..

1 Commits

Author SHA1 Message Date
Benson Margulies 3b16c6c192 [maven-release-plugin] copy for tag maven-plugin-tools-2.9
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/tags/maven-plugin-tools-2.9@1164611 13f79535-47bb-0310-9956-ffa450edef68
2011-09-02 16:24:33 +00:00
361 changed files with 3926 additions and 20343 deletions

15
.gitignore vendored
View File

@ -1,15 +0,0 @@
target
#idea
*.iml
.idea
out/
#eclipse
.classpath
.project
.settings
.DS_Store
.java-version

1
Jenkinsfile vendored
View File

@ -1 +0,0 @@
asfMavenStdBuild(javaVersions:['8','7'])

View File

@ -1,23 +0,0 @@
#!/bin/sh
#
# 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.
#
mvn -Preporting site site:stage $@
mvn scm-publish:publish-scm $@

View File

@ -1,41 +0,0 @@
<?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>
<artifactId>maven-plugin-tools</artifactId>
<groupId>org.apache.maven.plugin-tools</groupId>
<version>3.5.1-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-annotations</artifactId>
<name>Maven Plugin Tools Java 5 Annotations</name>
<description>Java 5 annotations to use in Mojos</description>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
</project>

View File

@ -1,54 +0,0 @@
package org.apache.maven.plugins.annotations;
/*
* 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.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Used to configure injection of Plexus components by
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
* <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.
*
* @author Olivier Lamy
* @since 3.0
*/
@Documented
@Retention( RetentionPolicy.CLASS )
@Target( { ElementType.FIELD } )
@Inherited
public @interface Component
{
/**
* role of the component to inject.
* @return the role
*/
Class<?> role() default Object.class;
/**
* hint of the component to inject.
* @return the hint
*/
String hint() default "";
}

View File

@ -1,58 +0,0 @@
package org.apache.maven.plugins.annotations;
/*
* 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.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Used if your Mojo needs to fork a <a href="/ref/3.0.4/maven-core/lifecycles.html">lifecycle</a>.
*
* @author Olivier Lamy
* @since 3.0
*/
@Documented
@Retention( RetentionPolicy.CLASS )
@Target( ElementType.TYPE )
@Inherited
public @interface Execute
{
/**
* lifecycle phase to fork. Note that specifying a phase overrides specifying a goal.
* @return the phase
*/
LifecyclePhase phase() default LifecyclePhase.NONE;
/**
* goal to fork. Note that specifying a phase overrides specifying a goal.
* @return the goal
*/
String goal() default "";
/**
* lifecycle id to fork.
* @return the lifecycle id
*/
String lifecycle() default "";
}

View File

@ -1,46 +0,0 @@
package org.apache.maven.plugins.annotations;
/*
* 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 instantiation strategy.
*
* @author Hervé Boutemy
* @since 3.0
*/
public enum InstantiationStrategy
{
PER_LOOKUP( "per-lookup" ),
SINGLETON( "singleton" ),
KEEP_ALIVE( "keep-alive" ),
POOLABLE( "poolable" );
private final String id;
InstantiationStrategy( String id )
{
this.id = id;
}
public String id()
{
return this.id;
}
}

View File

@ -1,77 +0,0 @@
package org.apache.maven.plugins.annotations;
/*
* 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.
*/
/**
* <a href="/ref/3.0.4/maven-core/lifecycles.html">Lifecycle phases</a>.
* @author Olivier Lamy
* @since 3.0
*/
public enum LifecyclePhase
{
VALIDATE( "validate" ),
INITIALIZE( "initialize" ),
GENERATE_SOURCES( "generate-sources" ),
PROCESS_SOURCES( "process-sources" ),
GENERATE_RESOURCES( "generate-resources" ),
PROCESS_RESOURCES( "process-resources" ),
COMPILE( "compile" ),
PROCESS_CLASSES( "process-classes" ),
GENERATE_TEST_SOURCES( "generate-test-sources" ),
PROCESS_TEST_SOURCES( "process-test-sources" ),
GENERATE_TEST_RESOURCES( "generate-test-resources" ),
PROCESS_TEST_RESOURCES( "process-test-resources" ),
TEST_COMPILE( "test-compile" ),
PROCESS_TEST_CLASSES( "process-test-classes" ),
TEST( "test" ),
PREPARE_PACKAGE( "prepare-package" ),
PACKAGE( "package" ),
PRE_INTEGRATION_TEST( "pre-integration-test" ),
INTEGRATION_TEST( "integration-test" ),
POST_INTEGRATION_TEST( "post-integration-test" ),
VERIFY( "verify" ),
INSTALL( "install" ),
DEPLOY( "deploy" ),
PRE_CLEAN( "pre-clean" ),
CLEAN( "clean" ),
POST_CLEAN( "post-clean" ),
PRE_SITE( "pre-site" ),
SITE( "site" ),
POST_SITE( "post-site" ),
SITE_DEPLOY( "site-deploy" ),
NONE( "" );
private final String id;
LifecyclePhase( String id )
{
this.id = id;
}
public String id()
{
return this.id;
}
}

View File

@ -1,120 +0,0 @@
package org.apache.maven.plugins.annotations;
/*
* 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.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation will mark your class as a Mojo (ie. goal in a Maven plugin).
*
* @author Olivier Lamy
* @since 3.0
*/
@Documented
@Retention( RetentionPolicy.CLASS )
@Target( ElementType.TYPE )
@Inherited
public @interface Mojo
{
/**
* goal name (required).
* @return the goal name
*/
String name();
/**
* default phase to bind your mojo.
* @return the default phase
*/
LifecyclePhase defaultPhase() default LifecyclePhase.NONE;
/**
* the required dependency resolution scope.
* @return the required dependency resolution scope
*/
ResolutionScope requiresDependencyResolution() default ResolutionScope.NONE;
/**
* the required dependency collection scope.
* @return the required dependency collection scope
*/
ResolutionScope requiresDependencyCollection() default ResolutionScope.NONE;
/**
* your Mojo instantiation strategy. (Only <code>per-lookup</code> and <code>singleton</code> are supported)
* @return the instantiation strategy
*/
InstantiationStrategy instantiationStrategy() default InstantiationStrategy.PER_LOOKUP;
/**
* execution strategy: <code>once-per-session</code> or <code>always</code>.
* @return <code>once-per-session</code> or <code>always</code>
*/
String executionStrategy() default "once-per-session";
/**
* does your mojo requires a project to be executed?
* @return requires a project
*/
boolean requiresProject() default true;
/**
* does your mojo requires a reporting context to be executed?
* @return requires a reporting context
*/
boolean requiresReports() default false;
/**
* if the Mojo uses the Maven project and its child modules.
* @return uses the Maven project and its child modules
*/
boolean aggregator() default false;
/**
* can this Mojo be invoked directly only?
* @return invoked directly only
*/
boolean requiresDirectInvocation() default false;
/**
* does this Mojo need to be online to be executed?
* @return need to be online
*/
boolean requiresOnline() default false;
boolean inheritByDefault() default true;
/**
* own configurator class.
* @return own configurator class
*/
String configurator() default "";
/**
* is your mojo thread safe (since Maven 3.x)?
* @return is thread safe
*/
boolean threadSafe() default false;
}

View File

@ -1,88 +0,0 @@
package org.apache.maven.plugins.annotations;
/*
* 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.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Used to configure your Mojo parameters to be injected by
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
* <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.
*
* @author Olivier Lamy
* @since 3.0
*/
@Documented
@Retention( RetentionPolicy.CLASS )
@Target( { ElementType.FIELD } )
@Inherited
public @interface Parameter
{
/**
* name of the bean property used to get/set the field: by default, field name is used.
* @return the name of the bean property
*/
String name() default "";
/**
* alias supported to get parameter value.
* @return the alias
*/
String alias() default "";
/**
* Property to use to retrieve a value. Can come from <code>-D</code> execution, setting properties or pom
* properties.
* @return property name
*/
String property() default "";
/**
* parameter default value, eventually containing <code>${...}</code> expressions which will be interpreted at
* inject time: see
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html">
* PluginParameterExpressionEvaluator</a>.
* @return the default value
*/
String defaultValue() default "";
/**
* is the parameter required?
* @return <code>true</code> if the Mojo should fail when the parameter cannot be injected
*/
boolean required() default false;
/**
* Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified
* configuration). This is useful when you want to force the user to use common POM elements rather than plugin
* configurations, as in the case where you want to use the artifact's final name as a parameter. In this case, you
* want the user to modify <code>&lt;build&gt;&lt;finalName/&gt;&lt;/build&gt;</code> rather than specifying a value
* for finalName directly in the plugin configuration section. It is also useful to ensure that - for example - a
* List-typed parameter which expects items of type Artifact doesn't get a List full of Strings.
*
* @return <code>true</code> if the user should not be allowed to configure the parameter directly
*/
boolean readonly() default false;
}

View File

@ -1,75 +0,0 @@
package org.apache.maven.plugins.annotations;
/*
* 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.artifact.Artifact;
/**
* Dependencies resolution scopes available before
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo execution</a>.
*
* @author Hervé Boutemy
* @since 3.0
*/
public enum ResolutionScope
{
/**
* empty resolution scope
*/
NONE( null ),
/**
* <code>compile</code> resolution scope
* = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
*/
COMPILE( Artifact.SCOPE_COMPILE ),
/**
* <code>compile+runtime</code> resolution scope (Maven 3 only)
* = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> dependencies
*/
COMPILE_PLUS_RUNTIME( Artifact.SCOPE_COMPILE_PLUS_RUNTIME ),
/**
* <code>runtime</code> resolution scope
* = <code>compile</code> + <code>runtime</code> dependencies
*/
RUNTIME( Artifact.SCOPE_RUNTIME ),
/**
* <code>runtime+system</code> resolution scope (Maven 3 only)
* = <code>compile</code> + <code>system</code> + <code>runtime</code> dependencies
*/
RUNTIME_PLUS_SYSTEM( Artifact.SCOPE_RUNTIME_PLUS_SYSTEM ),
/**
* <code>test</code> resolution scope
* = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> + <code>test</code>
* dependencies
*/
TEST( Artifact.SCOPE_TEST );
private final String id;
ResolutionScope( String id )
{
this.id = id;
}
public String id()
{
return this.id;
}
}

View File

@ -1,38 +0,0 @@
------
About ${project.name}
------
Hervé Boutemy
------
2012-06-03
------
~~ 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.
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html
About ${project.name}
${project.description}
* Usage
To be able to {{{../maven-plugin-tools-annotations/index.html}use Maven Plugin Tools Java 5 Annotations}},
some configuration has to be done in <<<pom.xml>>>: see
{{{../maven-plugin-plugin/examples/using-annotations.html#POM_configuration} Using Plugin Tools Java5 Annotations}}
example in {{{../maven-plugin-plugin} <<<maven-plugin-plugin>>>}} documentation.

View File

@ -21,13 +21,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-plugin-tools</artifactId>
<groupId>org.apache.maven.plugin-tools</groupId>
<version>3.5.1-SNAPSHOT</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
<version>22</version>
<relativePath />
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.9</version>
<packaging>maven-plugin</packaging>
<name>Maven Plugin Plugin</name>
@ -38,48 +40,70 @@
</description>
<prerequisites>
<maven>2.2.1</maven>
<maven>2.0.6</maven>
</prerequisites>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugin-tools/tags/maven-plugin-tools-2.9/maven-plugin-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugin-tools/tags/maven-plugin-tools-2.9/maven-plugin-plugin</developerConnection>
<url>http://svn.apache.org/viewvc/maven/plugin-tools/tags/maven-plugin-tools-2.9/maven-plugin-plugin</url>
</scm>
<issueManagement>
<system>jira</system>
<url>http://jira.codehaus.org/browse/MPLUGIN</url>
</issueManagement>
<distributionManagement>
<site>
<id>apache.website</id>
<url>scp://people.apache.org/www/maven.apache.org/plugins/maven-plugin-plugin</url>
</site>
</distributionManagement>
<properties>
<doxiaVersion>1.4</doxiaVersion>
<doxia-sitetoolsVersion>1.4</doxia-sitetoolsVersion>
<it.debug>true</it.debug>
<mavenVersion>2.0.6</mavenVersion>
<doxiaVersion>1.2</doxiaVersion>
<doxia-sitetoolsVersion>1.2</doxia-sitetoolsVersion>
</properties>
<!-- Copy from project up -->
<dependencyManagement>
<dependencies>
<!-- maven -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-java</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-beanshell</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-descriptor</artifactId>
<version>${mavenVersion}</version>
</dependency>
<!-- plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>2.0.5</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-generators</artifactId>
</dependency>
<!-- runtime extractors used by default by plugin-tools -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-annotations</artifactId>
<scope>runtime</scope>
</dependency>
<!-- for source code annotations of the mojos -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<!-- from stricter view, should use ${mavenPluginToolsVersion} but this is causing problems with release plugin -->
<!--version>${mavenPluginToolsVersion}</version-->
<!--
Do not use 'provided' scope here. The annotations are a transitive dependency of
'maven-plugin-tools-annotations' which fails to load at runtime when not available.
-->
</dependency>
<!-- doxia -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
@ -102,14 +126,16 @@
</exclusions>
</dependency>
<!-- Maven -->
<!-- maven -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@ -119,16 +145,22 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-descriptor</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-registry</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
@ -137,13 +169,14 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${mavenVersion}</version>
</dependency>
<!-- shared -->
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>2.3</version>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
@ -151,76 +184,42 @@
<version>3.0</version>
</dependency>
<!-- Maven runtime -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-beanshell</artifactId>
<scope>runtime</scope>
</dependency>
<!-- plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>maven-surefire-common</artifactId>
<version>2.19.1</version>
</dependency>
<!-- other -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
<!-- needed for it tests -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script-beanshell</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script-ant</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/filtered-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<!-- This file should exactly match the output of this project -->
<exclude>src/it/help-basic/expected-help.txt</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<stagingSiteURL>scp://people.apache.org/www/maven.apache.org/plugins/${project.artifactId}-${project.version}</stagingSiteURL>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
@ -236,87 +235,17 @@
<models>
<model>src/main/mdo/pluginRequirements.mdo</model>
</models>
<useJava5>true</useJava5>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<id>ensure-no-container-api</id>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>org.codehaus.plexus:plexus-component-api</exclude>
</excludes>
<message>The new containers are not supported. You probably added a dependency that is missing the exclusions.</message>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5</version>
<!-- will use previous maven-plugin-plugin release to build current maven-plugin-plugin as configured in parent -->
<executions>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
</execution>
<execution>
<id>generated-helpmojo</id>
<goals>
<goal>helpmojo</goal>
</goals>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version><!-- cannot use ${mavenPluginToolsVersion} property because release plugin would try to update -->
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>${mavenInvokerPluginVersion}</version>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>reporting</id>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>${mavenInvokerPluginVersion}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>l10n-maven-plugin</artifactId>
@ -357,25 +286,21 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>${mavenInvokerPluginVersion}</version>
<version>1.5</version>
<configuration>
<debug>${it.debug}</debug>
<projectsDirectory>src/it</projectsDirectory>
<debug>true</debug>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<preBuildHookScript>setup</preBuildHookScript>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
<filterProperties>
<sitePluginVersion>3.3</sitePluginVersion>
<antVersion>${antVersion}</antVersion>
<sitePluginVersion>3.0</sitePluginVersion>
</filterProperties>
<properties>
<maven.compiler.source>${maven.compiler.source}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.target}</maven.compiler.target>
</properties>
<goals>
<goal>verify</goal>
</goals>
</configuration>
<executions>
<execution>
@ -390,34 +315,5 @@
</plugins>
</build>
</profile>
<profile>
<id>maven-2</id>
<activation>
<file>
<!-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
<missing>${basedir}</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<!-- see https://issues.apache.org/jira/browse/MNG-5346 -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -1,20 +0,0 @@
# 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.1 = install
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:first
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:help

View File

@ -1,136 +0,0 @@
<?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.its.annotation-with-inheritance-from-deps</groupId>
<artifactId>annotation-with-inheritance-from-deps</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test :: annotation-with-inheritance-from-deps</name>
<description>
Test plugin-plugin, which tests maven-plugin-tools-api and
maven-plugin-tools-java. This will generate a plugin descriptor from
java-based mojo sources, install the plugin, and then use it.
</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<plexusCompilerVersion>1.8.6</plexusCompilerVersion>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>@mavenVersion@</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>@project.version@</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-annotations</artifactId>
<version>@project.version@</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<!-- dependency of org.apache.maven.plugin-tools:maven-plugin-tools-annotations:@project.version@:jar:tests -->
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-manager</artifactId>
<version>${plexusCompilerVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac</artifactId>
<version>${plexusCompilerVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,75 +0,0 @@
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.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.tools.plugin.extractor.annotations.FooMojo;
import org.apache.maven.project.MavenProjectHelper;
/**
* Touches a test file.
*
* @since 1.2
* @deprecated Don't use!
*/
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
public class FirstMojo
extends FooMojo
{
/**
* @since 0.1
* @deprecated As of 0.2
*/
@Parameter( alias = "alias" )
private String aliasedParam;
@Component( role = MavenProjectHelper.class )// , roleHint = "default"
private Object projectHelper;
public void execute()
throws MojoExecutionException
{
if ( bar == null )
{
throw new MojoExecutionException( "bar == null" );
}
if ( beer == null )
{
throw new MojoExecutionException( "beer == null" );
}
if ( projectHelper == null )
{
throw new MojoExecutionException( "projectHelper == null" );
}
if ( compilerManager == null )
{
throw new MojoExecutionException( "compilerManager == null" );
}
}
}

View File

@ -1,37 +0,0 @@
<?xml version='1.0'?>
<!--
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.
-->
<lifecycles>
<lifecycle>
<id>my-lifecycle</id>
<phases>
<phase>
<id>process-classes</id>
</phase>
<phase>
<id>test</id>
<configuration>
<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</phase>
</phases>
</lifecycle>
</lifecycles>

View File

@ -1,99 +0,0 @@
/*
* 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.
*/
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
assert descriptorFile.isFile()
File oldHelpClass = new File( basedir, "target/classes/HelpMojo.class" );
assert !oldHelpClass.exists()
File newHelpClass = new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" );
assert newHelpClass.exists()
def pluginDescriptor = new XmlParser().parse( descriptorFile );
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first"}[0]
assert mojo.goal.text() == 'first'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
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() == 'package'
assert mojo.executeLifecycle.text() == 'my-lifecycle'
assert mojo.configuration.bar[0].text() == '${thebar}'
assert mojo.configuration.bar[0].'@implementation' == 'java.lang.String'
assert mojo.configuration.bar[0].'@default-value' == 'coolbar'
assert mojo.configuration.beer[0].text() == '${thebeer}'
assert mojo.configuration.beer[0].'@implementation' == 'java.lang.String'
assert mojo.configuration.beer[0].'@default-value' == 'coolbeer'
assert mojo.requirements.requirement.size() == 3
assert mojo.requirements.requirement[1].role.text() == 'org.codehaus.plexus.compiler.manager.CompilerManager'
assert mojo.requirements.requirement[1].'role-hint'.text() == ''
assert mojo.requirements.requirement[1].'field-name'.text() == 'compilerManager'
assert mojo.requirements.requirement[2].role.text() == 'org.apache.maven.project.MavenProjectHelper'
//assert mojo.requirements.requirement[2].'role-hint'.text() == 'default'
assert mojo.requirements.requirement[2].'field-name'.text() == 'projectHelper'
assert mojo.parameters.parameter.size() == 3
def parameter = mojo.parameters.parameter.findAll{ it.name.text() == "aliasedParam"}[0]
assert parameter.name.text() == 'aliasedParam'
assert parameter.alias.text() == 'alias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == 'As of 0.2'
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "beer"}[0]
assert parameter.name.text() == 'beer'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == "wine is better"
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == 'beer for non french folks'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "bar"}[0]
assert parameter.name.text() == 'bar'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == 'the cool bar to go'
return true;

View File

@ -1,20 +0,0 @@
# 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.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:it0014
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:first

View File

@ -1,32 +0,0 @@
<?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.annotation-with-inheritance-reactor</groupId>
<artifactId>annotation-with-inheritance-reactor</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>module-abstract-mojo</artifactId>
</project>

View File

@ -1,64 +0,0 @@
package org.apache.maven.plugins;
/*
* 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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.compiler.manager.CompilerManager;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import java.io.File;
/**
* Touches a test file.
*
*/
public abstract class AbstractFirstMojo
extends AbstractMojo
{
/**
* Project directory.
*/
@Parameter( defaultValue = "${basedir}", readonly = true )
protected File basedir;
@Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
required = true )
protected File touchFile;
/**
* Plexus compiler manager.
*/
@Component
protected CompilerManager compilerManager;
/**
*
*/
@Component( role = ArtifactMetadataSource.class, hint = "maven" )
protected ArtifactMetadataSource artifactMetadataSource;
}

View File

@ -1,62 +0,0 @@
<?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.annotation-with-inheritance-reactor</groupId>
<artifactId>annotation-with-inheritance-reactor</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>module-mojo</artifactId>
<packaging>maven-plugin</packaging>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.annotation-with-inheritance-reactor</groupId>
<artifactId>module-abstract-mojo</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,66 +0,0 @@
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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import java.io.File;
import java.io.IOException;
/**
* Touches a test file.
*
*/
@Mojo( name = "it0014" )
public class CoreIt0014Mojo
extends AbstractMojo
{
@Parameter( property = "project.build.directory", required = true )
private String outputDirectory;
public void execute()
throws MojoExecutionException
{
getLog().info( "outputDirectory = " + outputDirectory );
File f = new File( outputDirectory );
if ( !f.exists() )
{
f.mkdirs();
}
File touch = new File( f, "touch.txt" );
try
{
touch.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Error writing verification file.", e );
}
}
}

View File

@ -1,80 +0,0 @@
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.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.AbstractFirstMojo;
import org.apache.maven.project.MavenProjectHelper;
/**
* Touches a test file.
*
* @since 1.2
* @deprecated Don't use!
*/
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
public class FirstMojo
extends AbstractFirstMojo
{
/**
* @since 0.1
* @deprecated As of 0.2
*/
@Parameter( alias = "alias" )
private String aliasedParam;
@Component( role = MavenProjectHelper.class )
private Object projectHelper;
public void execute()
throws MojoExecutionException
{
if ( basedir == null )
{
throw new MojoExecutionException( "basedir == null" );
}
if ( touchFile == null )
{
throw new MojoExecutionException( "touchFile == null" );
}
if ( projectHelper == null )
{
throw new MojoExecutionException( "projectHelper == null" );
}
if ( compilerManager == null )
{
throw new MojoExecutionException( "compilerManager == null" );
}
if (! ( projectHelper instanceof MavenProjectHelper ))
{
throw new MojoExecutionException( "! projectHelper instanceof MavenProjectHelper" );
}
}
}

View File

@ -1,37 +0,0 @@
<?xml version='1.0'?>
<!--
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.
-->
<lifecycles>
<lifecycle>
<id>cobertura</id>
<phases>
<phase>
<id>process-classes</id>
</phase>
<phase>
<id>test</id>
<configuration>
<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</phase>
</phases>
</lifecycle>
</lifecycles>

View File

@ -1,107 +0,0 @@
<?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.its.annotation-with-inheritance-reactor</groupId>
<artifactId>annotation-with-inheritance-reactor</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Maven Integration Test :: annotation-with-inheritance</name>
<packaging>pom</packaging>
<modules>
<module>module-abstract-mojo</module>
<module>module-mojo</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<plexusCompilerVersion>1.8.6</plexusCompilerVersion>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-annotations</artifactId>
<version>@project.version@</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<!-- dependency of org.apache.maven.plugin-tools:maven-plugin-tools-annotations:@project.version@:jar:tests -->
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>@mavenVersion@</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>@project.version@</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-manager</artifactId>
<version>${plexusCompilerVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac</artifactId>
<version>${plexusCompilerVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -1,99 +0,0 @@
/*
* 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.
*/
File touchFile = new File( basedir, "module-mojo/target/touch.txt" )
assert touchFile.isFile()
File descriptorFile = new File( basedir, "module-mojo/target/classes/META-INF/maven/plugin.xml" );
assert descriptorFile.isFile()
def pluginDescriptor = new XmlParser().parse( descriptorFile );
assert pluginDescriptor.mojos.mojo.size() == 3
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first"}[0]
assert mojo.goal.text() == 'first'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
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'
assert mojo.configuration.basedir[0].text() == ''
assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
assert mojo.requirements.requirement.size() == 3
assert mojo.requirements.requirement[2].role.text() == 'org.apache.maven.project.MavenProjectHelper'
//assert mojo.requirements.requirement[2].'role-hint'.text() == 'default'
assert mojo.requirements.requirement[2].'field-name'.text() == 'projectHelper'
assert mojo.parameters.parameter.size() == 3
def parameter = mojo.parameters.parameter.findAll{ it.name.text() == "aliasedParam"}[0]
assert parameter.name.text() == 'aliasedParam'
assert parameter.alias.text() == 'alias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == 'As of 0.2'
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile"}[0]
assert parameter.name.text() == 'touchFile'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir"}[0]
assert parameter.name.text() == 'basedir'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Project directory.'
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "second"}[0]
assert mojo.requiresDependencyCollection.text() == 'compile'
assert mojo.threadSafe.text() == 'true'
return true;

View File

@ -1,22 +0,0 @@
# 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.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:it0014
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:first
invoker.goals.4 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:help
invoker.goals.5 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:third

View File

@ -1,134 +0,0 @@
<?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.its.annotation-with-inheritance</groupId>
<artifactId>annotation-with-inheritance</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test :: annotation-with-inheritance</name>
<description>
Test plugin-plugin, which tests maven-plugin-tools-api and
maven-plugin-tools-java. This will generate a plugin descriptor from
java-based mojo sources, install the plugin, and then use it.
</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<plexusCompilerVersion>1.8.6</plexusCompilerVersion>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>@mavenVersion@</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>@project.version@</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-manager</artifactId>
<version>${plexusCompilerVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac</artifactId>
<version>${plexusCompilerVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
<version>1.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,63 +0,0 @@
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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.compiler.manager.CompilerManager;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import java.io.File;
/**
*
*/
public abstract class AbstractFirstMojo
extends AbstractMojo
{
/**
* Project directory.
*/
@Parameter( defaultValue = "${basedir}", readonly = true )
protected File basedir;
@Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
required = true )
protected File touchFile;
/**
* Plexus compiler manager.
*/
@Component
protected CompilerManager compilerManager;
/**
*
*/
@Component( role = ArtifactMetadataSource.class, hint = "maven" )
protected ArtifactMetadataSource artifactMetadataSource;
}

View File

@ -1,43 +0,0 @@
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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.compiler.manager.CompilerManager;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import java.io.File;
/**
*
*/
public abstract class AbstractFooMojo
extends AbstractFirstMojo
{
// MPLUGIN-206
}

View File

@ -1,66 +0,0 @@
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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import java.io.File;
import java.io.IOException;
/**
* Touches a test file.
*
*/
@Mojo( name = "it0014" )
public class CoreIt0014Mojo
extends AbstractMojo
{
@Parameter( property = "project.build.directory", required = true )
private String outputDirectory;
public void execute()
throws MojoExecutionException
{
getLog().info( "outputDirectory = " + outputDirectory );
File f = new File( outputDirectory );
if ( !f.exists() )
{
f.mkdirs();
}
File touch = new File( f, "touch.txt" );
try
{
touch.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Error writing verification file.", e );
}
}
}

View File

@ -1,87 +0,0 @@
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.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProjectHelper;
import java.util.Set;
/**
* Touches a test file.
*
* @since 1.2
* @deprecated Don't use!
*/
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.COMPILE,
defaultPhase = LifecyclePhase.INTEGRATION_TEST )
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
public class FirstMojo
extends AbstractFirstMojo
{
/**
* @since 0.1
* @deprecated As of 0.2
*/
@Parameter( alias = "alias" )
private String aliasedParam;
@Component( role = MavenProjectHelper.class )//, roleHint = "default"
private Object projectHelper;
@Parameter( defaultValue = "${project.artifacts}", required = true, readonly = true )
private Set<Artifact> dependencies;
public void execute()
throws MojoExecutionException
{
if ( basedir == null )
{
throw new MojoExecutionException( "basedir == null" );
}
if ( touchFile == null )
{
throw new MojoExecutionException( "touchFile == null" );
}
if ( projectHelper == null )
{
throw new MojoExecutionException( "projectHelper == null" );
}
if ( compilerManager == null )
{
throw new MojoExecutionException( "compilerManager == null" );
}
if ( dependencies.isEmpty() )
{
throw new MojoExecutionException( "dependencies.isEmpty()" );
}
}
}

View File

@ -1,39 +0,0 @@
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;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Mojo;
/**
* Does nothing special.
*
*/
@Mojo( name = "second", requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true )
public class SecondMojo
extends AbstractMojo
{
public void execute()
{
}
}

View File

@ -1,87 +0,0 @@
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.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProjectHelper;
import java.util.Set;
/**
* Touches a test file.
*
* @since 1.2
* @deprecated Don't use!
*/
@Mojo( name = "third", requiresDependencyResolution = ResolutionScope.COMPILE,
defaultPhase = LifecyclePhase.INTEGRATION_TEST )
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
public class ThirdMojo
extends AbstractFooMojo
{
/**
* @since 0.1
* @deprecated As of 0.2
*/
@Parameter( alias = "alias" )
private String aliasedParam;
@Component( role = MavenProjectHelper.class )//, roleHint = "default"
private Object projectHelper;
@Parameter( defaultValue = "${project.artifacts}", required = true, readonly = true )
private Set<Artifact> dependencies;
public void execute()
throws MojoExecutionException
{
if ( basedir == null )
{
throw new MojoExecutionException( "basedir == null" );
}
if ( touchFile == null )
{
throw new MojoExecutionException( "touchFile == null" );
}
if ( projectHelper == null )
{
throw new MojoExecutionException( "projectHelper == null" );
}
if ( compilerManager == null )
{
throw new MojoExecutionException( "compilerManager == null" );
}
if ( dependencies.isEmpty() )
{
throw new MojoExecutionException( "dependencies.isEmpty()" );
}
}
}

View File

@ -1,37 +0,0 @@
<?xml version='1.0'?>
<!--
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.
-->
<lifecycles>
<lifecycle>
<id>cobertura</id>
<phases>
<phase>
<id>process-classes</id>
</phase>
<phase>
<id>test</id>
<configuration>
<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</phase>
</phases>
</lifecycle>
</lifecycles>

View File

@ -1,103 +0,0 @@
/*
* 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.
*/
File touchFile = new File( basedir, "target/touch.txt" )
assert touchFile.isFile()
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
assert descriptorFile.isFile()
File oldHelpClass = new File( basedir, "target/classes/HelpMojo.class" );
assert !oldHelpClass.exists()
File newHelpClass = new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" );
assert newHelpClass.exists()
def pluginDescriptor = new XmlParser().parse( descriptorFile );
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first" }[0]
assert mojo.goal.text() == 'first'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
assert mojo.language.text() == 'java'
assert mojo.description.text() == 'Touches a test file.'
assert mojo.deprecated.text() == "Don't use!"
assert mojo.requiresDependencyResolution.text() == 'compile'
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'
assert mojo.configuration.basedir[0].text() == ''
assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
assert mojo.requirements.requirement.size() == 3
assert mojo.requirements.requirement[2].role.text() == 'org.apache.maven.project.MavenProjectHelper'
//assert mojo.requirements.requirement[2].'role-hint'.text() == 'default'
assert mojo.requirements.requirement[2].'field-name'.text() == 'projectHelper'
assert mojo.parameters.parameter.size() == 4
def parameter = mojo.parameters.parameter.findAll{ it.name.text() == "aliasedParam"}[0]
assert parameter.name.text() == 'aliasedParam'
assert parameter.alias.text() == 'alias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == 'As of 0.2'
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile"}[0]
assert parameter.name.text() == 'touchFile'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir"}[0]
assert parameter.name.text() == 'basedir'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Project directory.'
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "second"}[0]
assert mojo.requiresDependencyCollection.text() == 'compile'
assert mojo.threadSafe.text() == 'true'
return true;

View File

@ -1,20 +0,0 @@
# 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.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.ant.it:maven-ant-it-basic:1.0-SNAPSHOT:touch -Dname=touch.txt

View File

@ -1,30 +0,0 @@
/*
* 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.
*/
File touchFile = new File( basedir, "target/touch.txt" )
assert touchFile.isFile()
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
assert descriptorFile.isFile()
File oldHelpClass = new File( basedir, "target/classes/HelpMojo.class" );
assert !oldHelpClass.exists()
return true;

View File

@ -1,20 +0,0 @@
# 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.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.ant.it:maven-ant-it-referenceParameter:1.0-SNAPSHOT:test

View File

@ -1,20 +0,0 @@
# 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.1 = clean install -DskipTests
#invoker.goals.2 = org.apache.maven.ant.it:maven-ant-it-referenceParameter:1.0-SNAPSHOT:test

View File

@ -1,49 +0,0 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>trivial-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>1.0</version>
<name>trivial-maven-plugin</name>
<description>Just a test project</description>
<url>http://nowere.test</url>
<inceptionYear>2012</inceptionYear>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-ant</artifactId>
<version>@project.version@</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,35 +0,0 @@
<?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 name="ant-tasks">
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Global Properties -->
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<!-- taskdef resource="net/sf/antcontrib/antcontrib.properties"/-->
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Main task -->
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<target name="sample-task">
<echo message="${message}."/>
</target>
</project>

View File

@ -1,46 +0,0 @@
<?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.
-->
<pluginMetadata
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/PLUGIN-METADATA/1.1.0"
xsi:schemaLocation="http://maven.apache.org/PLUGIN-METADATA/1.1.0 http://maven.apache.org/xsd/plugin-metadata-1.1.0.xsd">
<mojos>
<mojo>
<goal>sample</goal>
<call>sample-task</call>
<description>Just a test</description>
<requiresDirectInvocation>false</requiresDirectInvocation>
<requiresProject>false</requiresProject>
<since>1.0</since>
<parameters>
<parameter>
<name>message</name>
<type>java.lang.String</type>
<required>true</required>
<readonly>true</readonly>
<since>1.0</since>
<description>Test param</description>
</parameter>
</parameters>
</mojo>
</mojos>
</pluginMetadata>

View File

@ -1,20 +0,0 @@
# 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.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.beanshell.it:maven-beanshell-it-basic:1.0-SNAPSHOT:touch -Dname=touch.txt

View File

@ -1,68 +0,0 @@
<?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.beanshell.it</groupId>
<artifactId>maven-beanshell-it-basic</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Basic Beanshell-Mojo Integration Test</name>
<properties>
<pluginPluginVersion>@project.version@</pluginPluginVersion><!-- -->
</properties>
<dependencies>
<dependency>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script-beanshell</artifactId>
<version>@project.version@</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${pluginPluginVersion}</version>
<configuration>
<prefix>beanshellBasic</prefix>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-beanshell</artifactId>
<version>${pluginPluginVersion}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,65 +0,0 @@
/*
* 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.
*/
// START SNIPPET: beanshell-mojo
/**
* Touches a test file.
*
* @goal touch
* @requiresDependencyResolution=test
* @deprecated Don't use!
* @since 1.2
*/
import org.apache.maven.plugin.Mojo;
import org.apache.maven.script.beanshell.BeanshellMojoAdapter;
import org.codehaus.plexus.util.FileUtils;
execute()
{
logger.info( "Executing beanshell mojo..." );
FileUtils.fileWrite( outDir + "/" + name, "This is a Beanshell test" );
}
/**
* Output directory for files.
*
* @parameter expression="${project.build.directory}"
* @required
*/
setOutDir( file )
{
outDir = file;
}
/**
*
*
* @parameter expression="${name}"
* @required
*/
setName( name )
{
name = name;
}
return new BeanshellMojoAdapter( (Mojo) this, this.interpreter );
// END SNIPPET: beanshell-mojo

View File

@ -1,27 +0,0 @@
/*
* 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.
*/
File touchFile = new File( basedir, "target/touch.txt" )
assert touchFile.exists()
assert touchFile.isFile()
content = touchFile.text
assert content.contains('This is a Beanshell test');
return true;

View File

@ -1,77 +0,0 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test</groupId>
<artifactId>maven-since-3.x</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>test</groupId>
<artifactId>antsample-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>ANT Sample</name>
<description>Just a test project</description>
<url>http://nowere.test</url>
<inceptionYear>2012</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-ant</artifactId>
<version>@project.version@</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,35 +0,0 @@
<?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 name="ant-tasks">
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Global Properties -->
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<!-- taskdef resource="net/sf/antcontrib/antcontrib.properties"/-->
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Main task -->
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
<target name="sample-task">
<echo message="${message}."/>
</target>
</project>

View File

@ -1,46 +0,0 @@
<?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.
-->
<pluginMetadata
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/PLUGIN-METADATA/1.1.0"
xsi:schemaLocation="http://maven.apache.org/PLUGIN-METADATA/1.1.0 http://maven.apache.org/xsd/plugin-metadata-1.1.0.xsd">
<mojos>
<mojo>
<goal>sample</goal>
<call>sample-task</call>
<description>Just a test</description>
<requiresDirectInvocation>false</requiresDirectInvocation>
<requiresProject>false</requiresProject>
<since>1.0</since>
<parameters>
<parameter>
<name>message</name>
<type>java.lang.String</type>
<required>true</required>
<readonly>false</readonly>
<since>0.9</since>
<description>Test param</description>
</parameter>
</parameters>
</mojo>
</mojos>
</pluginMetadata>

View File

@ -1,36 +0,0 @@
<?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 name="${artifactId}">
<publishDate position="right" format="dd/MM/yyyy, HH:mm" />
<version position="right"/>
<poweredBy>
<logo name="Maven" href="http://maven.apache.org/"
img="${project.url}/images/maven-feather.png" />
</poweredBy>
<body>
<menu name="Overview">
<item name="Introduction" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
</menu>
${reports}
</body>
</project>

View File

@ -1,21 +0,0 @@
# 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.1 = clean install site
invoker.maven.version = 3.0+

View File

@ -1,49 +0,0 @@
<?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>test</groupId>
<artifactId>maven-since-3.x</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>test</groupId>
<artifactId>javasample-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Java Sample</name>
<description>Java Maven Mojo.</description>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -1,82 +0,0 @@
package test;
/*
* Copyright 2001-2005 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 which touches a timestamp file.
*
* @goal touch
* @since 1.0
*
* @phase process-sources
*/
public class MyMojo
extends AbstractMojo
{
/**
* Location of the file.
* @parameter property="project.build.directory"
* @required
*/
private File outputDirectory;
public void execute()
throws MojoExecutionException
{
File f = outputDirectory;
if ( !f.exists() )
{
f.mkdirs();
}
File touch = new File( f, "touch.txt" );
FileWriter w = null;
try
{
w = new FileWriter( touch );
w.write( "touch.txt" );
}
catch ( IOException e )
{
throw new MojoExecutionException( "Error creating file " + touch, e );
}
finally
{
if ( w != null )
{
try
{
w.close();
}
catch ( IOException e )
{
// ignore
}
}
}
}
}

View File

@ -1,37 +0,0 @@
<?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 name="${artifactId}">
<publishDate position="right" format="dd/MM/yyyy, HH:mm" />
<version position="right"/>
<poweredBy>
<logo name="Maven" href="http://maven.apache.org/"
img="${project.url}/images/maven-feather.png" />
</poweredBy>
<body>
<menu name="Overview">
<item name="Introduction" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
</menu>
${reports}
</body>
</project>

View File

@ -1,94 +0,0 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>maven-since-3.x</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Samples</name>
<packaging>pom</packaging>
<description>Just a test project</description>
<url>http://nowere.test</url>
<inceptionYear>2012</inceptionYear>
<modules>
<module>antsample-maven-plugin</module>
<module>javasample-maven-plugin</module>
</modules>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<id>generated-helpmojo</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-ant</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>2.1.1</version>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.1</version>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,27 +0,0 @@
/*
* 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.
*/
File touchFile = new File( basedir, "antsample-maven-plugin/target/site/sample-mojo.html" )
assert touchFile.exists()
assert touchFile.isFile()
content = touchFile.text
assert content.contains('Since');
return true;

View File

@ -1,25 +0,0 @@
[INFO] help 1.0-SNAPSHOT
Tests generation and compilation of the help mojo.
help:test
Deprecated. As of 1.0, use the "quoted" goal instead.
MOJO-DESCRIPTION. Some 'quotation' marks and backslashes '\\', some important
javadoc
and an inline link to AnotherMojo.
Available parameters:
defaultParam (Default: escape\backslash)
This parameter uses 'quotation' marks and backslashes '\\' in its
description. Those characters must be escaped in Java string literals.
deprecatedParam
Deprecated. As of version 1.0, use the {@link #defaultParam} instead.
This parameter is deprecated.
undocumentedParam
Required: Yes
User property: test.undocumented

View File

@ -1,23 +1,2 @@
# 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.maven.version = 3.0+
invoker.goals.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.plugin:help:1.0-SNAPSHOT:help
invoker.goals.3 = --log-file help.log org.apache.maven.its.plugin:help:1.0-SNAPSHOT:help
# --log-file option is only supported by Maven 3
invoker.maven.version = 3.0+
invoker.goals.1 = install
invoker.goals.2 = org.apache.maven.its.plugin:help:1.0:help

View File

@ -19,12 +19,12 @@ 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">
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>help</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<packaging>maven-plugin</packaging>
<description>
@ -41,39 +41,15 @@ under the License.
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>@project.version@</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<executions>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
</execution>
<execution>
<id>help-goal</id>
<goals>

View File

@ -1,36 +1,15 @@
package test;
/*
* 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;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
/**
* MOJO-DESCRIPTION. Some "quotation" marks and backslashes '\\', some <strong>important</strong> javadoc<br> and an
* inline link to {@link test.AnotherMojo}.
*
* @goal test
* @deprecated As of 1.0, use the "quoted" goal instead.
* @since 2.1
*/
@Mojo( name= "test" )
public class MyMojo
extends AbstractMojo
{
@ -39,27 +18,24 @@ public class MyMojo
* This parameter uses "quotation" marks and backslashes '\\' in its description. Those characters <em>must</em> be
* escaped in Java string literals.
*
* @parameter default-value="escape\\backslash"
* @since 2.0
*/
@Parameter( defaultValue = "escape\\backslash" )
private String defaultParam;
/**
* This parameter is deprecated.
*
* @deprecated As of version 1.0, use the {@link #defaultParam} instead.
* @parameter
* @deprecated As of version 1.0, us the {@link #defaultParam} instead.
*/
@Parameter
private String deprecatedParam;
@Parameter( property = "test.undocumented", required = true )
private String undocumentedParam;
/**
* Readonly parameter: should not be proposed for configuration.
* @parameter expression="${test.undocumented}"
* @required
*/
@Parameter( defaultValue = "not for configuration", readonly = true )
private String readonly;
private String undocumentedParam;
public void execute()
{

View File

@ -1,19 +1,2 @@
# 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.
detail = true
goal = test

View File

@ -1,28 +0,0 @@
/*
* 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.
*/
expected = new File( basedir, "expected-help.txt" ).text.trim().replace( "\r", "" );
log = new File( basedir, "help.log" ).text.replace( "\r", "" );
log = log.substring( log.indexOf( "[INFO] help 1.0-SNAPSHOT" ) );
log = log.substring( 0, log.indexOf( "[INFO]", 5 ) ).trim();
assert log == expected;
return true;

View File

@ -1,18 +1 @@
# 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 compile
invoker.goals = compile

View File

@ -19,12 +19,12 @@ 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">
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>help-package</artifactId>
<version>1.0-SNAPSHOT</version>
<artifactId>help</artifactId>
<version>1.0</version>
<packaging>maven-plugin</packaging>
<description>
@ -41,23 +41,9 @@ under the License.
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -1,24 +1,5 @@
package test;
/*
* 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;
/**

View File

@ -1,22 +1,3 @@
/*
* 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.*;
File helpMojo = new File( basedir, "target/classes/test/help/HelpMojo.class" );

View File

@ -25,7 +25,7 @@ under the License.
<parent>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</parent>
<artifactId>ipcr-dep-a</artifactId>

View File

@ -1,24 +1,5 @@
package test;
/*
* 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 ClassA
{
}

View File

@ -25,7 +25,7 @@ under the License.
<parent>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</parent>
<artifactId>ipcr-dep-b</artifactId>
@ -42,7 +42,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr-dep-a</artifactId>
<version>${project.version}</version>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -1,24 +1,5 @@
package test;
/*
* 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 ClassB
{

View File

@ -1,21 +1,4 @@
# 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.1 = clean install -DskipTests
invoker.goals.1 = clean install
invoker.profiles.1 = setup
invoker.goals.2 = clean process-classes

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<packaging>pom</packaging>
<name>Aggregator</name>

View File

@ -25,7 +25,7 @@ under the License.
<parent>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</parent>
<artifactId>ipcr-plugin</artifactId>
@ -45,7 +45,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr-dep-b</artifactId>
<version>${project.version}</version>
<version>1.0</version>
</dependency>
</dependencies>
@ -58,7 +58,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr-dep-b</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven.its.plugin</groupId>

View File

@ -1,24 +1,5 @@
package test;
/*
* 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.
*/
/**
* This is the source class to be scanned for annotations. While scanning, QDox must not try to resolve references to
* other types like the super class from the plugin class realm. The plugin class realm has no relation at all to

View File

@ -1,21 +0,0 @@
# 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.java.version = 1.8+
invoker.goals.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:it0014
invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:help

View File

@ -1,108 +0,0 @@
<?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.its.basic-java-annotations</groupId>
<artifactId>maven-it-basic-java-annotations</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test :: basic-java-annotations-jdk8</name>
<description>
Test plugin-plugin, which tests maven-plugin-tools-api and
maven-plugin-tools-java. This will generate a plugin descriptor from
java-based mojo sources, install the plugin, and then use it.
</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- pom properties values not taken into account since invoker defines properties -->
<!-- that override what's defined in pom -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>@project.version@</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source><!-- avoid ${maven.compiler.source} since value is not as expected -->
<target>1.8</target><!-- avoid ${maven.compiler.target} since value is not as expected -->
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,66 +0,0 @@
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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import java.io.File;
import java.io.IOException;
/**
* Touches a test file.
*
*/
@Mojo( name = "it0014" )
public class CoreIt0014Mojo
extends AbstractMojo
{
@Parameter( property = "project.build.directory", required = true )
private String outputDirectory;
public void execute()
throws MojoExecutionException
{
getLog().info( "outputDirectory = " + outputDirectory );
File f = new File( outputDirectory );
if ( !f.exists() )
{
f.mkdirs();
}
File touch = new File( f, "touch.txt" );
try
{
touch.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Error writing verification file.", e );
}
}
}

View File

@ -1,91 +0,0 @@
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.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import org.apache.maven.settings.Settings;
import java.io.File;
/**
* Touches a test file.
*
* @since 1.2
* @deprecated Don't use!
*/
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
public class FirstMojo
extends AbstractMojo
{
/**
* Project directory.
*/
@Parameter( defaultValue = "${basedir}", readonly = true )
private File basedir;
@Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
required = true )
private File touchFile;
/**
* @since 0.1
* @deprecated As of 0.2
*/
@Parameter( name = "namedParam", alias = "alias" )
private String aliasedParam;
@Component( role = MavenProjectHelper.class, hint = "test" )
private Object projectHelper;
@Component
private MavenSession session;
@Component
private MavenProject project;
@Component
private MojoExecution mojo;
@Component
private PluginDescriptor plugin;
@Component
private Settings settings;
public void execute()
throws MojoExecutionException
{
}
}

View File

@ -1,76 +0,0 @@
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;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.InstantiationStrategy;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProjectHelper;
/**
* Checks maximum annotations with non-default values.
*
* @since since-text
* @deprecated deprecated-text
*/
@Mojo( name = "maximal",
aggregator = true,
configurator = "configurator-hint",
requiresDependencyResolution = ResolutionScope.COMPILE,
requiresDependencyCollection = ResolutionScope.TEST,
defaultPhase = LifecyclePhase.PACKAGE,
executionStrategy = "always",
instantiationStrategy = InstantiationStrategy.SINGLETON,
inheritByDefault = false,
requiresDirectInvocation = true,
requiresOnline = true,
requiresProject = false,
requiresReports = true,
threadSafe = true )
@Execute( phase = LifecyclePhase.COMPILE )
public class Maximal
extends AbstractMojo
{
/**
* Parameter description.
*
* @since since-text
* @deprecated deprecated-text
*/
@Parameter( alias = "myAlias",
property = "aProperty",
defaultValue = "${anExpression}",
readonly = true,
required = true )
private String param;
@Component( role = MavenProjectHelper.class, hint = "test" )
private Object projectHelper;
public void execute()
{
}
}

View File

@ -1,43 +0,0 @@
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;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProjectHelper;
// minimum annotations => default values
@Mojo( name = "minimal" )
public class Minimal
extends AbstractMojo
{
@Parameter
private String param;
@Component
private MavenProjectHelper projectHelper;
public void execute()
{
}
}

View File

@ -1,30 +0,0 @@
package fr.ca;
/*
* 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 interface TestInterface {
/**
* Java 8 required to support such default method implementation
*/
public default void foo(){
}
}

View File

@ -1,231 +0,0 @@
/*
* 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.
*/
File touchFile = new File( basedir, "target/touch.txt" )
assert touchFile.isFile()
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
assert descriptorFile.isFile()
def pluginDescriptor = new XmlParser().parse( descriptorFile );
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first" }[0]
assert mojo.goal.text() == 'first'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
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'
assert mojo.configuration.basedir[0].text() == ''
assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
assert mojo.configuration.session[0].text() == ''
assert mojo.configuration.session[0].'@implementation' == 'org.apache.maven.execution.MavenSession'
assert mojo.configuration.session[0].'@default-value' == '${session}'
assert mojo.configuration.project[0].text() == ''
assert mojo.configuration.project[0].'@implementation' == 'org.apache.maven.project.MavenProject'
assert mojo.configuration.project[0].'@default-value' == '${project}'
assert mojo.configuration.mojo[0].text() == ''
assert mojo.configuration.mojo[0].'@implementation' == 'org.apache.maven.plugin.MojoExecution'
assert mojo.configuration.mojo[0].'@default-value' == '${mojoExecution}'
assert mojo.configuration.plugin[0].text() == ''
assert mojo.configuration.plugin[0].'@implementation' == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
assert mojo.configuration.plugin[0].'@default-value' == '${plugin}'
assert mojo.configuration.settings[0].text() == ''
assert mojo.configuration.settings[0].'@implementation' == 'org.apache.maven.settings.Settings'
assert mojo.configuration.settings[0].'@default-value' == '${settings}'
assert mojo.requirements.requirement.size() == 1
assert mojo.requirements.requirement[0].role.text() == 'org.apache.maven.project.MavenProjectHelper'
assert mojo.requirements.requirement[0].'role-hint'.text() == 'test'
assert mojo.requirements.requirement[0].'field-name'.text() == 'projectHelper'
assert mojo.parameters.parameter.size() == 8
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "namedParam" }[0]
assert parameter.name.text() == 'namedParam'
assert parameter.alias.text() == 'alias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == 'As of 0.2'
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir" }[0]
assert parameter.name.text() == 'basedir'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Project directory.'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "mojo" }[0]
assert parameter.name.text() == 'mojo'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.plugin.MojoExecution'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "plugin" }[0]
assert parameter.name.text() == 'plugin'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "project" }[0]
assert parameter.name.text() == 'project'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.project.MavenProject'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "session" }[0]
assert parameter.name.text() == 'session'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.execution.MavenSession'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "settings" }[0]
assert parameter.name.text() == 'settings'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.settings.Settings'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile" }[0]
assert parameter.name.text() == 'touchFile'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
// check default values
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "minimal"}[0]
assert mojo.goal.text() == 'minimal'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Minimal'
assert mojo.language.text() == 'java'
assert mojo.description.text() == ''
assert mojo.deprecated.text() == ''
assert mojo.requiresDependencyResolution.text() == ''
assert mojo.requiresDependencyCollection.text() == ''
assert mojo.requiresProject.text() == 'true'
assert mojo.requiresOnline.text() == 'false'
assert mojo.requiresDirectInvocation.text() == 'false'
assert mojo.requiresReports.text() == 'false'
assert mojo.aggregator.text() == 'false'
assert mojo.threadSafe.text() == 'false'
assert mojo.phase.text() == ''
assert mojo.executePhase.text() == ''
assert mojo.executeLifecycle.text() == ''
assert mojo.executionStrategy.text() == 'once-per-session'
assert mojo.inheritedByDefault.text() == 'true'
assert mojo.instantiationStrategy.text() == 'per-lookup'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
assert parameter.name.text() == 'param'
assert parameter.alias.text() == ''
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == ''
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
def requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
// check values set by every annotation
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "maximal"}[0]
assert mojo.goal.text() == 'maximal'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Maximal'
assert mojo.language.text() == 'java'
assert mojo.description.text() == 'Checks maximum annotations with non-default values.'
assert mojo.deprecated.text() == 'deprecated-text'
assert mojo.requiresDependencyResolution.text() == 'compile'
assert mojo.requiresDependencyCollection.text() == 'test'
assert mojo.requiresProject.text() == 'false'
assert mojo.requiresOnline.text() == 'true'
assert mojo.requiresDirectInvocation.text() == 'true'
assert mojo.requiresReports.text() == 'true'
assert mojo.aggregator.text() == 'true'
assert mojo.configurator.text() == 'configurator-hint'
assert mojo.threadSafe.text() == 'true'
assert mojo.phase.text() == 'package'
assert mojo.executePhase.text() == 'compile'
assert mojo.executeLifecycle.text() == ''
assert mojo.executionStrategy.text() == 'always'
assert mojo.inheritedByDefault.text() == 'false'
assert mojo.instantiationStrategy.text() == 'singleton'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
assert parameter.name.text() == 'param'
assert parameter.alias.text() == 'myAlias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.since.text() == 'since-text'
assert parameter.deprecated.text() == 'deprecated-text'
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Parameter description.'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
// check help mojo source and class
assert new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" ).isFile()
assert new File( basedir, "target/generated-sources/plugin/org/apache/maven/plugin/coreit/HelpMojo.java" ).isFile()
assert !new File( basedir, "target/generated-sources/plugin/HelpMojo.java" ).isFile()
return true;

View File

@ -1,20 +0,0 @@
# 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.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:it0014
invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:help

View File

@ -1,100 +0,0 @@
<?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.its.basic-java-annotations</groupId>
<artifactId>maven-it-basic-java-annotations</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test :: basic-java-annotations</name>
<description>
Test plugin-plugin, which tests maven-plugin-tools-api and
maven-plugin-tools-java. This will generate a plugin descriptor from
java-based mojo sources, install the plugin, and then use it.
</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>@project.version@</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,66 +0,0 @@
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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import java.io.File;
import java.io.IOException;
/**
* Touches a test file.
*
*/
@Mojo( name = "it0014" )
public class CoreIt0014Mojo
extends AbstractMojo
{
@Parameter( property = "project.build.directory", required = true )
private String outputDirectory;
public void execute()
throws MojoExecutionException
{
getLog().info( "outputDirectory = " + outputDirectory );
File f = new File( outputDirectory );
if ( !f.exists() )
{
f.mkdirs();
}
File touch = new File( f, "touch.txt" );
try
{
touch.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Error writing verification file.", e );
}
}
}

View File

@ -1,91 +0,0 @@
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.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import org.apache.maven.settings.Settings;
import java.io.File;
/**
* Touches a test file.
*
* @since 1.2
* @deprecated Don't use!
*/
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
public class FirstMojo
extends AbstractMojo
{
/**
* Project directory.
*/
@Parameter( defaultValue = "${basedir}", readonly = true )
private File basedir;
@Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
required = true )
private File touchFile;
/**
* @since 0.1
* @deprecated As of 0.2
*/
@Parameter( name = "namedParam", alias = "alias" )
private String aliasedParam;
@Component( role = MavenProjectHelper.class, hint = "test" )
private Object projectHelper;
@Component
private MavenSession session;
@Component
private MavenProject project;
@Component
private MojoExecution mojo;
@Component
private PluginDescriptor plugin;
@Component
private Settings settings;
public void execute()
throws MojoExecutionException
{
}
}

View File

@ -1,47 +0,0 @@
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;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import java.io.File;
import java.io.IOException;
/**
* Could not use regex in @Parameter(defaultValue)
*/
@Mojo( name = "mplugin-220" )
public class MPlugin220Mojo
extends AbstractMojo
{
@Parameter( defaultValue = "[a-zA-Z]{2,}-\\\\d+" )
private String regex;
public void execute()
throws MojoExecutionException
{
getLog().info( "regex = " + regex );
}
}

View File

@ -1,76 +0,0 @@
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;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.InstantiationStrategy;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProjectHelper;
/**
* Checks maximum annotations with non-default values.
*
* @since since-text
* @deprecated deprecated-text
*/
@Mojo( name = "maximal",
aggregator = true,
configurator = "configurator-hint",
requiresDependencyResolution = ResolutionScope.COMPILE,
requiresDependencyCollection = ResolutionScope.TEST,
defaultPhase = LifecyclePhase.PACKAGE,
executionStrategy = "always",
instantiationStrategy = InstantiationStrategy.SINGLETON,
inheritByDefault = false,
requiresDirectInvocation = true,
requiresOnline = true,
requiresProject = false,
requiresReports = true,
threadSafe = true )
@Execute( phase = LifecyclePhase.COMPILE )
public class Maximal
extends AbstractMojo
{
/**
* Parameter description.
*
* @since since-text
* @deprecated deprecated-text
*/
@Parameter( alias = "myAlias",
property = "aProperty",
defaultValue = "${anExpression}",
readonly = true,
required = true )
private String param;
@Component( role = MavenProjectHelper.class, hint = "test" )
private Object projectHelper;
public void execute()
{
}
}

View File

@ -1,43 +0,0 @@
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;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProjectHelper;
// minimum annotations => default values
@Mojo( name = "minimal" )
public class Minimal
extends AbstractMojo
{
@Parameter
private String param;
@Component
private MavenProjectHelper projectHelper;
public void execute()
{
}
}

View File

@ -1,231 +0,0 @@
/*
* 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.
*/
File touchFile = new File( basedir, "target/touch.txt" )
assert touchFile.isFile()
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
assert descriptorFile.isFile()
def pluginDescriptor = new XmlParser().parse( descriptorFile );
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first" }[0]
assert mojo.goal.text() == 'first'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
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'
assert mojo.configuration.basedir[0].text() == ''
assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
assert mojo.configuration.session[0].text() == ''
assert mojo.configuration.session[0].'@implementation' == 'org.apache.maven.execution.MavenSession'
assert mojo.configuration.session[0].'@default-value' == '${session}'
assert mojo.configuration.project[0].text() == ''
assert mojo.configuration.project[0].'@implementation' == 'org.apache.maven.project.MavenProject'
assert mojo.configuration.project[0].'@default-value' == '${project}'
assert mojo.configuration.mojo[0].text() == ''
assert mojo.configuration.mojo[0].'@implementation' == 'org.apache.maven.plugin.MojoExecution'
assert mojo.configuration.mojo[0].'@default-value' == '${mojoExecution}'
assert mojo.configuration.plugin[0].text() == ''
assert mojo.configuration.plugin[0].'@implementation' == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
assert mojo.configuration.plugin[0].'@default-value' == '${plugin}'
assert mojo.configuration.settings[0].text() == ''
assert mojo.configuration.settings[0].'@implementation' == 'org.apache.maven.settings.Settings'
assert mojo.configuration.settings[0].'@default-value' == '${settings}'
assert mojo.requirements.requirement.size() == 1
assert mojo.requirements.requirement[0].role.text() == 'org.apache.maven.project.MavenProjectHelper'
assert mojo.requirements.requirement[0].'role-hint'.text() == 'test'
assert mojo.requirements.requirement[0].'field-name'.text() == 'projectHelper'
assert mojo.parameters.parameter.size() == 8
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "namedParam" }[0]
assert parameter.name.text() == 'namedParam'
assert parameter.alias.text() == 'alias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == 'As of 0.2'
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir" }[0]
assert parameter.name.text() == 'basedir'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Project directory.'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "mojo" }[0]
assert parameter.name.text() == 'mojo'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.plugin.MojoExecution'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "plugin" }[0]
assert parameter.name.text() == 'plugin'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "project" }[0]
assert parameter.name.text() == 'project'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.project.MavenProject'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "session" }[0]
assert parameter.name.text() == 'session'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.execution.MavenSession'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "settings" }[0]
assert parameter.name.text() == 'settings'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'org.apache.maven.settings.Settings'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile" }[0]
assert parameter.name.text() == 'touchFile'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
// check default values
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "minimal"}[0]
assert mojo.goal.text() == 'minimal'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Minimal'
assert mojo.language.text() == 'java'
assert mojo.description.text() == ''
assert mojo.deprecated.text() == ''
assert mojo.requiresDependencyResolution.text() == ''
assert mojo.requiresDependencyCollection.text() == ''
assert mojo.requiresProject.text() == 'true'
assert mojo.requiresOnline.text() == 'false'
assert mojo.requiresDirectInvocation.text() == 'false'
assert mojo.requiresReports.text() == 'false'
assert mojo.aggregator.text() == 'false'
assert mojo.threadSafe.text() == 'false'
assert mojo.phase.text() == ''
assert mojo.executePhase.text() == ''
assert mojo.executeLifecycle.text() == ''
assert mojo.executionStrategy.text() == 'once-per-session'
assert mojo.inheritedByDefault.text() == 'true'
assert mojo.instantiationStrategy.text() == 'per-lookup'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
assert parameter.name.text() == 'param'
assert parameter.alias.text() == ''
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == ''
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
def requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
// check values set by every annotation
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "maximal"}[0]
assert mojo.goal.text() == 'maximal'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Maximal'
assert mojo.language.text() == 'java'
assert mojo.description.text() == 'Checks maximum annotations with non-default values.'
assert mojo.deprecated.text() == 'deprecated-text'
assert mojo.requiresDependencyResolution.text() == 'compile'
assert mojo.requiresDependencyCollection.text() == 'test'
assert mojo.requiresProject.text() == 'false'
assert mojo.requiresOnline.text() == 'true'
assert mojo.requiresDirectInvocation.text() == 'true'
assert mojo.requiresReports.text() == 'true'
assert mojo.aggregator.text() == 'true'
assert mojo.configurator.text() == 'configurator-hint'
assert mojo.threadSafe.text() == 'true'
assert mojo.phase.text() == 'package'
assert mojo.executePhase.text() == 'compile'
assert mojo.executeLifecycle.text() == ''
assert mojo.executionStrategy.text() == 'always'
assert mojo.inheritedByDefault.text() == 'false'
assert mojo.instantiationStrategy.text() == 'singleton'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
assert parameter.name.text() == 'param'
assert parameter.alias.text() == 'myAlias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.since.text() == 'since-text'
assert parameter.deprecated.text() == 'deprecated-text'
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Parameter description.'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
// check help mojo source and class
assert new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" ).isFile()
assert new File( basedir, "target/generated-sources/plugin/org/apache/maven/plugin/coreit/HelpMojo.java" ).isFile()
assert !new File( basedir, "target/generated-sources/plugin/HelpMojo.java" ).isFile()
return true;

View File

@ -1,20 +1,2 @@
# 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.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.it0013:maven-it-it0013:1.0-SNAPSHOT:it0013
invoker.goals.1 = install
invoker.goals.2 = org.apache.maven.its.it0013:maven-it-it0013:1.0:it0013

View File

@ -19,12 +19,12 @@ 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">
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.it0013</groupId>
<artifactId>maven-it-it0013</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test :: it0013</name>
@ -42,12 +42,7 @@ under the License.
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>2.2.1</version>
<version>2.0</version>
</dependency>
</dependencies>

View File

@ -35,7 +35,7 @@ public class CoreIt0013Mojo
{
/**
* @parameter property="project.build.directory"
* @parameter expression="${project.build.directory}"
* @required
*/
private String outputDirectory;

View File

@ -19,13 +19,8 @@ package org.apache.maven.plugin.coreit;
* under the License.
*/
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.project.MavenProject;
import org.apache.maven.settings.Settings;
import java.io.File;
import java.io.IOException;
@ -52,13 +47,13 @@ public class FirstMojo
private File basedir;
/**
* @parameter expression="first.touchFile" default-value="${project.build.directory}/touch.txt"
* @parameter expression="${first.touchFile}" default-value="${project.build.directory}/touch.txt"
* @required
*/
private File touchFile;
/**
* @parameter name="namedParam" alias="alias"
* @parameter alias="alias"
* @deprecated As of 0.2
* @since 0.1
*/
@ -69,31 +64,6 @@ public class FirstMojo
*/
private Object projectHelper;
/**
* @component
*/
private MavenSession session;
/**
* @component
*/
private MavenProject project;
/**
* @component
*/
private MojoExecution mojo;
/**
* @component
*/
private PluginDescriptor plugin;
/**
* @component
*/
private Settings settings;
public void execute()
throws MojoExecutionException
{

View File

@ -1,71 +0,0 @@
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;
import org.apache.maven.project.MavenProjectHelper;
/**
* Checks maximum annotations with non-default values.
*
* @goal maximal
* @aggregator
* @configurator configurator-hint
* @execute phase="compile"
* @executionStrategy always
* @inheritByDefault false
* @instantiationStrategy singleton
* @phase package
* @requiresDependencyResolution compile
* @requiresDependencyCollection test
* @requiresDirectInvocation true
* @requiresOnline true
* @requiresProject false
* @requiresReports true
* @threadSafe
* @since since-text
* @deprecated deprecated-text
*/
public class Maximal
extends AbstractMojo
{
/**
* Parameter description.
*
* @parameter alias="myAlias" implementation="my.implementation" property="aProperty" default-value="${anExpression}"
* @readonly
* @required
* @since since-text
* @deprecated deprecated-text
*/
private String param;
/**
* @component role="org.apache.maven.project.MavenProjectHelper" roleHint="test"
* @since since-text
* @deprecated deprecated-text
*/
private Object projectHelper;
public void execute()
{
}
}

View File

@ -20,14 +20,14 @@ package org.apache.maven.plugin.coreit;
*/
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.plugins.annotations.Mojo;
/**
* Does nothing special.
*
* @goal second
* @requiresDependencyCollection compile
* @threadSafe
*/
@Mojo( name = "second", requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true )
public class SecondMojo
extends AbstractMojo
{

View File

@ -1,22 +1,3 @@
/*
* 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.
*/
File touchFile = new File( basedir, "target/touch.txt" )
assert touchFile.isFile()
@ -51,132 +32,41 @@ assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
assert mojo.requirements.requirement.size() == 6
assert mojo.requirements.requirement.size() == 1
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "session" }[0]
assert requirement.role.text() == 'org.apache.maven.execution.MavenSession'
assert requirement.'field-name'.text() == 'session'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "project" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProject'
assert requirement.'field-name'.text() == 'project'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "mojo" }[0]
assert requirement.role.text() == 'org.apache.maven.plugin.MojoExecution'
assert requirement.'field-name'.text() == 'mojo'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "plugin" }[0]
assert requirement.role.text() == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
assert requirement.'field-name'.text() == 'plugin'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "settings" }[0]
assert requirement.role.text() == 'org.apache.maven.settings.Settings'
assert requirement.'field-name'.text() == 'settings'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
assert requirement.'role-hint'.text() == 'test'
assert requirement.'field-name'.text() == 'projectHelper'
assert mojo.requirements.requirement[0].role.text() == 'org.apache.maven.project.MavenProjectHelper'
assert mojo.requirements.requirement[0].'role-hint'.text() == 'test'
assert mojo.requirements.requirement[0].'field-name'.text() == 'projectHelper'
assert mojo.parameters.parameter.size() == 3
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "namedParam" }[0]
assert parameter.name.text() == 'namedParam'
assert parameter.alias.text() == 'alias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == 'As of 0.2'
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
assert mojo.parameters.parameter[0].name.text() == 'aliasedParam'
assert mojo.parameters.parameter[0].alias.text() == 'alias'
assert mojo.parameters.parameter[0].type.text() == 'java.lang.String'
assert mojo.parameters.parameter[0].deprecated.text() == 'As of 0.2'
assert mojo.parameters.parameter[0].required.text() == 'false'
assert mojo.parameters.parameter[0].editable.text() == 'true'
assert mojo.parameters.parameter[0].description.text() == ''
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir" }[0]
assert parameter.name.text() == 'basedir'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Project directory.'
assert mojo.parameters.parameter[1].name.text() == 'basedir'
assert mojo.parameters.parameter[1].alias.isEmpty()
assert mojo.parameters.parameter[1].type.text() == 'java.io.File'
assert mojo.parameters.parameter[1].deprecated.isEmpty()
assert mojo.parameters.parameter[1].required.text() == 'false'
assert mojo.parameters.parameter[1].editable.text() == 'false'
assert mojo.parameters.parameter[1].description.text() == 'Project directory.'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile" }[0]
assert parameter.name.text() == 'touchFile'
assert parameter.alias.isEmpty()
assert parameter.type.text() == 'java.io.File'
assert parameter.deprecated.isEmpty()
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
assert mojo.parameters.parameter[2].name.text() == 'touchFile'
assert mojo.parameters.parameter[2].alias.isEmpty()
assert mojo.parameters.parameter[2].type.text() == 'java.io.File'
assert mojo.parameters.parameter[2].deprecated.isEmpty()
assert mojo.parameters.parameter[2].required.text() == 'true'
assert mojo.parameters.parameter[2].editable.text() == 'true'
assert mojo.parameters.parameter[2].description.text() == ''
// check default values
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "minimal"}[0]
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "second"}[0]
assert mojo.goal.text() == 'minimal'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Minimal'
assert mojo.language.text() == 'java'
assert mojo.description.text() == ''
assert mojo.deprecated.text() == ''
assert mojo.requiresDependencyResolution.text() == ''
assert mojo.requiresDependencyCollection.text() == ''
assert mojo.requiresProject.text() == 'true'
assert mojo.requiresOnline.text() == 'false'
assert mojo.requiresDirectInvocation.text() == 'false'
assert mojo.requiresReports.text() == 'false'
assert mojo.aggregator.text() == 'false'
assert mojo.threadSafe.text() == 'false'
assert mojo.phase.text() == ''
assert mojo.executePhase.text() == ''
assert mojo.executeLifecycle.text() == ''
assert mojo.executionStrategy.text() == 'once-per-session'
assert mojo.inheritedByDefault.text() == 'true'
assert mojo.instantiationStrategy.text() == 'per-lookup'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
assert parameter.name.text() == 'param'
assert parameter.alias.text() == ''
assert parameter.type.text() == 'java.lang.String'
assert parameter.deprecated.text() == ''
assert parameter.required.text() == 'false'
assert parameter.editable.text() == 'true'
assert parameter.description.text() == ''
def requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
// check values set by every annotation
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "maximal"}[0]
assert mojo.goal.text() == 'maximal'
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Maximal'
assert mojo.language.text() == 'java'
assert mojo.description.text() == 'Checks maximum annotations with non-default values.'
assert mojo.deprecated.text() == 'deprecated-text'
assert mojo.requiresDependencyResolution.text() == 'compile'
assert mojo.requiresDependencyCollection.text() == 'test'
assert mojo.requiresProject.text() == 'false'
assert mojo.requiresOnline.text() == 'true'
assert mojo.requiresDirectInvocation.text() == 'true'
assert mojo.requiresReports.text() == 'true'
assert mojo.aggregator.text() == 'true'
assert mojo.configurator.text() == 'configurator-hint'
assert mojo.requiresDependencyCollection.text() == 'compile'
assert mojo.threadSafe.text() == 'true'
assert mojo.phase.text() == 'package'
assert mojo.executePhase.text() == 'compile'
assert mojo.executeLifecycle.text() == ''
assert mojo.executionStrategy.text() == 'always'
assert mojo.inheritedByDefault.text() == 'false'
assert mojo.instantiationStrategy.text() == 'singleton'
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
assert parameter.name.text() == 'param'
assert parameter.alias.text() == 'myAlias'
assert parameter.type.text() == 'java.lang.String'
assert parameter.since.text() == 'since-text'
assert parameter.deprecated.text() == 'deprecated-text'
assert parameter.required.text() == 'true'
assert parameter.editable.text() == 'false'
assert parameter.description.text() == 'Parameter description.'
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
return true;

View File

@ -1,18 +0,0 @@
# 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 plugin:report -DskipTests

Some files were not shown because too many files have changed in this diff Show More