【问题标题】:Error when pushing changes to openshift project将更改推送到 openshift 项目时出错
【发布时间】:2014-05-03 14:05:04
【问题描述】:

当我尝试在 open shift 项目中推送一些更改时,在尝试构建项目时出现此错误:

remote: Found pom.xml... attempting to build with 'mvn --global-settings /var/lib/openshift/531f20d5500446fb69000112/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml clean package -Popenshift -DskipTests'
remote: [INFO] Scanning for projects...
remote: [INFO]
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Building radwan02 1.0
remote: [INFO] ------------------------------------------------------------------------
remote: [WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 0.292s
remote: [INFO] Finished at: Sat May 03 09:58:48 EDT 2014
remote: [INFO] Final Memory: 3M/78M
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to parse plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1 (/var/lib/openshift/531f20d5500446fb69000112/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar): zip file is empty -> [Help 1]
remote: [ERROR]
remote: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
remote: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginDescriptorParsingException
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/531f20d5500446fb69000112/jbossews

之后项目状态为“正在构建”,并且在我手动重新启动项目后,我所做的更改并未应用于服务器。

这是 pom 文件(我没有更改任何内容):

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>radwan02</groupId>
<artifactId>radwan02</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>radwan02</name>
<repositories>
    <repository>
        <id>eap</id>
        <url>http://maven.repository.redhat.com/techpreview/all</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>eap</id>
        <url>http://maven.repository.redhat.com/techpreview/all</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.2-1003-jdbc4</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.25</version>
    </dependency>           
</dependencies>
<profiles>
    <profile>
        <!-- When built in OpenShift the 'openshift' profile will be used when 
            invoking mvn. -->
        <!-- Use this profile for any OpenShift specific customization your app 
            will need. -->
        <!-- By default that is to put the resulting archive into the 'webapps' 
            folder. -->
        <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
        <id>openshift</id>
        <build>
            <finalName>radwan02</finalName>
            <plugins>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1.1</version>
                    <configuration>
                        <outputDirectory>webapps</outputDirectory>
                        <warName>ROOT</warName>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

我在windows 7下使用jBoss Developer Studo,JDK 1.7 64位

【问题讨论】:

    标签: openshift


    【解决方案1】:

    我刚刚创建了一个新的 Tomcat 7 应用程序,并且构建完成,没有任何错误。有几个解决方案:

    1. 创建一个新应用程序并再次推送更改。以防万一那个装备有问题。
    2. 在现有应用程序 .openshift/markers 目录中创建一个名为 force_clean_build 的空文件。提交文件并推送更改。这将删除 .m2 存储库并再次下载所有依赖项和插件。

    【讨论】:

    • 第二、第三、第四……解决方案对我不起作用。所以我一次又一次地开始第一个openshift解决方案:(但是我只在我的项目中更正了javascript!并且丢失了几天并且在我的站点guide.crimean.us仍然有“服务暂时不可用”@openshift项目什么时候会稳定?..
    猜你喜欢
    • 1970-01-01
    • 2013-01-07
    • 2019-04-16
    • 2015-05-29
    • 1970-01-01
    • 2017-03-12
    • 1970-01-01
    • 2018-05-11
    • 2012-04-22
    相关资源
    最近更新 更多