Erik Drolshammer wrote:

Is it possible to do a

if (!filesExist) {
  cp log4j.properterties.tmpl log4j.properties
  cp profiles.xml.tmpl profiles.xml
}

from a maven-plugin?

Yes, it is, with antrun:

  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-antrun-plugin</artifactId>
  <executions>
    <execution>
      <phase>validate</phase>
      <goals>
        <goal>run</goal>
      </goals>
      <configuration>
        <tasks>
<!-- Overwrite defaults to false, so if the files already exists they will not be overwritten -->
          <copy file="profiles.xml.tmpl" tofile="profiles.xml"/>
<copy file="src/main/resources/log4j.properties.tmpl" tofile="src/main/resources/log4j.properties"/>
        </tasks>
      </configuration>
    </execution>
  </executions>
</plugin>


--
Kind regards,
Erik Drolshammer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to