-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1504] include dependencies, cleanup build config, update README
- Loading branch information
Showing
9 changed files
with
105 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,54 @@ | ||
# Picocli Legacy Tests | ||
|
||
This project runs the tests for the main `picocli` project in a Java 5 environment. | ||
This project builds the main `picocli` project and runs its tests in a Java 5 environment. | ||
|
||
While the directory structure may suggest that this is a subproject of the `picocli` project, it is actually a standalone project, not a module. | ||
## This project is for testing only | ||
The build for this project compiles the Java source files in the `../src/java` and `../test/java` folders of the parent project, and then runs the tests. | ||
While the directory structure may suggest that this is a subproject of the `picocli` project, it is actually a standalone project, and not included as a module in the main build. | ||
|
||
This project does not publish any artifacts. | ||
|
||
Note to self: do the following before running this build: | ||
## Gradle version | ||
This project uses an old version of Gradle (1.12); I believe this is the most recent version of Gradle that runs on Java 5. (Later versions require at least Java 6.) | ||
|
||
## HTTPS problems on Java 5 | ||
I was unable to automate downloading the Gradle 1.12 binary via HTTPS when running the Gradle Wrapper on Java 5; there seemed to be some issue with TLS versions; I could not get HTTPS to work on Java 5. | ||
|
||
A similar issue exists with test dependencies: while picocli itself does not have any dependencies, the test classes do have some dependencies. | ||
Maven Central and other repositories require downloads to use HTTPS and disallow plain HTTP. | ||
I have not been able to use HTTPS when running on Java 5. | ||
This causes the build to fail; Gradle reports errors when trying to download test dependencies and aborts the build. | ||
|
||
## Binaries included in project | ||
To work around these problems, I ended up including some binaries in this project: | ||
|
||
* the Gradle Wrapper included in this project also has a copy of the Gradle 1.12 binary distribution | ||
* the test dependency binaries are included in the `lib` directory of this project | ||
|
||
I realize this is uncouth, inelegant and a generally barbarous thing to do. I am a sinner, please forgive me. | ||
|
||
## Usage | ||
This project assumes that you have Java 5 installed. | ||
|
||
If you have multiple versions of Java installed, then before running this build, set the `JAVA_HOME` environment variable to the directory where Java 5 is installed: | ||
|
||
``` | ||
: (on Windows) | ||
: start command prompt if we are running in Powershell | ||
cmd | ||
: ensure we are not using the OneDrive user home directory | ||
set JAVA_OPTS=-Duser.home=C:\Users\remko\.m2\repository | ||
: build the project once with Java 8 so that all dependencies are downloaded and cached | ||
cd .. | ||
gradlew assemble | ||
cd picocli-legacy-tests | ||
: now build the project with Java 5, 6 and 7 | ||
cd picocli-legacy-tests | ||
set JAVA_HOME=C:\apps\jdk1.5.0_22 | ||
gradlew clean build | ||
gradlew clean build --no-daemon | ||
set JAVA_HOME=C:\apps\jdk1.6.0_45 | ||
gradlew clean build | ||
gradlew clean build --no-daemon | ||
set JAVA_HOME=C:\apps\jdk1.7.0_80 | ||
gradlew clean build --no-daemon | ||
``` | ||
|
||
## Usage from CI Continuous Integration builds | ||
|
||
See the `../.github/workflows/ci.yml` workflow for a concrete example, specifically the `build-java-6-7` section. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?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/maven-v4_0_0.xsd "> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>junit</groupId> | ||
<artifactId>junit-dep</artifactId> | ||
<packaging>pom</packaging> | ||
<version>4.11</version> | ||
<distributionManagement> | ||
<relocation> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<message>The artifact junit:junit does not contain Hamcrest anymore but declares a dependency to Hamcrest. Thus, junit:junit-dep has become obsolete.</message> | ||
</relocation> | ||
</distributionManagement> | ||
<name>JUnit</name> | ||
<url>http://junit.org</url> | ||
<description> | ||
JUnit is a regression testing framework written by Erich Gamma and Kent Beck. | ||
It is used by the developer who implements unit tests in Java. | ||
</description> | ||
<organization> | ||
<name>JUnit</name> | ||
<url>http://www.junit.org</url> | ||
</organization> | ||
<mailingLists> | ||
<mailingList> | ||
<name>JUnit Mailing List</name> | ||
<post>junit@yahoogroups.com</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> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<connection>scm:git:git://github.com/KentBeck/junit.git</connection> | ||
<developerConnection>scm:git:git@github.com:KentBeck/junit.git</developerConnection> | ||
<url>http://github.com/KentBeck/junit/tree/master</url> | ||
</scm> | ||
<developers> | ||
<developer> | ||
<id>dsaff</id> | ||
<name>David Saff</name> | ||
<email>david@saff.net</email> | ||
</developer> | ||
</developers> | ||
</project> |
Binary file not shown.