Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.0-RC1
-
Fix Version/s: None
-
Component/s: maven plugin
-
Labels:None
-
Environment:java on linux
-
Number of attachments :
Description
XMLBeans implemented a similar feature so that the compiler does not run on every build, but rather only on clean builds (or perhaps builds where at least one file must be recompiled). Right now, even if maven reports that no files need to be compiled, the JiBX compiler still executes. Either the project object can be consulted (taking a look at the compiler plugin) or a .staleFlag can be used that allows the developer to control when the compiler runs.
You could use a profile to active the plugin:
<profiles>
<profile>
<id>jibx</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>jibx</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jibx</groupId>
<artifactId>maven-jibx-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>bind</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
This would only run the binding compiler if you call Maven like this: mvn -Djibx=true process-classes