Skip to content
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

Migrate build system to Gradle #469

Merged
merged 7 commits into from
Aug 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Directory trees to ignore
/backups/
/build/
/buildSrc/build/
/buildSrc/subprojects/*/build/**
/buildSrc/subprojects/*/bin/**
/buildSrc/subprojects/*/out/**
/src/*/build/
/src/*/bin/
/src/*/out/
/src/protocol/*/build/
/src/protocol/*/bin/
/src/protocol/*/out/
/dist/
/docs/
/local/
Expand All @@ -10,6 +20,14 @@
/target/

!/bin/report-template/**/dist
/bin/temp/
/bin/testfiles/testReport*

# Ignore Gradle project-specific cache directory
.gradle

# macOS
.DS_Store

# specific files to ignore
*.log
Expand Down
50 changes: 17 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,38 @@
sudo: false
language: java

before_script:
- test "x$RUN_CHECKSTYLE" != 'x' || ant -Djava.awt.headless=true clean download_jars install
- test "x$RUN_CHECKSTYLE" != 'xtrue' || ant -Djava.awt.headless=true download_checkstyle

before_install:
- wget --no-check-certificate https://www.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz
- tar -xzvf apache-ant-1.10.5-bin.tar.gz
- export PATH="$(pwd)/apache-ant-1.10.5/bin:$PATH"
- echo $(ant -version)

# skip default "install" command
install: true

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

env:
global:
- ANT_OPTS="-Ddisable-svnCheck=true -Djava.awt.headless=true -Drmi_force_localhost=true"
- GRADLE_ARGS="-Djava.awt.headless=true"
# Building source and binary distributions takes time, and it does not verify much, so we skip it in CI
- SKIP_DIST_TASKS="$GRADLE_ARGS -PskipDist"

