如何在maven exec插件中的主类之间交替?

时间:2014-03-29 22:10:31

标签: java maven

我有以下pom.xml:

    <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>exec-maven-plugin</artifactId>
       <version>1.2.1</version>
       <executions>
           <execution>
                <id>wizard</id>
                <goals>
                    <goal>java</goal>
                </goals>
                <configuration>
                   <mainClass>br.com.rafa.WizardLauncher</mainClass>
                </configuration>
           </execution>
           <execution>
                <id>default-cli</id>
                <goals>
                    <goal>java</goal>
                </goals>
                <configuration>
                    <mainClass>br.com.rafa.DesktopLauncher</mainClass>
                </configuration>
            </execution>
        </executions>
    </plugin>

如果我运行mvn exec:java,则执行DesktopLauncher。

如何在命令行执行之间切换?换句话说,我想在不更改pom.xml的情况下执行WizardLauncher。

0 个答案:

没有答案