How do I determine the stale resources in a Mojo to avoid reprocessing them?
This can be done using the following piece of code: // Imports needed import org.codehaus.plexus.compiler.util.scan.InclusionScanException; import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner; import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping; // At some point of your code StaleSourceScanner scanner = new StaleSourceScanner( 0, Collections.singleton( “**/*.xml” ), Collections.EMPTY_SET ); scanner.addSourceMapping( new SuffixMapping( “.xml”, “.html” ) ); Set
This can be done using the following piece of code: // Imports needed import org.codehaus.plexus.compiler.util.scan.InclusionScanException; import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner; import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping; // At some point of your code StaleSourceScanner scanner = new StaleSourceScanner( 0, Collections.singleton( “**/*.xml” ), Collections.EMPTY_SET ); scanner.addSourceMapping( new SuffixMapping( “.xml”, “.html” ) ); Set