wildlfy-maven-plugin忽略部署文件的路径

时间:2017-10-17 17:06:11

标签: java maven deployment wildfly

我尝试配置wildfly-maven-plugin以便从文件系统获取特定包并进行部署。但它忽略了我的配置。我正在使用插件的1.2.0.Final版本。我的配置有什么问题?

该插件配置如下

        <plugin>
            <groupId>org.wildfly.plugins</groupId>
            <artifactId>wildfly-maven-plugin</artifactId>
            <version>${wildfly.plugin.version}</version>
            <executions>
                <execution>
                    <configuration>
                        <targetDir>${project.build.directory}</targetDir>
                        <fileName>${ejb.fileName}.jar</fileName>
                    </configuration>
                </execution>
            </executions>
        </plugin>

我执行widlfly:deploy并报告以下错误

[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-
plugin:1.2.0.Final:deploy (default-cli) on project cotacao-service:
Execution default-cli of goal org.wildfly.plugins:wildfly-maven-
plugin:1.2.0.Final:deploy failed: java.nio.file.NoSuchFileException: 
C:\apps\my-app\target\my-app-service-1.0.0.jar -> [Help 1]

1 个答案:

答案 0 :(得分:0)

我弄明白了我的错误。正确的配置如下

        <plugin>
            <groupId>org.wildfly.plugins</groupId>
            <artifactId>wildfly-maven-plugin</artifactId>
            <version>${wildfly.plugin.version}</version>
            <configuration>
                <filename>${ejb.fileName}.jar</filename>
            </configuration>
        </plugin>