Uploaded image for project: 'Maven Shade Plugin'
  1. Maven Shade Plugin
  2. MSHADE-285

It should be possible to shade test sources as a JAR

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.2.2
    • None

    Description

      The configuration option createSourcesJar allows to shade sources JAR, but there is no such option for test sources.

      I see two solutions:

      1. Extend the semantics of createSourcesJar such that, when combined with shadeTestJar, is also creates the test sources JAR.
      2. Introduce a new configuration option createTestSourcesJar, similar to createSourcesJar.

      The former is very intuitive, but it lacks the flexibility to create a JAR, sources JAR, test JAR, but no test sources JAR. The latter allows more flexibility.

      Attachments

        Issue Links

          Activity

            Feel free to assign back to me, I'd be happy to fix this myself if you agree with the solution.

            peterdm Peter De Maeyer added a comment - Feel free to assign back to me, I'd be happy to fix this myself if you agree with the solution.

            Fixed + integration test added, pull request created.
            I took the second approach: introduced an optional parameter createTestSourcesJar with similar behavior as createSourcesJar, but for test sources.

            peterdm Peter De Maeyer added a comment - Fixed + integration test added, pull request created. I took the second approach: introduced an optional parameter createTestSourcesJar with similar behavior as createSourcesJar , but for test sources.
            struberg Mark Struberg added a comment -

            Thanks again Peter, excellent stuff!

            struberg Mark Struberg added a comment - Thanks again Peter, excellent stuff!

            People

              struberg Mark Struberg
              peterdm Peter De Maeyer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m