Skip to content

Maven project junit:junit:jar #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Jan 9, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
32b5270
Maven project junit:junit artifact
Sep 22, 2012
6674534
completed deployment Sourcefore and Maven central: verified OK
Sep 23, 2012
a0f325e
type "make" helps you to build without studying a config of IDE for M…
Sep 26, 2012
4dc40a2
deleted **/junit/runner/LICENSE
Sep 26, 2012
36101e7
added documentation + improvements
Sep 28, 2012
ab70e74
signing all project artifacts before deployment
Sep 28, 2012
0d50826
fixed indentation in Version.java
Oct 21, 2012
7321e5a
changed password for deployment to ftp://upload.sourceforge.net/incoming
Oct 21, 2012
8bd5494
updated JUnit description
Oct 21, 2012
181369e
removed license in POM
Oct 21, 2012
c861b8a
Merge remote-tracking branch 'remotes/origin/master' into junit.maven…
Nov 25, 2012
8b0d35b
fix double dashes in a comment
Dec 22, 2012
15bef4e
Merge branch 'master' of git://github.com/Tibor17/junit into junit.ma…
Dec 22, 2012
8d8daa4
version 4.12-SNAPSHOT
Dec 22, 2012
9e09169
removed profile 'checkSnapshot', added profile 'sign'
Dec 22, 2012
b311f26
same as ANT => src/main/... not on sourceforge ftp
Dec 23, 2012
c409227
same as ANT => no 'Use' pages in javadoc
Dec 23, 2012
d24e5d8
same as ANT => excluded internal packages
Dec 23, 2012
a3838b9
removed unnecessary plugin
Dec 23, 2012
f95251a
Fix: renamed LICENSE->LICENSE.txt in jar/zip build files
Dec 23, 2012
8f7fa2a
Fix: check required maven version has unbounded max
Dec 23, 2012
4dc82ec
deleting the sh file
Jan 7, 2013
a1599c8
LICENSE->LICENSE.txt, removed truezip-maven-plugin
Jan 7, 2013
3c282dd
removed /stylesheet.css, and FTP deployment, updated downloadUrl
Jan 7, 2013
6f71f80
removed ZIP, refactoring, enabled snaphosts/releases Maven Central
Jan 7, 2013
535ad1c
Version.java update - same principle like in ANT
Jan 7, 2013
b7a55bf
fixed to 4 chars indentations from tabs
Jan 7, 2013
faf9726
Merge branch 'master' of git://github.com/KentBeck/junit into junit.m…
Jan 7, 2013
9eb408a
removed release-plugin
Jan 7, 2013
e7ad65f
Jenkins is using custom `localRepository`
Jan 8, 2013
1a637a4
removed odd spaces before period
Jan 8, 2013
a7092c4
assignation + settings reference
Jan 8, 2013
561fb84
removed spaces before period in comment
Jan 8, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
319 changes: 319 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12-SNAPSHOT</version>

<name>JUnit</name>
<url>http://junit.org</url>
<description>JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.</description>
<organization>
<name>JUnit</name>
<url>http://www.junit.org</url>
</organization>
<inceptionYear>2002</inceptionYear>
<mailingLists>
<mailingList>
<name>JUnit Mailing List</name>
<post>[email protected]</post>
<archive>http://tech.groups.yahoo.com/group/junit/</archive>
</mailingList>
</mailingLists>
<licenses>
<license>
<name>Common Public License Version 1.0</name>
<url>http://www.opensource.org/licenses/cpl1.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/KentBeck/junit.git</connection>
<developerConnection>scm:git:[email protected]:KentBeck/junit.git</developerConnection>
<url>http://github.com/KentBeck/junit/tree/master</url>
</scm>
<developers>
<developer>
<id>dsaff</id>
<name>David Saff</name>
<email>[email protected]</email>
</developer>
</developers>
<contributors>
<contributor>
<name>JUnit contributors</name>
<organization>JUnit</organization>
<email>[email protected]</email>
<url>https://github.com/KentBeck/junit/graphs/contributors</url>
<roles>
<role>developers</role>
</roles>
</contributor>
</contributors>
<properties>
<hamcrestVersion>1.3</hamcrestVersion>
<jdkVersion>1.5</jdkVersion>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
</properties>
<prerequisites>
<maven>3.0.4</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrestVersion}</version>
</dependency>
</dependencies>
<distributionManagement>
<downloadUrl>https://github.com/KentBeck/junit/wiki/Download-and-Install</downloadUrl>
<!--
Currently the deployment is under development and enabled for
the Snapshot Repository of the Maven Central.
-->
<snapshotRepository>
<id>maven-central-snapshots</id>
<name>upload.to.maven.central.snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<!--
Remote Release Repository.
-->
<repository>
<id>maven-central</id>
<name>upload.to.maven.central</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>LICENSE.txt</include>
</includes>
</resource>
</resources>
<extensions>
<!--
Specify HTTP 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-http</artifactId>
<version>1.0</version>
</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>
<!--
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>
<execution>
<id>enforce-versions</id>
<phase>initialize</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<fail>true</fail>
<rules>
<requireMavenVersion>
<!-- Some plugin features require a recent Maven runtime to work properly -->
<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>
<message>No Snapshots Dependencies Allowed!</message>
</requireReleaseDeps>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!--
Updates Version#id().
-->
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.3.8</version>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<ignoreMissingFile>false</ignoreMissingFile>
<file>src/main/java/junit/runner/Version.java.template</file>
<outputFile>src/main/java/junit/runner/Version.java</outputFile>
<regex>false</regex>
<token>@version@</token>
<value>${project.version}</value>
</configuration>
</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>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${jdkVersion}</source>
<target>${jdkVersion}</target>
<compilerVersion>1.5</compilerVersion>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<debug>true</debug>
<fork>true</fork>
<compilerArgument>-Xlint:unchecked</compilerArgument>
<maxmem>128m</maxmem>
</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>
</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>
<execution>
<id>attach-sources</id>
<phase>prepare-package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</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>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
<show>protected</show>
<author>false</author>
<version>false</version>
<detectLinks>false</detectLinks>
<linksource>true</linksource>
<keywords>true</keywords>
<use>false</use>
<windowtitle>JUnit API</windowtitle>
<encoding>UTF-8</encoding>
<locale>en</locale>
<javadocVersion>1.5</javadocVersion>
<javaApiLinks>
<property>
<name>api_1.5</name>
<value>http://docs.oracle.com/javase/1.5.0/docs/api/index.html</value>
</property>
</javaApiLinks>
<excludePackageNames>junit.*,*.internal,*.internal.*</excludePackageNames>
<verbose>true</verbose>
<minmemory>32m</minmemory>
<maxmemory>128m</maxmemory>
<failOnError>true</failOnError>
<includeDependencySources>true</includeDependencySources>
<dependencySourceIncludes>
<dependencySourceInclude>org.hamcrest:hamcrest-core:*</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sign</id>
<!--
Signs all artifacts before deploying to Maven Central.
-->
<build>
<plugins>
<plugin>
<!--
The goal is to sign all artifacts so that the user may verify them before downloading.
The automatic build system may reuire your key ID, and passphrase specified using system properties:
-Dgpg.passphrase="<passphrase>" -Dgpg.keyname="<your key ID>"
In order to create the key pair, use the command "gpg &ndash;&ndash;gen-key".
(&ndash;&ndash; stands for double dash)
-->
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>gpg-sign</id>
<phase>install</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
56 changes: 56 additions & 0 deletions src/main/config/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's bound to get confusing if people need to accept two licenses. Is there any way to use maven, and avoid this extra license?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the license will be removed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Safely? i.e., is there code in this file that really does need that license in order to be safely included?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it does not need the license. It's just a configuration file.
I was too lazy and too fast this week to clean it up, i was in hurry.

If you extract the installation package, you can see the file conf/setting.xml
http://www.us.apache.org/dist/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz
it is legal to create a custom one.
we do not need the original one.

a brief tutorial to this file:
http://maven.apache.org/guides/mini/guide-configuring-maven.html

we do not ship such file, because it's purpose is to configure the location of local repository /directory, and servers user/password.
So it is configuration for the local build, nothing else. That's the purpose of this file, nothing special.

No code in it.

I will refactor it, and 10% of the lines will stay.

no issue.

<!--
The JUnit build system is using this file.
All users should ignore it.

Settings Reference: http://maven.apache.org/ref/3.0.4/maven-settings/settings.html
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<!-- localRepository
The path to the local repository maven will use to store artifacts.
Default: ~/.m2/repository
<localRepository>${user.home}/.m2/repository</localRepository>
-->

<servers>
<!--
Specifies the authentication information to use when connecting to a particular server, identified by
a unique name within the system (referred to by the 'id' attribute below).
-->
<server>
<id>maven-central</id>
<username>???</username>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to settings-template.xml, and put a clearer comment about how to use it? I'm worried people will try to edit it in-place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a comment to it saying

"The JUnit build system is using this file. The JUnit developers should ignore it."

I am sure the people know the purpose. -;)
Their IDE does not require it. All the Maven people use every day is the pom.xml to compile the project, nothing is more important than pom.xml.

Therefore I would prefer standard name like it is now, and all of them will ignore it since they know that it is not their interest -nothing but interest of our CloudBees/Jenkins build system only.

These people say themselves "Ah, settings.xml -ok I do not need that - the project is built successfully so i need only pom.xml that's it."

They know that credentials do not make sense to specify in their private, like we contribs in development.
The credentials are read with command mvn deploy, and contributors have no benefit from deployment and random psswd.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsaff
I would help @marcphilipp in CloudBees when using this file if there is an issue. No problem.

<password>???</password>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
<configuration>
<timeout>15000</timeout> <!-- 15 seconds -->
<httpConfiguration>
<put>
<connectionTimeout>15000</connectionTimeout> <!-- 15 seconds -->
<readTimeout>15000</readTimeout> <!-- 15 seconds -->
</put>
</httpConfiguration>
</configuration>
</server>
<server>
<id>maven-central-snapshots</id>
<username>???</username>
<password>???</password>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
<configuration>
<timeout>15000</timeout> <!-- 15 seconds -->
<httpConfiguration>
<put>
<connectionTimeout>15000</connectionTimeout> <!-- 15 seconds -->
<readTimeout>15000</readTimeout> <!-- 15 seconds -->
</put>
</httpConfiguration>
</configuration>
</server>
</servers>
</settings>
2 changes: 1 addition & 1 deletion stylesheet.css → src/main/javadoc/stylesheet.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.