Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: fdd698f7 by Tony CHEMIT at 2017-03-30T10:55:51+02:00 Squash validators and validation modules - - - - - 8 changed files: - application-swing-configuration/pom.xml - application-swing-validation/pom.xml - application-web-configuration/pom.xml - services-runner/pom.xml - services-validation/pom.xml - toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateI18nValidatorFieldsMojo.java - toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorMojoSupport.java - toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorsDescriptorMojo.java Changes: ===================================== application-swing-configuration/pom.xml ===================================== --- a/application-swing-configuration/pom.xml +++ b/application-swing-configuration/pom.xml @@ -48,13 +48,13 @@ </dependency> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>services-validators</artifactId> + <artifactId>services-validation</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>application-swing-validators</artifactId> + <artifactId>application-swing-validation</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> ===================================== application-swing-validation/pom.xml ===================================== --- a/application-swing-validation/pom.xml +++ b/application-swing-validation/pom.xml @@ -126,6 +126,24 @@ <plugins> <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <executions> + <execution> + <id>compile-generated-sources</id> + <goals> + <goal>compile</goal> + </goals> + <phase>process-classes</phase> + <configuration> + <includes> + <include>**/I18nValidatorHelper.java</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> <groupId>${project.groupId}</groupId> <artifactId>toolbox-maven-plugin</artifactId> <version>${project.version}</version> @@ -144,7 +162,6 @@ </execution> <execution> <id>generate-validators-descriptor</id> - <phase>generate-sources</phase> <goals> <goal>generate-validators-descriptor</goal> </goals> @@ -156,11 +173,6 @@ <artifactId>services</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>application-swing-validators</artifactId> - <version>${project.version}</version> - </dependency> </dependencies> </plugin> @@ -173,6 +185,7 @@ <goals> <goal>parserJava</goal> </goals> + <phase>process-classes</phase> <configuration> <entries> <entry> @@ -187,6 +200,7 @@ <goals> <goal>parserValidation</goal> </goals> + <phase>process-classes</phase> <configuration> <entries> <entry> @@ -203,6 +217,7 @@ <goals> <goal>gen</goal> </goals> + <phase>process-classes</phase> </execution> </executions> </plugin> ===================================== application-web-configuration/pom.xml ===================================== --- a/application-web-configuration/pom.xml +++ b/application-web-configuration/pom.xml @@ -44,13 +44,13 @@ </dependency> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>services-validators</artifactId> + <artifactId>services-validation</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>application-swing-validators</artifactId> + <artifactId>application-swing-validation</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> ===================================== services-runner/pom.xml ===================================== --- a/services-runner/pom.xml +++ b/services-runner/pom.xml @@ -78,22 +78,10 @@ </dependency> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>services-validators</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> <artifactId>application-swing-validation</artifactId> <version>${project.version}</version> <scope>runtime</scope> </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>application-swing-validators</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> <!-- Nuiton --> ===================================== services-validation/pom.xml ===================================== --- a/services-validation/pom.xml +++ b/services-validation/pom.xml @@ -132,7 +132,6 @@ <executions> <execution> <id>generate-i18n-validator-fields</id> - <phase>generate-sources</phase> <goals> <goal>generate-i18n-validator-fields</goal> </goals> @@ -142,7 +141,6 @@ </execution> <execution> <id>generate-validators-descriptor</id> - <phase>generate-sources</phase> <goals> <goal>generate-validators-descriptor</goal> </goals> @@ -154,20 +152,33 @@ <artifactId>persistence</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>services-validators</artifactId> - <version>${project.version}</version> - </dependency> </dependencies> </plugin> <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <executions> + <execution> + <id>compile-generated-sources</id> + <goals> + <goal>compile</goal> + </goals> + <phase>process-classes</phase> + <configuration> + <includes> + <include>**/I18nValidatorHelper.java</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.nuiton.i18n</groupId> <artifactId>i18n-maven-plugin</artifactId> <executions> <execution> <id>parse-java</id> + <phase>process-classes</phase> <goals> <goal>parserJava</goal> </goals> @@ -182,6 +193,7 @@ </execution> <execution> <id>parse-validation</id> + <phase>process-classes</phase> <goals> <goal>parserValidation</goal> </goals> @@ -198,6 +210,7 @@ </execution> <execution> <id>gen</id> + <phase>process-classes</phase> <goals> <goal>gen</goal> </goals> ===================================== toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateI18nValidatorFieldsMojo.java ===================================== --- a/toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateI18nValidatorFieldsMojo.java +++ b/toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateI18nValidatorFieldsMojo.java @@ -44,7 +44,7 @@ import java.util.TreeSet; * @author Tony Chemit - dev@tchemit.fr * @since 5.0 */ -@Mojo(name = "generate-i18n-validator-fields", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE) +@Mojo(name = "generate-i18n-validator-fields", defaultPhase = LifecyclePhase.PROCESS_CLASSES, requiresDependencyResolution = ResolutionScope.COMPILE) class GenerateI18nValidatorFieldsMojo extends GenerateValidatorMojoSupport { /** ===================================== toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorMojoSupport.java ===================================== --- a/toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorMojoSupport.java +++ b/toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorMojoSupport.java @@ -84,7 +84,7 @@ public abstract class GenerateValidatorMojoSupport extends ToolboxMojoSupport im @Override public URLClassLoader getUrlClassLoader() throws MalformedURLException { - return initClassLoader(getProject(), validatorsFile.getParentFile(), true, false, true, true, false); + return initClassLoader(getProject(), validatorsFile.getParentFile(), false, true, true, true, true); } } ===================================== toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorsDescriptorMojo.java ===================================== --- a/toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorsDescriptorMojo.java +++ b/toolbox-maven-plugin/src/main/java/fr/ird/observe/maven/plugins/toolbox/GenerateValidatorsDescriptorMojo.java @@ -48,7 +48,7 @@ import java.util.TreeSet; * @author Tony Chemit - dev@tchemit.fr * @since 5.0 */ -@Mojo(name = "generate-validators-descriptor", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE) +@Mojo(name = "generate-validators-descriptor", defaultPhase = LifecyclePhase.PROCESS_CLASSES, requiresDependencyResolution = ResolutionScope.COMPILE) class GenerateValidatorsDescriptorMojo extends GenerateValidatorMojoSupport { /** View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/fdd698f79b9a0108c59f2c2fd1f8...
participants (1)
-
Tony CHEMIT