Class SourcesJarBuilder

All Implemented Interfaces:
Generator, Renamable, ResourceProvider

public class SourcesJarBuilder extends JarBuilder

A special JarBuilder that generates a sources jar following the maven convention.

  • The content of the jar is obtained by requesting FileTrees with JavaSourceFiles from the project's suppliers.

  • The name of the jar is set to <artifactId>-<version>-sources.jar, where <artifactId> is the value of the project's property MvnProperties.ArtifactId with a fallback to the project's name. <version> is the value of the project's property CoreProperties.Version.

  • Constructor Details

    • SourcesJarBuilder

      public SourcesJarBuilder(Project project)
      Initializes a new sources JAR builder.
      Parameters:
      project - the project