是否可以通过命令行中的id调用maven-exec-plugin(或任何其他插件)执行?
假设我的pom.xml文件如下所示:
<project>
[...]
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>foo</id>
            <goals>
                <goal>exec</goal>
            </goals>
            <phase></phase>
            <configuration>
                <executable>echo</executable>
                <arguments>
                    <argument>foo</argument>
                </arguments>
            </configuration>
        </execution>
        <execution>
            <id>bar</id>
            <goals>
                <goal>exec</goal>
            </goals>
            <phase></phase>
            <configuration>
                <executable>echo</executable>
                <arguments>
                    <argument>bar</argument>
                </arguments>
                </configuration>
            </execution>
        </executions>
    </plugin>
[...]
</project>
现在可以打电话了
mvn exec:exec
有一些额外的魔法来运行执行"foo"?
好奇的是,有一个替代解决方案,使用此处提供的配置文件:http: //www.mail-archive.com/user@mojo.codehaus.org/msg00151.html