How do I activate a Maven profile if a file does NOT exist? -


i’m using maven 3.2.3. how activate profile if file not exist on file system? have tried below, discovered <not> syntax isn’t supported:

            <profile>                     <id>create-test-mysql-props-file</id>                     <activation>                             <file>                                     <not><exists>${basedir}/src/main/myfile</exists></not>                             </file>                     </activation>                     <build>                             <plugins>                                     <!-- generate mysql datasource properties -->                                     <plugin>                                             <groupid>org.codehaus.mojo</groupid>                                             <artifactid>properties-maven-plugin</artifactid>                                             <version>1.0-alpha-2</version>                                             <executions>                                                     <execution>                                                             <phase>process-resources</phase>                                                             <goals>                                                                     <goal>write-project-properties</goal>                                                             </goals>                                                             <configuration>                                                                     <outputfile>                                                                             ${project.build.outputdirectory}/mysql_datasource.properties                                                                     </outputfile>                                                             </configuration>                                                     </execution>                                             </executions>                                     </plugin>                             </plugins>                     </build>             </profile> 

see http://maven.apache.org/ref/3.3.3//maven-model/maven.html#class_file

<missing>${basedir}/src/main/myfile</missing> 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -