Class SourcesJarGenerator

All Implemented Interfaces:
Generator, ResourceProvider

public class SourcesJarGenerator extends JarGenerator

A special JarGenerator 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 Project.Properties.Version.

  • Constructor Details

    • SourcesJarGenerator

      public SourcesJarGenerator(Project project)
      Initializes a new sources jar generator.
      Parameters:
      project - the project