matrix:
include:
- jdk: oraclejdk8
env: RUN_CHECKSTYLE=true
script: ant -Djava.awt.headless=true checkstyle
- name: Coverage on our default build with Oracle Java 8
jdk: oraclejdk8
script:
- ant coverage-travis
after_success:
- bash <(curl -s https://codecov.io/bash)
sudo: true # otherwise TEST_HTTPS.jmx -> analytics.usa.gov does not work
- name: Tests with OpenJDK 8
- name: Tests with OpenJDK 8 + code coverage
jdk: openjdk8
script:
- ant test
- ./gradlew $GRADLE_ARGS check createDist jacocoReport
after_success:
- bash <(curl -s https://codecov.io/bash)
- name: Tests with OpenJDK 11
jdk: openjdk11
script:
- ant test
sudo: true # otherwise TEST_HTTPS.jmx -> analytics.usa.gov does not work
- ./gradlew $SKIP_DIST_TASKS -PskipCheckstyle build createDist
- name: Tests with OpenJDK EA
jdk: openjdk-ea
script:
- ant test
sudo: true # otherwise TEST_HTTPS.jmx -> analytics.usa.gov does not work
- ./gradlew $SKIP_DIST_TASKS -PskipCheckstyle build createDist
allow_failures:
- jdk: openjdk-ea
# disable building with jdk9 as it has a bug and will not compile JMeter
# see https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8193802
# - jdk: oraclejdk9
# script: ant -Djava.awt.headless=true -Drmi_force_localhost=true -Dskip.bug52310=true test
# sudo: true # otherwise TEST_HTTPS.jmx -> analytics.usa.gov does not work

35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,41 @@ See:
* https://bz.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&bug_severity=Blocker&bug_severity=Critical&bug_severity=Major&bug_severity=Normal&bug_severity=Regression&bug_severity=Minor&bug_severity=Trivial&product=JMeter&order=Bug%20Number&list_id=164231
* https://bz.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&bug_severity=Enhancement&product=JMeter&order=Bug%20Number&list_id=164232

## Development setup

### Gradle

You might find useful Gradle commands in [gradle.md](gradle.md)

### <a name="intellij"></a>IntelliJ IDEA

You require IntelliJ 2018.3.1 or newer.

1. Open the build.gradle.kts file with IntelliJ IDEA and choose `Open as Project`
1. Make sure `Create separate module per source set` is selected
1. Make sure `Use default gradle wrapper` is selected
1. In the `File already exists` dialogue, choose `Yes` to overwrite
1. In the `Open Project` dialogue, choose `Delete Existing Project and Import`

### Eclipse

Eclipse can import Gradle projects automatically via `Import...->Gradle project` wizard.

Optionally you can generate Eclipse project by running

./gradlew eclipse

The steps to import the sources (based on Eclipse 2019-06) into Eclipse are as follows:

1. Install `Eclipse IDE for Java Developers`
1. Install the Groovy Eclipse plugin and select Groovy Compiler 2.4 (some tests are written in Groovy)
1. Install `Kotlin for Eclipse` plugin (builds scripts are written in Kotlin)
1. Make sure you have a Java 8 compatible JDK configured in your workspace
1. Open `File->Import...`
1. Select `Existing Gradle Project` and click `Next`
1. Read `How to experience the best Gradle integration` and click `Next`
1. Then you might just click `Finish`

## :star2: Have a patch?
The best way to make sure your issue or feature is addressed is to submit a patch.
We accept patches through:
Expand Down
112 changes: 0 additions & 112 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -176,115 +176,3 @@
END OF TERMS AND CONDITIONS

============================ End of Apache License V 2.0 ===================

Source and binary distributions of Apache JMeter contain:

- icons from the Open Icon Library http://openiconlibrary.sourceforge.net/
For license details, please see the file: licenses/src/openiconlibrary.txt

Additional source files (also included in binary distributions):
For details, please see the files under: licenses/src

* bootstrap-3.3.4.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/bootstrap
* bootstrap-social.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/bootstrap-social
* datatables-1.10.9.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/datatables
* datatables-plugins.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/datatables-plugins
* datatables-responsive-1.0.5.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/datatables-responsive
* flot-0.8.3.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/flot
* flot-axislabels.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/flot-axislabels
* flot-tooltip-0.7.1.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/flot.tooltip
* font-awesome-4.2.0.txt (OFL-1.1 | MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/font-awesome
* holderjs.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/holderjs
* jquery-2.1.3.txt (MIT | ./bin/report-template/sbadmin2-1.0.7/bower_components/jquery
* metisMenu-1.1.3.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/metisMenu
* mocha-1.17.1.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/mocha
* morrisjs-0.5.0.txt (Simplified BSD) | ./bin/report-template/sbadmin2-1.0.7/bower_components/morrisjs
* raphael-2.1.4.txt (MIT) | ./bin/report-template/sbadmin2-1.0.7/bower_components/raphael
* start-bootstrap-admin2-1.0.7.txt (Apache License V2.0) | ./bin/report-template/sbadmin2-1.0.7 and not in the above folders

Binary distributions additionally contain software included under various licenses,
see below.

The following software is provided under the Apache License V 2.0 (as above):

- Software produced at the ASF:

* apache-bsf-2.4.0.jar
* beanshell-2.0b6.jar
* cglib-nodep-3.2.9.jar
* commons-codec-1.11.jar
* commons-collections-3.2.2.jar
* commons-dbcp2-2.5.0.jar
* commons-io-2.6.jar
* commons-jexl2-2.1.1.jar
* commons-jexl3-3.1.jar
* commons-lang3-3.8.1.jar
* commons-math3-3.6.1.jar
* commons-net-3.6.jar
* commons-pool2-2.6.0.jar
* commons-text-1.6.jar
* dec-0.1.2.jar
* groovy-all-2.4.16.jar
* httpasyncclient-4.1.4.jar
* httpclient-4.5.8.jar
* httpcore-4.4.11.jar
* httpcore-nio-4.4.11.jar
* httpmime-4.5.8.jar
* jakarta-oro-2.0.8.jar
* jms-1.1.1.jar
* log4j-1.2-api-2.11.1.jar
* log4j-api-2.11.1.jar
* log4j-core-2.11.1.jar
* log4j-slf4j-impl-2.11.1.jar
* serializer-2.7.2.jar
* startbootstrap-sb-admin-2-1.0.7
* tika-core-1.21.jar
* tika-parsers-1.21.jar
* xalan-2.7.2.jar
* xerces-2.12.0.jar
* xml-apis-1.4.01.jar
* xmlgraphics-commons-2.3.jar

- Software produced outside the ASF which is available under AL 2.0:

* accessors-smart-1.2.jar
* caffeine-2.6.2.jar
* darcula.jar
* freemarker-2.3.28.jar (AL2.0, see licenses/bin for additional info)
* jackson-annotations-2.9.9.jar
* jackson-core-2.9.9.jar
* jackson-databind-2.9.9.jar
* json-path-2.4.0.jar
* json-smart-2.3.jar
* mongo-java-driver-2.11.3.jar
* objenesis-2.6.jar
* ph-commons-9.2.1.jar
* ph-css-6.1.1.jar
* spock-core-1.2-groovy-2.4.jar

- Software produced outside the ASF which is available under other licenses (not AL 2.0):
For details, please see the files under: licenses/bin

* asm-7.0.jar (BSD)
* dnsjava-2.1.8.jar (BSD)
* hamcrest-core-1.3.jar (BSD)
* javamail-1.5.0-b01.jar (CDDL Version 1.0)
* javax.activation-api-1.2.0.jar (CDDL Version 1.1)
* javax.activation-1.2.0.jar (CDDL Version 1.1)
* jcharts-0.7.5.jar (?)
* jcl-over-slf4j-1.7.25.jar (MIT)
* jsoup-1.11.3.jar (MIT)
* jodd-core-5.0.6.jar (Simplified BSD)
* jodd-lagarto-5.0.6.jar (Simplified BSD)
* jodd-log-5.0.6.jar (Simplified BSD)
* jodd-props-5.0.6.jar (Simplified BSD)
* jtidy-r938.jar (?)
* junit-4.12.jar (BSD)
* rhino-1.7.10.jar (MPL 2.0)
* rsyntaxtextarea-3.0.2.jar (BSD)
* slf4j-api-1.7.25.jar (MIT)
* xmlpull-1.1.3.1.jar (Public Domain)
* xpp3-1.1.4c.jar (Indiana University Extreme! Lab Software License 1.1.1)
* xstream-1.4.11.jar (BSD)
* hamcrest-date-2.0.4.jar (BSD)
* Saxon-HE-9.9.1-1.jar (Mozilla Public License version 2.0)
Loading