public abstract class AbstractSourceJarMojo extends AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected boolean |
excludeResources
Specifies whether or not to exclude resources from the sources-jar.
|
protected String |
finalName
The filename to be used for the generated archive file.
|
protected boolean |
includePom
Specifies whether or not to include the POM file in the sources-jar.
|
protected File |
outputDirectory
The directory where the generated archive file will be put.
|
protected org.apache.maven.project.MavenProject |
project
The Maven Project Object
|
protected List |
reactorProjects
Contains the full list of projects in the reactor.
|
Constructor and Description |
---|
AbstractSourceJarMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
addDirectory(Archiver archiver,
File sourceDirectory,
String[] includes,
String[] excludes) |
protected void |
addDirectory(Archiver archiver,
File sourceDirectory,
String prefix,
String[] includes,
String[] excludes) |
protected void |
archiveProjectContent(org.apache.maven.project.MavenProject p,
Archiver archiver) |
protected MavenArchiver |
createArchiver() |
void |
execute() |
protected abstract String |
getClassifier() |
protected String |
getExtension() |
protected org.apache.maven.project.MavenProject |
getProject(org.apache.maven.project.MavenProject p) |
protected abstract List<Resource> |
getResources(org.apache.maven.project.MavenProject p) |
protected abstract List<String> |
getSources(org.apache.maven.project.MavenProject p) |
protected String |
getType() |
protected void |
packageSources(List<org.apache.maven.project.MavenProject> projects) |
protected void |
packageSources(org.apache.maven.project.MavenProject p) |
getLog, getPluginContext, setLog, setPluginContext
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
@Parameter(property="source.excludeResources", defaultValue="false") protected boolean excludeResources
@Parameter(property="source.includePom", defaultValue="false") protected boolean includePom
@Parameter(defaultValue="${project.build.directory}") protected File outputDirectory
@Parameter(defaultValue="${project.build.finalName}") protected String finalName
@Parameter(defaultValue="${reactorProjects}", readonly=true) protected List reactorProjects
public void execute() throws MojoExecutionException
MojoExecutionException
protected abstract String getClassifier()
sources
or test-sources
protected abstract List<String> getSources(org.apache.maven.project.MavenProject p) throws MojoExecutionException
p
- not nullMojoExecutionException
protected abstract List<Resource> getResources(org.apache.maven.project.MavenProject p) throws MojoExecutionException
p
- not nullMojoExecutionException
protected void packageSources(org.apache.maven.project.MavenProject p) throws MojoExecutionException
MojoExecutionException
protected void packageSources(List<org.apache.maven.project.MavenProject> projects) throws MojoExecutionException
MojoExecutionException
protected void archiveProjectContent(org.apache.maven.project.MavenProject p, Archiver archiver) throws MojoExecutionException
MojoExecutionException
protected MavenArchiver createArchiver() throws MojoExecutionException
MojoExecutionException
protected void addDirectory(Archiver archiver, File sourceDirectory, String[] includes, String[] excludes) throws MojoExecutionException
MojoExecutionException
protected void addDirectory(Archiver archiver, File sourceDirectory, String prefix, String[] includes, String[] excludes) throws MojoExecutionException
MojoExecutionException
protected String getExtension()
protected org.apache.maven.project.MavenProject getProject(org.apache.maven.project.MavenProject p)
protected String getType()
Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.