[Buix-commits] r140 - trunk/maven-jaxx-plugin/src/main/java/jaxx
Author: tchemit Date: 2008-01-12 12:37:15 +0000 (Sat, 12 Jan 2008) New Revision: 140 Modified: trunk/maven-jaxx-plugin/src/main/java/jaxx/JaxxGeneratorGoal.java Log: rajout des propri?\195?\169t?\195?\169s includes et celles pour utiliser javac Modified: trunk/maven-jaxx-plugin/src/main/java/jaxx/JaxxGeneratorGoal.java =================================================================== --- trunk/maven-jaxx-plugin/src/main/java/jaxx/JaxxGeneratorGoal.java 2008-01-12 12:35:39 UTC (rev 139) +++ trunk/maven-jaxx-plugin/src/main/java/jaxx/JaxxGeneratorGoal.java 2008-01-12 12:37:15 UTC (rev 140) @@ -53,13 +53,32 @@ * @parameter expression="${jaxx.optimize}" default-value="false" */ protected boolean optimize; + /** + * @description pour demander la compilation via javac des sources g�n�r�s + * @parameter expression="${jaxx.runJavac}" default-value="false" + */ + protected boolean runJavac; /** + * @description les options de la compilation + * @parameter expression="${jaxx.javaOpts}" default-value="" + */ + protected String javaOpts=""; + + /** + * @description pour filter + * @parameter expression="${jaxx.includes}" + */ + protected String[] includes; + + /** * @description verbose * @parameter expression="${jaxx.verbose}" default-value="${maven.verbose}" */ protected boolean verbose; + protected String[] files; + private static final String[] INCLUDES = {"**\\/*.jaxx"}; public void execute() throws MojoExecutionException, MojoFailureException { @@ -68,9 +87,9 @@ DirectoryScanner ds = new DirectoryScanner(); ds.setBasedir(getSrc()); - ds.setIncludes(INCLUDES); + ds.setIncludes(includes==null|| includes.length==0?INCLUDES:includes); ds.scan(); - String[] files = ds.getIncludedFiles(); + files = ds.getIncludedFiles(); log.info("jaxx - found " + files.length + " file(s) to generate. "); CompilerOptions options = toCompilerOptions(); if (verbose) { @@ -91,9 +110,9 @@ public CompilerOptions toCompilerOptions() { CompilerOptions result = new CompilerOptions(); result.setClassPath(getSrc().getPath()); - result.setJavacOpts(""); + result.setJavacOpts(getJavaOpts()); result.setKeepJavaFiles(true); - result.setRunJavac(false); + result.setRunJavac(isRunJavac()); result.setOptimize(isOptimize()); result.setTargetDirectory(getOut()); return result; @@ -112,4 +131,48 @@ public File getOut() { return out; } + + public String getJavaOpts() { + return javaOpts; + } + + public boolean isRunJavac() { + return runJavac; + } + + public String[] getIncludes() { + return includes; + } + + public void setJavaOpts(String javaOpts) { + this.javaOpts = javaOpts; + } + + public void setOptimize(boolean optimize) { + this.optimize = optimize; + } + + public void setOut(File out) { + this.out = out; + } + + public void setRunJavac(boolean runJavac) { + this.runJavac = runJavac; + } + + public void setSrc(File src) { + this.src = src; + } + + public void setVerbose(boolean verbose) { + this.verbose = verbose; + } + + public void setIncludes(String[] includes) { + this.includes = includes; + } + + public String[] getFiles() { + return files; + } } \ No newline at end of file
participants (1)
-
tchemit@users.labs.libre-entreprise.org