我使用Maven是为了自动
,
设置(并启动)JBoss服务器
部署下载的依赖项
在那里。我创造了一个
pom.xml
JBoss相关
野蝇-maven.plugin插件
(当前版本为2.0.1.Final)。
因为我不是在构建一个工件,而是在下载它,所以我并没有真正生成一个JAR(或者任何归档的工件)。
我现在的问题是
wildfly maven插件似乎没有做任何事情,如果
包装
设置为
聚甲醛
作为一种解决方法,我目前将项目打包设置为JAR,并添加了以下内容以防止项目JAR生成:
<properties>
<jar.skipIfEmpty>true</jar.skipIfEmpty>
<maven.install.skip>true</maven.install.skip>
</properties>
更新04.03
这是我的梦想pom.xml文件基本上看起来像:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>some.group</groupId>
<artifactId>artifact</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>~y</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.install.skip>true</maven.install.skip>
<jar.skipIfEmpty>true</jar.skipIfEmpty>
<plugin.wildfly.version>2.0.1.Final</plugin.wildfly.version>
<plugin.wildfly.jboss-home>D:\server\jboss-eap-7.1</plugin.wildfly.jboss-home>
<plugin.wildfly.hostname>localhost</plugin.wildfly.hostname>
<plugin.wildfly.port>9990</plugin.wildfly.port>
<plugin.wildfly.debug.port>9991</plugin.wildfly.debug.port>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${plugin.wildfly.version}</version>
<configuration>
<jboss-home>${plugin.wildfly.jboss-home}</jboss-home>
<id>local-jboss</id>
<hostname>${plugin.wildfly.hostname}</hostname>
<port>${plugin.wildfly.port}</port>
<filename>y.ear</filename>
<force>true</force>
</configuration>
<executions>
<execution>
<id>deploy-ear</id>
<phase>install</phase>
<goals>
<goal>deploy-only</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我会给你的
deploy-artifact
一次尝试,但总的来说我希望
<packaging>
设置为
pom
命令行上的Maven命令来构建它:
mvn clean install
.
我的真实pom.xml文件有点复杂,但如果用这个简单的pom.xml文件,我可以使它在我使用的更复杂的一个工作。