Permalink
Browse files

added documentation + improvements

  • Loading branch information...
1 parent 4dc40a2 commit 36101e7ea3e3952fcecae2cb9563040a5b24cabf @Tibor17 committed Sep 28, 2012
Showing with 133 additions and 283 deletions.
  1. +112 −24 pom.xml
  2. +1 −1 src/main/assembly/src.xml
  3. +4 −243 src/main/config/settings.xml
  4. +15 −14 src/main/java/junit/runner/Version.java
  5. +1 −1 src/main/javadoc/stylesheet.css
View
@@ -212,9 +212,12 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</developers>
<contributors>
<contributor>
- <name>Tibor Digana</name>
+ <name>JUnit contributors</name>
+ <organization>JUnit</organization>
+ <email>junit@yahoogroups.com</email>
+ <url>https://github.com/KentBeck/junit/graphs/contributors</url>
<roles>
- <role>developer</role>
+ <role>developers</role>
</roles>
</contributor>
</contributors>
@@ -235,14 +238,24 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</dependencies>
<distributionManagement>
<downloadUrl>http://sourceforge.net/projects/junit/</downloadUrl>
- <repository>
+ <!--
+ Currently the deployment is under development and enabled for
+ the Snapshot Repository of the Maven Central.
+ -->
+ <snapshotRepository>
<id>sonatype-nexus-staging</id>
<name>upload.to.maven.central</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
- <!--
- <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
- -->
+ </snapshotRepository>
+ <!--
+ The Release Repository is temporarily disabled until the Maven build process
+ is officially proved to deploy to the Maven Central.
+ <repository>
+ <id>sonatype-nexus-staging</id>
+ <name>upload.to.maven.central</name>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
+ -->
</distributionManagement>
<build>
<resources>
@@ -257,6 +270,13 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</resource>
</resources>
<extensions>
+ <!--
+ Specify HTTP and FTP providers.
+ The Maven Wagon is a transport abstraction.
+ For more information see http://maven.apache.org/wagon/index.html
+ and the guide
+ http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
+ -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
@@ -269,7 +289,29 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</extension>
</extensions>
<plugins>
+ <!--
+ Both "org.apache" and "org.codehaus" are default providers of MOJO plugins
+ which are especially dedicated to Maven projects.
+ The MOJO stands for "Maven plain Old Java Object".
+ Each mojo is an executable goal in Maven, and a plugin is a distribution of
+ one or more related mojos.
+ For more information see http://maven.apache.org/plugin-developers/index.html
+
+ The following plugins are ordered according the Maven build lifecycle.
+ http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
+ -->
<plugin>
+ <!--
+ Assigns properties with prefix "junit"
+ For instance, project version 4.11-SNAPSHOT is parsed
+ and the following properties handle the values:
+ junit.majorVersion=4
+ junit.minorVersion=11
+ junit.incrementalVersion=0
+ junit.qualifier=SNAPSHOT
+ junit.buildNumber=0
+ These are handled in a profile with id "checkSnapshot".
+ -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
@@ -288,6 +330,11 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</executions>
</plugin>
<plugin>
+ <!--
+ Checks that the version of user's maven installation is 3.0.4,
+ the JDK is 1.5+, no non-standard repositories are specified in
+ the project, requires only release versions of dependencies of other artifacts.
+ -->
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.1.1</version>
<executions>
@@ -303,15 +350,15 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
<requireMavenVersion>
<message>Current version of Maven ${maven.version} required to build the project should be ${project.prerequisites.maven}, or higher!</message>
<version>${project.prerequisites.maven}</version>
- </requireMavenVersion>
- <requireJavaVersion>
- <message>Current JDK version ${java.version} should be ${jdkVersion}, or higher!</message>
- <version>${jdkVersion}</version>
- </requireJavaVersion>
- <requireNoRepositories>
- <message>Best Practice is to never define repositories in pom.xml (use a repository manager instead).</message>
- </requireNoRepositories>
- <requireReleaseDeps>
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <message>Current JDK version ${java.version} should be ${jdkVersion}, or higher!</message>
+ <version>${jdkVersion}</version>
+ </requireJavaVersion>
+ <requireNoRepositories>
+ <message>Best Practice is to never define repositories in pom.xml (use a repository manager instead).</message>
+ </requireNoRepositories>
+ <requireReleaseDeps>
<message>No Snapshots Dependencies Allowed!</message>
</requireReleaseDeps>
</rules>
@@ -320,6 +367,9 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</executions>
</plugin>
<plugin><!-- Using jdk 1.5.0_22, package-info.java files are compiled correctly. -->
+ <!--
+ java compiler plugin forked in extra process
+ -->
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
@@ -336,22 +386,23 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</configuration>
</plugin>
<plugin>
+ <!--
+ A plugin which uses the JUnit framework in order to start
+ our junit suite "AllTests" after the sources are compiled.
+ -->
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.3</version>
<configuration>
<test>org/junit/tests/AllTests.java</test>
<useSystemClassLoader>true</useSystemClassLoader>
<enableAssertions>false</enableAssertions>
</configuration>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-junit47</artifactId>
- <version>2.12.3</version>
- </dependency>
- </dependencies>
</plugin>
<plugin>
+ <!--
+ This plugin can package the main artifact's sources (src/main/java)
+ in to jar archive. See target/junit-*-sources.jar .
+ -->
<artifactId>maven-source-plugin</artifactId>
<version>2.2</version>
<executions>
@@ -365,12 +416,17 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</executions>
</plugin>
<plugin>
+ <!--
+ This plugin can generate Javadoc by a forked
+ process and then package the Javadoc in jar archive
+ target/junit-*-javadoc.jar .
+ -->
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>attach-javadoc</id>
- <phase>prepare-package</phase>
+ <phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
@@ -407,6 +463,11 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</executions>
</plugin>
<plugin>
+ <!--
+ This plugin fabricates a zip file including the traditional content
+ (sources, archives, Javadoc, and JUnit documentation)
+ before deploying to sourceforge.
+ -->
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
@@ -426,19 +487,33 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</executions>
</plugin>
<plugin>
+ <!--
+ The goal is to modify the SNAPSHOT version of development
+ to a release version. See the profile with id "checkSnapshot".
+ The plugin does not have a default phase to execute, thus you
+ can execute it in command line:
+ mvn -f pom.xml release:update-versions
+ See the Makefile.
+ -->
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration><!-- import release version without user's prompt if non-empty property value; otherwise prompt -->
<developmentVersion>${releaseVersion}</developmentVersion>
</configuration>
</plugin>
<plugin>
+ <!--
+ This wagon plugin uploads all jar archives and one zip file
+ to the sourceforge FTP server.
+ See the credentials for serve id "sourceforge-staging"
+ in src/main/config/settings.xml .
+ -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0-beta-4</version>
<executions>
<execution>
- <id>upload-javadoc</id>
+ <id>upload-to-sourceforge</id>
<phase>deploy</phase>
<goals>
<goal>upload</goal>
@@ -458,6 +533,11 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
<profiles>
<profile>
<id>checkRelease</id>
+ <!--
+ Purpose:
+ This section will check that the version is a release.
+ The release artifacts are deployed to Maven central release repository.
+ -->
<build>
<plugins>
<plugin>
@@ -486,6 +566,14 @@ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
</profile>
<profile>
<id>checkSnapshot</id>
+ <!--
+ Purpose:
+ This section will check the version is a snapshot and has
+ a correct form of "<major>.<minor>-SNAPSHOT" when preparing release.
+ An incremental version (like 4.11.x-SNAPSHOT) is not JUnit standard.
+ So if you mistakenly specify the incremental version, the build
+ fails. Same if "SNAPSHOT" qualifier is missing.
+ -->
<build>
<plugins>
<plugin>
@@ -33,7 +33,7 @@
<directoryMode>0755</directoryMode>
<includes>
<include>${groupId}:${artifactId}:${packaging}</include>
- <include>org.hamcrest:hamcrest-core</include>
+ <include>org.hamcrest:hamcrest-core</include>
</includes>
</dependencySet>
</dependencySets>
Oops, something went wrong.

0 comments on commit 36101e7

Please sign in to comment.