Index: maven-generator-plugin/src/java/org/codelutin/generator/plugin/Xmi2ObjectModel.java diff -u maven-generator-plugin/src/java/org/codelutin/generator/plugin/Xmi2ObjectModel.java:1.3 maven-generator-plugin/src/java/org/codelutin/generator/plugin/Xmi2ObjectModel.java:1.4 --- maven-generator-plugin/src/java/org/codelutin/generator/plugin/Xmi2ObjectModel.java:1.3 Fri Apr 28 08:52:09 2006 +++ maven-generator-plugin/src/java/org/codelutin/generator/plugin/Xmi2ObjectModel.java Fri Apr 28 09:10:52 2006 @@ -23,9 +23,9 @@ * Created: 14 avril 2006 * * @author ruchaud - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * - * Last update: $Date: 2006/04/28 08:52:09 $ + * Last update: $Date: 2006/04/28 09:10:52 $ * by : $Author: ruchaud $ */ @@ -138,11 +138,10 @@ /* Configuration */ copy.setTodir(destDirObjectModel); copy.setOverwrite(overwrite); - copy.setVerbose(true); FileSet fileSet = new FileSet(); fileSet.setDir(srcDirXmi); - fileSet.setIncludes("*.properties"); + fileSet.setExcludes("**/*.xmi"); copy.addFileset(fileSet); /* Execution */ Index: maven-generator-plugin/src/java/org/codelutin/generator/plugin/Zargo2Xmi.java diff -u maven-generator-plugin/src/java/org/codelutin/generator/plugin/Zargo2Xmi.java:1.1.1.1 maven-generator-plugin/src/java/org/codelutin/generator/plugin/Zargo2Xmi.java:1.2 --- maven-generator-plugin/src/java/org/codelutin/generator/plugin/Zargo2Xmi.java:1.1.1.1 Fri Apr 14 12:07:46 2006 +++ maven-generator-plugin/src/java/org/codelutin/generator/plugin/Zargo2Xmi.java Fri Apr 28 09:10:52 2006 @@ -23,9 +23,9 @@ * Created: 14 avril 2006 * * @author ruchaud - * @version $Revision: 1.1.1.1 $ + * @version $Revision: 1.2 $ * - * Last update: $Date: 2006/04/14 12:07:46 $ + * Last update: $Date: 2006/04/28 09:10:52 $ * by : $Author: ruchaud $ */ @@ -39,6 +39,7 @@ import org.apache.tools.ant.BuildLogger; import org.apache.tools.ant.NoBannerLogger; import org.apache.tools.ant.Project; +import org.apache.tools.ant.taskdefs.Copy; import org.apache.tools.ant.taskdefs.Expand; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.PatternSet; @@ -75,17 +76,13 @@ public void execute() throws MojoExecutionException, MojoFailureException { getLog().info("Extrait le fichier XMI des fichiers zargo"); - /* Création d'un projet ant */ - Project project = new Project(); - - BuildLogger logger = new NoBannerLogger(); - logger.setMessageOutputLevel(org.apache.tools.ant.Project.MSG_INFO); - logger.setOutputPrintStream(System.out); - logger.setErrorPrintStream(System.err); + actionZip(); + actionCopy(); + } - project.init(); - project.getBaseDir(); - project.addBuildListener(logger); + private void actionZip() { + /* Création d'un projet ant */ + Project project = createProject(); /* Création de la tâche */ Expand zip = new Expand(); @@ -112,4 +109,42 @@ /* Execution */ zip.execute(); } + + private void actionCopy(){ + /* Création d'un projet ant */ + Project project = createProject(); + + /* Création de la tâche ant Copy */ + Copy copy = new Copy(); + copy.setProject(project); + copy.setTaskName("Copy ressources"); + + /* Configuration */ + copy.setTodir(destDirXmi); + copy.setOverwrite(overwrite); + + FileSet fileSet = new FileSet(); + fileSet.setDir(srcDirZuml); + fileSet.setExcludes("**/*.zargo,**/*.zuml"); + copy.addFileset(fileSet); + + /* Execution */ + copy.execute(); + } + + private Project createProject() { + /* Création d'un projet ant */ + Project project = new Project(); + + BuildLogger logger = new NoBannerLogger(); + logger.setMessageOutputLevel(org.apache.tools.ant.Project.MSG_INFO); + logger.setOutputPrintStream(System.out); + logger.setErrorPrintStream(System.err); + + project.init(); + project.getBaseDir(); + project.addBuildListener(logger); + return project; + } + }