2009-07-01 8 views

Antwort

14

Tatsächlich gibt es die Exec Maven Plugin für diese Fälle.

+0

Es Antwort wurde ausgewählt, weil es mein Problem löst. Aber in Frage hatte ich mich mit irgendwelchen Befehlen beschäftigt, nicht nur mit Java-Aufgaben. – Max

4

nicht nativ.

Mit der AntRun plugin können Sie jedoch eine Ant-Task (mit Exec) angeben, die während des Builds einen OS-Befehl ausführt.

<project> 
    ... 
    <build> 
    <plugins> 
     <plugin> 
     <artifactId>maven-antrun-plugin</artifactId> 
     <executions> 
      <execution> 
      <phase> <!-- a lifecycle phase --> </phase> 
      <configuration> 
       <tasks> 

       <!-- 
        Place any Ant task here. You can add anything 
        you can add between <target> and </target> in a 
        build.xml. 
       --> 

       </tasks> 
      </configuration> 
      <goals> 
       <goal>run</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
    </plugins> 
    </build> 
    ... 
</project> 
Verwandte Themen