@Mojo(name="collect-files",
requiresProject=true)
public class CollectFilesMojo
extends AbstractPlugin
implements PluginWithEncoding
Plugin.InitState, Plugin.Packaging| Modifier and Type | Field and Description |
|---|---|
protected org.apache.maven.artifact.Artifact |
artifact
Project artifact.
|
protected List<?> |
attachedArtifacts
The artifacts to publish from the project build.
|
protected boolean |
copyFiles
Un flag pour recopier les fichiers collectés.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
deploymentRepository
The remote repository.
|
protected String |
descriptionFile
File with all files collected (one file by line in absolute path).
|
protected boolean |
dryRun
Un flag pour activer le mode verbeux.
|
protected String |
encoding
Encoding a utiliser pour lire et ecrire les fichiers.
|
protected String |
excludes
File name pattern of selected files to publish.
|
protected String |
extraFiles
User extra files to collect.
|
protected List<File> |
files
Files to collect
|
protected boolean |
includeAttached
Un flag pour collecter aussi les fichiers attaches au projet.
|
protected String |
includes
File name pattern of selected files to publish.
|
protected boolean |
includeSiteAttached
Un flag pour collecter aussi les fichiers des sites attaches au projet.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
The local repository.
|
protected String |
outputDirectory
Directory where to store collected files.
|
protected org.apache.maven.project.MavenProject |
project
Fallback maven project (for maven 2).
|
protected List<?> |
reactorProjects
The projects in the reactor.
|
protected boolean |
skip
A flag to skip the goal.
|
protected boolean |
verbose
Un flag pour activer le mode verbeux.
|
| Constructor and Description |
|---|
CollectFilesMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFile(File f,
String msg,
List<File> files,
Pattern includePattern,
Pattern excludePattern) |
protected boolean |
checkSkip() |
void |
doAction() |
String |
getEncoding() |
protected List<File> |
getFiles() |
List<File> |
getFiles(File input)
Read a file containing on each line the path of a file.
|
org.apache.maven.project.MavenProject |
getProject() |
protected void |
init() |
boolean |
isVerbose() |
void |
setEncoding(String encoding) |
void |
setFiles(File output,
List<File> files)
Save the list of files in the given output file.
|
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setVerbose(boolean verbose) |
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContext@Parameter(property="reactorProjects",
readonly=true,
required=true)
protected List<?> reactorProjects
@Parameter(defaultValue="${project}",
required=true,
readonly=true)
protected org.apache.maven.project.MavenProject project
@Parameter(property="project.attachedArtifacts",
readonly=true,
required=true)
protected List<?> attachedArtifacts
@Parameter(property="localRepository",
readonly=true,
required=true)
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
@Parameter(property="project.distributionManagementArtifactRepository",
readonly=true,
required=true)
protected org.apache.maven.artifact.repository.ArtifactRepository deploymentRepository
@Parameter(property="project.artifact",
readonly=true,
required=true)
protected org.apache.maven.artifact.Artifact artifact
@Parameter(property="helper.extraFiles") protected String extraFiles
@Parameter(property="helper.includes",
defaultValue="")
protected String includes
@Parameter(property="helper.excludes",
defaultValue="")
protected String excludes
@Parameter(property="helper.outputDirectory",
defaultValue="target/collect")
protected String outputDirectory
@Parameter(property="helper.descriptionFile") protected String descriptionFile
@Parameter(property="helper.includeAttached",
defaultValue="true")
protected boolean includeAttached
@Parameter(property="helper.includeSiteAttached",
defaultValue="false")
protected boolean includeSiteAttached
@Parameter(property="helper.copyFiles",
defaultValue="true")
protected boolean copyFiles
@Parameter(property="helper.verbose",
defaultValue="${maven.verbose}")
protected boolean verbose
@Parameter(property="helper.skip",
defaultValue="false")
protected boolean skip
@Parameter(property="helper.dryRun",
defaultValue="false")
protected boolean dryRun
@Parameter(property="helper.encoding",
defaultValue="${project.build.sourceEncoding}",
required=true)
protected String encoding
protected void init()
throws Exception
init in class AbstractPluginExceptionprotected boolean checkSkip()
checkSkip in class AbstractPluginpublic void doAction()
throws Exception
doAction in class AbstractPluginExceptionpublic List<File> getFiles(File input) throws IOException
input - the file where to pick files (one file per line).IOException - if any pb while reading filepublic void setFiles(File output, List<File> files) throws IOException
output - the file when to writefiles - the files to storeIOException - if any pb when writing fileprotected void addFile(File f, String msg, List<File> files, Pattern includePattern, Pattern excludePattern)
public org.apache.maven.project.MavenProject getProject()
getProject in interface Pluginpublic void setProject(org.apache.maven.project.MavenProject project)
setProject in interface Pluginpublic void setVerbose(boolean verbose)
setVerbose in interface Pluginpublic String getEncoding()
getEncoding in interface PluginWithEncodingpublic void setEncoding(String encoding)
setEncoding in interface PluginWithEncodingCopyright © 2009–2016 CodeLutin. All rights reserved.