mvn 执行批处理文件

build项 增加pluginManagement项目
<pluginManagement>
<plugins>
<plugin>
     <groupId>org.eclipse.m2e</groupId>
     <artifactId>lifecycle-mapping</artifactId>
     <version>1.0.0</version>
     <configuration>
       <lifecycleMappingMetadata>
         <pluginExecutions>
           <pluginExecution>
             <pluginExecutionFilter>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>exec-maven-plugin</artifactId>
               <versionRange>1.2</versionRange>               
               <goals>
                 <goal>exec</goal>
               </goals>
             </pluginExecutionFilter>
             <action>
               <execute>
                 <runOnIncremental>false</runOnIncremental>
               </execute >
             </action>
           </pluginExecution>
         </pluginExecutions>
       </lifecycleMappingMetadata>
     </configuration>
    </plugin>
   </plugins>
</pluginManagement>


plugins项,增加以下内容
<plugin> 
                <groupId>org.codehaus.mojo</groupId> 
                <artifactId>exec-maven-plugin</artifactId> 
                <version>1.2</version>               
                <executions>               
                    <execution> 
                        <id>Creating a Production Build with Sencha Command</id> 
                        <phase>generate-sources</phase> 
                        <goals> 
                            <goal>exec</goal> 
                        </goals> 
                        <configuration>
         <executable>src\main\dev\package.bat</executable>         
     </configuration> 
                    </execution> 
                </executions> 
            </plugin>

你可能感兴趣的:(mvn 执行批处理文件)