o Added stub versions of core plugins which participate in the various lifecycle bindings

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@697428 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-09-20 22:40:52 +00:00
parent b4d752effa
commit f6a4e06028
39 changed files with 3051 additions and 0 deletions

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Clean Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Clean Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal clean
* @phase clean
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class CleanMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/clean-clean.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Compiler Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Compiler Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal compile
* @phase compile
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class CompileMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/compiler-compile.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal testCompile
* @phase test-compile
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class TestCompileMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/compiler-test-compile.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Deploy Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Deploy Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal deploy
* @phase deploy
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class DeployMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/deploy-deploy.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven EAR Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven EAR Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal ear
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class EarMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/ear-ear.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal generate-application-xml
* @phase generate-resources
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class GenerateApplicationXmlMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/ear-generate-application-xml.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven EJB Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven EJB Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal ejb
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class EjbMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/ejb-ejb.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Install Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Install Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal install
* @phase install
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class InstallMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/install-install.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven JAR Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven JAR Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal jar
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class JarMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/jar-jar.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Javadoc Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Javadoc Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal jar
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class JarMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/javadoc-jar.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Plugin Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Plugin Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal addPluginArtifactMetadata
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class AddPluginArtifactMetadataMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/plugin-add-plugin-artifact-metadata.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal descriptor
* @phase generate-resources
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class DescriptorMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/plugin-descriptor.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal updateRegistry
* @phase install
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class UpdateRegistryMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/plugin-update-registry.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-rar-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven RAR Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven RAR Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal rar
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class RarMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/rar-rar.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Resources Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Resources Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal resources
* @phase process-resources
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class ResourcesMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/resources-resources.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal testResources
* @phase process-test-resources
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class TestResourcesMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/resources-test-resources.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Site Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Site Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal attach-descriptor
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class AttachDescriptorMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/site-attach-descriptor.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal deploy
* @phase site-deploy
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class DeployMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/site-deploy.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal site
* @phase site
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class SiteMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/site-site.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Source Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Source Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal jar
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class JarMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/source-jar.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven Surefire Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven Surefire Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal test
* @phase test
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class TestMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/surefire-test.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,59 @@
<?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>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>0.1-stub-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test Plugin :: Maven WAR Plugin Stub</name>
<description>
A test plugin that has the same coordinates and goals as the Maven WAR Plugin. Its goals only create marker
files to check the principle invocation of the goals via the build lifecycle binding.
</description>
<inceptionYear>2008</inceptionYear>
<properties>
<maven.test.skip>true</maven.test.skip>
</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>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,96 @@
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.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
/**
* Creates a text file in the project base directory.
*
* @goal war
* @phase package
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class WarMojo
extends AbstractMojo
{
/**
* The current Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
private MavenProject project;
/**
* The path to the output file, relative to the project base directory directory.
*
* @parameter
*/
private String pathname = "target/war-war.txt";
/**
* Runs this mojo.
*
* @throws MojoExecutionException If the output file could not be created.
* @throws MojoFailureException If the output file has not been set.
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "[MAVEN-CORE-IT-LOG] Using output file path: " + pathname );
if ( pathname == null || pathname.length() <= 0 )
{
throw new MojoFailureException( "Path name for output file has not been specified" );
}
File outputFile = new File( pathname );
if ( !outputFile.isAbsolute() )
{
outputFile = new File( project.getBasedir(), pathname ).getAbsoluteFile();
}
getLog().info( "[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile );
try
{
outputFile.getParentFile().mkdirs();
outputFile.createNewFile();
}
catch ( IOException e )
{
throw new MojoExecutionException( "Output file could not be created: " + pathname, e );
}
getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
}
}

View File

@ -0,0 +1,53 @@
<?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>
<artifactId>maven-it-plugins</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<artifactId>maven-it-plugin-core-stubs</artifactId>
<packaging>pom</packaging>
<name>Maven Integration Tests :: Core Plugin Stubs</name>
<modules>
<module>maven-clean-plugin</module>
<module>maven-compiler-plugin</module>
<module>maven-deploy-plugin</module>
<module>maven-ear-plugin</module>
<module>maven-ejb-plugin</module>
<module>maven-install-plugin</module>
<module>maven-jar-plugin</module>
<module>maven-javadoc-plugin</module>
<module>maven-plugin-plugin</module>
<module>maven-rar-plugin</module>
<module>maven-resources-plugin</module>
<module>maven-site-plugin</module>
<module>maven-source-plugin</module>
<module>maven-surefire-plugin</module>
<module>maven-war-plugin</module>
</modules>
</project>

View File

@ -37,6 +37,7 @@ under the License.
<modules>
<module>maven-it-plugin-configuration</module>
<module>maven-it-plugin-context-passing</module>
<module>maven-it-plugin-core-stubs</module>
<module>maven-it-plugin-file</module>
<module>maven-it-plugin-fork</module>
<module>maven-it-plugin-generate-envar-properties</module>