You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by adrien ruffie <ad...@hotmail.fr> on 2012/11/05 14:23:57 UTC
How to compile classes into customized plugin
Hello all I have a customized plugin, which produce patch for an
application, but in
The current
public class PatchBuilderMojo
extends AbstractMojo
A list of java file is provided and need to be compile in order to only
package it.
Any one know how I can only compile these classes et take it in order to
include
In a default file set like this:
DefaultFileSet dfs = new DefaultFileSet();
dfs.setIncludes(this.includeFiles);
dfs.setExcludes(this.excludeFiles);
if(dfs.getDirectory() != null){
this.zipArchiver.addFileSet(dfs);
}
this.zipArchiver.addFile(patchDescriptor,
this.patchName+".txt");
this.zipArchiver.setDestFile(new File(this.baseDirectory,
patchZipName) );
this.zipArchiver.createArchive();
Thank and best regards
PS: or I can specify a compilation before launch this customized plugin bind
to:
* @goal patch-package
* @requiresDependencyResolution compile
* @execute phase="compile"
* @requiresProject true
* @phase package
But It isn't very usefull because application have 1975 classes if compile
all classes is execute . it isn't very optimized if the patch only need to
compile 2~3 classes
Adrien