Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JBoss as:deploy未注入${buildNumber}_Java_Maven_Jboss_Buildnumber Maven Plugin - Fatal编程技术网

Java JBoss as:deploy未注入${buildNumber}

Java JBoss as:deploy未注入${buildNumber},java,maven,jboss,buildnumber-maven-plugin,Java,Maven,Jboss,Buildnumber Maven Plugin,我在“jboss as:deploy”中遇到此错误: [INFO] Building war: E:\git-repos\GUI4Leader\gui4leader\target\gui4leader-SNAPSHOT-0.6.16-12.04.13-08_09.war [INFO] WEB-INF\web.xml already added, skipping [INFO] [INFO] <<< jboss-as-maven-plugin:7.4.Final:deploy

我在“jboss as:deploy”中遇到此错误:

[INFO] Building war: E:\git-repos\GUI4Leader\gui4leader\target\gui4leader-SNAPSHOT-0.6.16-12.04.13-08_09.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO] 
[INFO] <<< jboss-as-maven-plugin:7.4.Final:deploy (default-cli) @ gui4leader <<<
[INFO] 
[INFO] --- jboss-as-maven-plugin:7.4.Final:deploy (default-cli) @ gui4leader ---
Apr 12, 2013 8:09:34 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA
Apr 12, 2013 8:09:34 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA
Apr 12, 2013 8:09:34 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.12.GA
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.910s
[INFO] Finished at: Fri Apr 12 08:09:37 CEST 2013
[INFO] Final Memory: 21M/299M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final:deploy (default-cli) on project gui4leader: Error executing FORCE_DEPLOY: E:\git-repos\GUI4Leader\gui4leader\target\gui4leader-SNAPSHOT-0.6.${buildNumber}-12.04.13-08_09.war (Das System kann die angegebene Datei nicht finden) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO]构建战争:E:\git repos\GUI4Leader\GUI4Leader\target\GUI4Leader-SNAPSHOT-0.6.16-12.04.13-08\u 09.war
[INFO]WEB-INF\WEB.xml已添加,正在跳过
[信息]
[信息]
我尝试了所有你能在评论中找到的东西。但没有任何帮助。 我想也许我需要编辑buildnumber maven插件的阶段,但我不是maven方面的专家。
有人知道如何解决这个问题吗?

从不使用buildNumber,但为什么有“buildNumber 0”?如果你调用插件的目标,则没有生命周期正在运行,这意味着buildNumber插件将不会运行。此外,您定义的buildNumber0的名称与您正在使用的buildNumber不相同。我使用${buildNumber}作为导出war的最终名称。buildNumber0将使用buildNumber.properties自动递增。在导出的war中,war的名称包括buildNumber,但jboss as插件不知道${buildNumber}的值。请尝试将buildNumber插件的阶段从“验证”更改为“初始化”。有解决方案吗?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1</version>
<executions>
    <execution>
        <phase>validate</phase>
        <goals>
            <goal>create</goal>
        </goals>
        </execution>
</executions>
<configuration>
    <doCheck>false</doCheck>
    <doUpdate>true</doUpdate>
    <format>{0,number}</format>
    <items>
        <item>buildNumber0</item>
    </items>
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
    <artifactId>jboss-as-maven-plugin</artifactId>
    <version>${version.jboss.maven.plugin}</version>
    <configuration>
        <!-- <filename>${project.build.finalName}.${project.packaging}</filename> -->
    <!-- <filename>${project.artifactId}-${project.version}.${buildNumber}-${maven.build.timestamp}.${project.packaging}</filename> -->
    </configuration>
</plugin>