Maven设置XML插件

Maven设置XML插件,maven,plugins,Maven,Plugins,我有许多测试需要在WebSphereWeb服务器上运行,每次测试之前我都想重新启动服务器。在我的测试项目pom中,我可以使用: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <ver

我有许多测试需要在WebSphereWeb服务器上运行,每次测试之前我都想重新启动服务器。在我的测试项目pom中,我可以使用:

<plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.2</version>
                    <executions>
                        <execution>
                            <phase>pre-integration-test</phase>
                            <id>startServer</id>
                            <goals>
                                <goal>exec</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <executable>start.bat</executable>
                    </configuration>
                </plugin>

org.codehaus.mojo
execmaven插件
1.2
预集成测试
startServer
执行官
批处理
这里的问题是我有多个项目,每个项目都有不同功能的概要文件。我想将其移动到maven settings.xml中,这样配置文件对单个测试是透明的,并且仅根据jenkins提供的环境变量运行


似乎我不能在maven设置xml中使用插件。有没有办法做到这一点?

无法将其移动到settings.xml文件中。您是否有公司pom或项目父pom?不幸的是,现在看来,我必须在每个项目的pom中放置多个配置文件。这是一个简单的解决方案,我的老板很乐意开始创建一个公司pom或在父级中的多模块构建中创建一个……这非常重要。公司pom应该包含插件及其版本等。