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 #448

Closed
wants to merge 10,000 commits into from
Closed

Migrate build system to Gradle #448

wants to merge 10,000 commits into from

Conversation

vlsi
Copy link
Collaborator

@vlsi vlsi commented Feb 24, 2019

The following command might be used to show all the files that were modified: git log -M30% --stat -p -G.

To be implemented

  • Build ApacheJMeter_config.jar
  • native2ascii for properties file
  • Align license management for third-party
  • Deal with JMeterVersionTest (it is probably obsolete, however there might be useful bits)
  • Release approach (e.g. git tag, publish, etc)
  • Deal with src/protocol/junit/test, src/protocol/junit/woolfel
  • Run batch tests
  • Run batch client-server tests
  • Fix "message.properties" test (org.apache.jmeter.resources.PackageTest)
  • Findbugs/Spotbugs? Is it required?
  • Build site documentation from xdocs
  • Build printable documentation
  • Combined coverage report across all tests
  • Publish results to Sonar
  • Compute SHA512 for all the things
  • Publish Maven to Apache Maven Repository
  • Create source distribution
  • Push distributions to Apache repository

Implemented features

Useful commands (gw comes from https://github.com/dougborg/gdub, otherwise ./gradlew can be used instead):

  • Build and run

    # Build and start JMeter GUI
    gw runGui
    
    # Build project and copy relevant jars to rootDir/lib, and start JMeter
    gw createDist; ./bin/jmeter
    
    # Build all distributions (source, binary)
    gw :src:dist:assemble
    
  • Base project info

    # Display all submodules
    gw projects
    # Different tasks for current module
    gw tasks
    
  • Cleaning build directories
    Technically speaking, clean should not be required (every time it is required it might be just a bug), however it might be useful to perform a "clean" build

    # Cleans current project (submodule)
    gw clean
    # Cleans the specified project
    gw :src:core:clean
    
  • Dependencies

    # Displays dependencies. Gradle's "configurations" are something like different classpaths.
    gw dependencies
    
    # Analyze why the project depends on `org.ow2.asm:asm`
    gw dependencyInsight --dependency org.ow2.asm:asm
    
    # Verify checksums of dependencies
    gw verifyChecksums
    
    # Print current checksums like in gradle/dependencyVerification.gradle.kts
    gw calculateChecksums
    
  • Static checks

    # Run RAT
    gw rat
    # Run checkstyle for main (non-test) code
    gw checkstyleMain
    # Run checkstyle for test code
    gw checkstyleTest
    
  • Compiling code

    gw compileJava
    gw compileTestJava
    ...
    
  • Build project

    # Just build jar (see build/libs/*.jar)
    gw jar
    # "build" is a default task to "execute all the actions"
    gw build
    # Test might be skipped by `-x test` (Gradle's default way to skip task by name)
    gw -x test build
    # Build project in parallel
    gw build --parallel
    
  • Tests
    Gradle automatically tracks task dependencies, so if you modify a file in /src/jorphan/*, then you can just invoke gw check at project level or in core module, and Gradle will automatically build the required jars and files.

    # Runs all the tests (unit tests, checkstyle, etc)
    gw check
    # Runs just unit tests
    gw test
    # Runs just core tests
    gw :src:core:test
    
  • Coverage

    # Generates code coverage report for the test task to build/reports/jacoco/test/html
    gw jacocoTestReport
    # Generate combined coverage report
    # to be implemented
    
  • Generate Javadocs

    # Builds javadoc to build/docs/javadoc subfolder
    gw javadoc
    # Builds javadoc jar to build/libs/jorphan-javadoc.jar
    gw javadocJar
    
  • Site

    # Creates preview of a site to build/docs/site
    gw :src:dist:previewSite
    
    # Builds and publishes site preview to a Git repository
    gw :src:dist:pushPreviewSite
    
  • Maven

    # publishes Maven artifact to local repository
    gw publishToMavenLocal
    
  • Release artifacts

    # Builds ZIP and TGZ artifacts for the release
    gw :src:dist:build
    
  • Signing
    It is implemented via https://docs.gradle.org/5.2.1/userguide/signing_plugin.html, so it is done automatically provided credentials are specified via https://docs.gradle.org/5.2.1/userguide/signing_plugin.html#sec:signatory_credentials

    # Signs all the artifacts of the current module (see results in build/**/*.asc
    gw sign
    
  • Releasing
    It is not yet fully implemented, however basic bits can be tested.
    Use https://github.com/vlsi/asflike-release-environment to start a local "release environment" (==SVN, Nexus, etc)

    # Builds the project, pushes artifacts to svn://.../dev, stages artifacts to Nexus staging repository
    # Note: it uses https://github.com/vlsi/asflike-release-environment, so it does not alter public repositories
    gw -Prelease prepareVote
    
    # Publishes staged artifacts to SVN and Nexus
    gw -Prelease publishDist
    

pmouawad and others added 30 commits January 23, 2019 20:54
Bugzilla Id: 63106

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1851980 13f79535-47bb-0310-9956-ffa450edef68
Upgrade to httpclient 4.5.7 and revert workaround 
Bugzilla Id: 62852

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852155 13f79535-47bb-0310-9956-ffa450edef68
Bugzilla Id: 63090

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852156 13f79535-47bb-0310-9956-ffa450edef68
Convert from LoggerWrapper to our own Wrapper that delegates to an logger.
Removing our own dependency on the removed jar.

Bugzilla Id: 63090


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852166 13f79535-47bb-0310-9956-ffa450edef68
Remove license file for slf4j-ext

Bugzilla Id: 63090



git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852168 13f79535-47bb-0310-9956-ffa450edef68
- Variable naming
- return instead of if

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852537 13f79535-47bb-0310-9956-ffa450edef68
…in debug, it should be in error

Bugzilla Id: 63138

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852777 13f79535-47bb-0310-9956-ffa450edef68
Thanks @ Ivan Ricanti

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852921 13f79535-47bb-0310-9956-ffa450edef68
…ctional mode or property subresults.disable_renaming=true.

Implemented by Artem Fedorov (artem.fedorov at blazemeter.com) and contributed by BlazeMeter.

This closes apache#439
Bugzilla Id: 63055

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852943 13f79535-47bb-0310-9956-ffa450edef68
Thanks at Saxonica
Bugzilla Id: 63033

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852945 13f79535-47bb-0310-9956-ffa450edef68
Fix test failure
Bugzilla Id: 63033

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852946 13f79535-47bb-0310-9956-ffa450edef68
Fix test failure
Bugzilla Id: 63033

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852952 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1852979 13f79535-47bb-0310-9956-ffa450edef68
Improvements:

- Allow updating Test Plan instead of creating a whole one
- Add a comment on HTTP Request saying it was created from cURL on date
Fixes:

- If !request.isCompressed, don't add gzip,deflate
Bugzilla Id: 62959

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1853058 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1853059 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1853060 13f79535-47bb-0310-9956-ffa450edef68
FSchumacher and others added 6 commits May 28, 2019 19:17
… around numbers.

Bugzilla Id: 63471


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1860297 13f79535-47bb-0310-9956-ffa450edef68
… around booleans.

Even if that is not the direct bug reported here, it makes sense to test for spaces
and upper/lowercase madness for booleans as well. No change of code was needed, this
is a test case change, only.

Bugzilla Id: 63471


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1860318 13f79535-47bb-0310-9956-ffa450edef68
@vlsi vlsi force-pushed the gradle branch 2 times, most recently from 8863d0f to 8e7ab0f Compare May 29, 2019 12:14
Update the Jackson libraries used from 2.9.8 to current 2.9.9 due to
CVE-2019-12086 in Jackson-Databind.

Bugzilla Id: 63473


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1860342 13f79535-47bb-0310-9956-ffa450edef68
@vlsi vlsi force-pushed the gradle branch 2 times, most recently from c5db460 to cfb2fbe Compare May 29, 2019 13:15
@vlsi vlsi force-pushed the gradle branch 4 times, most recently from 66a0cc3 to 2ba449c Compare May 30, 2019 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants