2009-07-01 11 views

Respuesta

14

En realidad no es el Exec Maven Plugin para estos casos.

+0

Se respondió a esa respuesta, porque resuelve mi problema. Pero en cuestión había tomado sobre cualquier comando, no solo tareas Java. – Max

4
No

forma nativa.

Sin embargo, al usar AntRun plugin, puede especificar una tarea Ant (usando Exec) que ejecute un comando del sistema operativo durante la compilación.

<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> 
Cuestiones relacionadas