将更改推送到openshift项目时出错

时间:2014-05-03 14:05:04

标签: openshift

当我尝试在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

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

这是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位

1 个答案:

答案 0 :(得分:4)

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

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