Uploaded image for project: 'Maven JAR Plugin'
  1. Maven JAR Plugin
  2. MJAR-296

No way to suppress default excludes in maven-jar-plugin

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.4.0
    • None
    • None

    Description

      With the default excludes being expanded further (see org.codehaus.plexus.util.AbstractScanner.DEFAULTEXCLUDES), a resource directory */ChangeSet/* will never be included in the JAR artifact.

      Some plugins (maven-resources-plugin, maven-assembly-plugin) already allow suppressing the exclusion, but not the maven-jar-plugin. Code analysis of the JarMojo -> DirectoryScanner call path confirms that there is no way to affect the FileSet configuration. 

      Again, with ever expanding list of DEFAULTEXCLUDES, this, on our opinion, is quite detrimental, and due to backward compatibility, changing resource/package path (say, to ChangeSet2) is not an option. 

      I am attaching a very simple project that shows two things:

      1. The jar plugin skips adding the */ChangeSet/* files
      2. The resources plugin is configured not to skip (addDefaultExcludes) and behaves properly

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sjaranowski Slawomir Jaranowski
            gvaysman G.Vaysman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment