o Added basic IT for smoke testing
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@788500 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index e392107..08f217d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,20 +127,28 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.3</version>
+ <configuration>
+ <debug>true</debug>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <postBuildHookScript>verify</postBuildHookScript>
+ <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+ <settingsFile>src/it/settings.xml</settingsFile>
+ <goals>
+ <goal>clean</goal>
+ <goal>${project.groupId}:${project.artifactId}:${project.version}:check</goal>
+ </goals>
+ </configuration>
<executions>
<execution>
<id>integration-test</id>
- <phase>integration-test</phase>
- <configuration>
- <tasks>
- <echo /><echo /><echo /><echo /><echo />
- <echo level="warning">NO INTEGRATION TESTS DEFINED</echo>
- <echo /><echo /><echo /><echo /><echo />
- </tasks>
- </configuration>
<goals>
+ <goal>install</goal>
<goal>run</goal>
</goals>
</execution>
@@ -150,4 +158,4 @@
</build>
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>
diff --git a/src/it/basic/pom.xml b/src/it/basic/pom.xml
new file mode 100644
index 0000000..b1b8736
--- /dev/null
+++ b/src/it/basic/pom.xml
@@ -0,0 +1,135 @@
+<?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.install</groupId>
+ <artifactId>maven-it-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>maven-plugin</packaging>
+
+ <name>Test Plugin</name>
+ <description>
+ Tests the check of a simple plugin.
+ </description>
+ <url>http://maven.apache.org/plugins/maven-docck-plugin</url>
+ <inceptionYear>2009</inceptionYear>
+
+ <prerequisites>
+ <maven>2.0.6</maven>
+ </prerequisites>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-docck-plugin/</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-docck-plugin/</developerConnection>
+ <url>http://svn.apache.org/viewvc/maven/plugins/trunk/maven-docck-plugin/</url>
+ </scm>
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.codehaus.org/browse/MDOCCK</url>
+ </issueManagement>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>The Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <mailingLists>
+ <mailingList>
+ <name>Maven Announcements List</name>
+ <post>announce@maven.apache.org</post>
+ <subscribe>announce-subscribe@maven.apache.org</subscribe>
+ <unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/announce@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven-Announcements-f15617.html</otherArchive>
+ <otherArchive>http://markmail.org/list/org.apache.maven.announce</otherArchive>
+ </otherArchives>
+ </mailingList>
+ </mailingLists>
+
+ <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>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3.1</version>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
diff --git a/src/it/basic/src/main/java/test/TestMojo.java b/src/it/basic/src/main/java/test/TestMojo.java
new file mode 100644
index 0000000..3958097
--- /dev/null
+++ b/src/it/basic/src/main/java/test/TestMojo.java
@@ -0,0 +1,48 @@
+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;
+
+/**
+ * Does nothing.
+ *
+ * @goal test
+ */
+public class TestMojo
+ extends AbstractMojo
+{
+
+ /**
+ * The output directory.
+ *
+ * @parameter default-value="${project.build.directory}"
+ * @required
+ * @readonly
+ */
+ private String outputDirectory;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ }
+
+}
diff --git a/src/it/basic/src/site/apt/examples/file-output.apt b/src/it/basic/src/site/apt/examples/file-output.apt
new file mode 100644
index 0000000..1d68ea8
--- /dev/null
+++ b/src/it/basic/src/site/apt/examples/file-output.apt
@@ -0,0 +1,70 @@
+ ------
+ Sending the output to a file
+ ------
+ ------
+ 2008-09-14
+ ------
+
+~~ 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
+
+Sending the output to a file
+
+* Configuring your <<<pom.xml>>>
+
+ You can use the following configuration in your <<<pom.xml>>> to run the DOCCK
+ Plugin everytime the project is built and send its output to a file.
+
++---+
+<project>
+ ...
+ <build>
+ <plugins>
+ ...
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-docck-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <configuration>
+ <output>target/docck-results.txt</output>
+ </configuration>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ ...
+ </plugins>
+ </build>
+ ...
+</project>
++---+
+
+* From the command-line
+
+ You can also direct the command-line execution output to a file using:
+
++---+
+mvn docck:check -Doutput=target/docck-results.txt
++---+
+
diff --git a/src/it/basic/src/site/apt/index.apt b/src/it/basic/src/site/apt/index.apt
new file mode 100644
index 0000000..64ac826
--- /dev/null
+++ b/src/it/basic/src/site/apt/index.apt
@@ -0,0 +1,65 @@
+ ------
+ Introduction
+ ------
+ Dennis Lundberg
+ ------
+ 20 July 2006
+ ------
+
+~~ 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
+
+Maven DOCCK Plugin
+
+ This plugin checks that a project complies with the
+ {{{http://maven.apache.org/guides/development/guide-plugin-documentation.html}Plugin Documentation Standard}}.
+
+* Goals Overview
+
+ * {{{check-mojo.html}docck:check}} Checks a plugin's documentation for the standard minimums.
+
+ []
+
+* Usage
+
+ General instructions on how to use the DOCCK Plugin can be found on the {{{usage.html}usage page}}. Some more
+ specific use cases are described in the examples given below. Last but not least, users occasionally contribute
+ additional examples, tips or errata to the
+ {{{http://docs.codehaus.org/display/MAVENUSER/Documentation+Checker+Plugin}plugin's wiki page}}.
+
+ In case you still have questions regarding the plugin's usage, please have a look at the {{{faq.html}FAQ}} and feel
+ free to contact the {{{mail-lists.html}user mailing list}}. The posts to the mailing list are archived and could
+ already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching
+ the {{{mail-lists.html}mail archive}}.
+
+ If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our
+ {{{issue-tracking.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your
+ concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason,
+ entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated.
+ Of course, patches are welcome, too. Contributors can check out the project from our
+ {{{source-repository.html}source repository}} and will find supplementary information in the
+ {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}.
+
+* Examples
+
+ To provide you with better understanding of some usages of the DOCCK Plugin,
+ you can take a look at the following examples:
+
+ * {{{examples/file-output.html}Sending the output to a file}}
diff --git a/src/it/basic/src/site/apt/usage.apt b/src/it/basic/src/site/apt/usage.apt
new file mode 100644
index 0000000..252e46c
--- /dev/null
+++ b/src/it/basic/src/site/apt/usage.apt
@@ -0,0 +1,138 @@
+ ------
+ Usage
+ ------
+ ------
+ 2008-09-14
+ ------
+
+~~ 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
+
+Usage
+
+ This document is intended to provide instructions for using the
+ Maven DOCCK Plugin. In order for this discussion to be useful, it's
+ critical to cover two topics: Configuring your project's <<<pom.xml>>> to run
+ the plugin during every build and using the plugin from the command-line.
+
+* Configuring the plugin in <<<pom.xml>>>
+
+ You can use the following configuration in your <<<pom.xml>>> to run the DOCCK
+ Plugin everytime the project is built.
+
++---+
+<project>
+ ...
+ <build>
+ <plugins>
+ ...
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-docck-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ ...
+ </plugins>
+ </build>
+ ...
+</project>
++---+
+
+* Using the plugin from the command-line
+
+ The DOCCK Plugin is easily executed from the command line since it can run
+ without any parameter configuration.
+
+ To run the DOCCK Plugin on a project, type:
+
++---+
+mvn docck:check
++---+
+
+* Sample Output
+
+** Run with no documentation errors
+
++---+
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'docck'.
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Mojo Project
+[INFO] task-segment: [docck:check] (aggregator-style)
+[INFO] ----------------------------------------------------------------------------
+[INFO] [docck:check]
+[INFO] Checking project: Mojo Project
+[INFO] Using 2 extractors.
+[INFO] Applying extractor for language: java
+[INFO] Extractor for language: java found 1 mojo descriptors.
+[INFO] Applying extractor for language: bsh
+[INFO] Extractor for language: bsh found 0 mojo descriptors.
+[INFO] No documentation errors were found.
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 3 seconds
+[INFO] Finished at: Mon Jun 19 16:06:25 CST 2006
+[INFO] Final Memory: 3M/7M
+[INFO] ------------------------------------------------------------------------
++---+
+
+** Run with documentation errors
+
++---+
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'docck'.
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Mojo Project
+[INFO] task-segment: [docck:check] (aggregator-style)
+[INFO] ----------------------------------------------------------------------------
+[INFO] [docck:check]
+[INFO] Checking project: Mojo Project
+[INFO] Using 2 extractors.
+[INFO] Applying extractor for language: java
+[INFO] Extractor for language: java found 1 mojo descriptors.
+[INFO] Applying extractor for language: bsh
+[INFO] Extractor for language: bsh found 0 mojo descriptors.
+[ERROR] The following documentation problems were found:
+
+o Maven Documentation Checker Plugin (3 errors)
+ [ERROR] There is no 'index' file in your site directory (in apt|html|xml[.vm] format).
+ [ERROR] There are no example files in your site directory (in apt|html|xml[.vm] format). They should either be called 'example*.(apt|html|xml)[.vm]' or they should be located in the 'examples' directory.
+ [ERROR] Parameter: 'mojoParameter' in mojo: 'check' is missing a description.
+
+[INFO] ------------------------------------------------------------------------
+[ERROR] BUILD FAILURE
+[INFO] ------------------------------------------------------------------------
+[INFO] Documentation problems were found. Please see the console output above for more information.
+[INFO] ------------------------------------------------------------------------
+[INFO] For more information, run Maven with the -e switch
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 3 seconds
+[INFO] Finished at: Mon Jun 19 15:54:58 CST 2006
+[INFO] Final Memory: 3M/7M
+[INFO] ------------------------------------------------------------------------
++---+
diff --git a/src/it/basic/src/site/fml/faq.fml b/src/it/basic/src/site/fml/faq.fml
new file mode 100644
index 0000000..b621002
--- /dev/null
+++ b/src/it/basic/src/site/fml/faq.fml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<faqs id="FAQ" title="Frequently Asked Questions">
+ <part id="General">
+ <faq id="question1">
+ <question>Where did the standard came from?</question>
+ <answer>
+ <p>
+ The plugin documentation standard was created to address the frequent
+ complaint of lack of documentation, specifically for the Maven plugins.
+ The standard was based on suggestions made on the Maven dev mailing
+ list with some refinements. It is a community consensus of what basic
+ documentation a Maven plugin should have.
+ </p>
+ </answer>
+ </faq>
+ <faq id="question2">
+ <question>Why do we need a documentation standard?</question>
+ <answer>
+ <p>
+ The standard is not a set of rules but a guide to help plugin
+ developers document their plugins better, for the benefit of the users
+ of the plugin. The standard also reminds the plugin developers of the
+ important details that needs to be documented, to help speed up the
+ adoption of the plugin.
+ </p>
+ </answer>
+ </faq>
+ </part>
+</faqs>
diff --git a/src/it/basic/src/site/site.xml b/src/it/basic/src/site/site.xml
new file mode 100644
index 0000000..052bb1d
--- /dev/null
+++ b/src/it/basic/src/site/site.xml
@@ -0,0 +1,34 @@
+<?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>
+ <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>
+ <menu name="Examples">
+ <item name="Sending the output to a file" href="examples/file-output.html" />
+ </menu>
+ </body>
+</project>
diff --git a/src/it/settings.xml b/src/it/settings.xml
new file mode 100644
index 0000000..c8f77f0
--- /dev/null
+++ b/src/it/settings.xml
@@ -0,0 +1,55 @@
+<?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.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>it-repo</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>local.central</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>local.central</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+</settings>