Hi, I feel easiest would be to write shell script and use maven-exec-plugin or write your own plugin. But if you really want to use Maven, read on.
use these 2 goals: com.google.code.maven-svn-revision-number-plugin:maven-svn-revision-number-plugin:revision org.apache.maven.plugins:maven-scm-plugin:update 1. get revision number of file to property X 2. perform svn update 3. get revision number of file to property Y 4. Now you need to decide, if you want to run the SQL. pseudo: If Y = X > sql-maven-plugin.skip = true Unfortunately step 4 is not easily done in Maven :-( Profiles are evaluated before any plugin execution. Configuration passed to plugin execution is evaluated right before the execution. You could write your own small plugin, its easy. Or you could fake it with maven-antrun-plugin http://maven.apache.org/plugins/maven-antrun-plugin/usage.html http://maven.40175.n5.nabble.com/Shuttling-Property-Values-between-Maven-and-Ant-td2641670.html Alternativly you could use scm:diff instead of steps 1. and 3. ----- I use Jenkins for building and there is an option "Incremental build - only build changed modules". I would put sql file into separate module with no dependecies. I would add this module to aggregator. It would be built only when sql file has been changed in SVN. Petr > Hi, > > I want to execute a sql file, if its revision number is updated in the > svn i.e. if there is any modification in the file. Can you please suggest a > maven plugin that will fulfill this requirement. Any help is apprecaited. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
