我是Openshift的新手,並且無法將我的Java EE項目部署到它。我爲一個簡單的webstore製作了REST API。本地它在Wildfly 9.0.2上正常工作我想在openshift上部署它。我已經使用eclipse openshit JBoss的插件,取得了新的wildfly9 + mysql5.5應用程序,並增加了配置文件根的pom.xml:將Java EE Wildfly REST應用程序部署到Openshift
<profiles> <profile> <id>openshift</id> <build> <finalName>webstore</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <outputDirectory>deployments</outputDirectory> </configuration>
</plugin> </plugins> </build> </profile> </profiles>
我的根項目包含幾個行家模塊,包括商店耳(EAR) ,store-jpa(JAR),store-rest(WAR),store-web(WAR),store-services(EJB),store-rest-interfaces(JAR),store-service-interfaces(JAR)。 我已經改變JPA配置(persistence.xml)中的datasourse在Openshift上使用MysqlDB。 推回到openshift構建成功,但是當它被部署時它缺少一些依賴(ClassNotFoundException),並且無法部署主要的war文件。
聽起來像是你有運行時依賴關係已經成功地將它放到你的本地maven倉庫中,但是在你的構建中沒有被正確引用(pom.xml文件?)。不知道更多,很難提出更多的建議。 –