English 中文(简体)
使用带 Jboss 和 Openshift 的罐子图书馆
原标题:Using jar libraries with Jboss and Openshift

I m trying to deploy a simple REST Webservice on Openshift, using Jboss and Eclipse. I have a Jar library cointaining some classes, I put that in the path:

rc/main/webapp/WEB-INF/lib/

在本地部署应用程序并测试是正常的, 但是当我尝试在 Openshift 上部署时, 在构建时会出错 :

类非功能例外

Jboss(Openshift)找不到我的Jar:为什么?

最佳回答
  • Check if library exists in war (you can unzip this file)
  • Check if war is deployed in remote server and unzip war to view libraries: ssh [email protected]
  • Check path: /var/lib/stickshift/5fcd6......../app-root/runtime/repo/deployments
  • View Readme in folder deployments (in local)
  • You should use Maven. Sample:

<build>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <archive>
                        <manifestEntries>
                            <Dependencies>org.slf4j,org.apache.commons.logging,org.joda.time</Dependencies>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>openshift</id>
            <build>
                <finalName>yourapp</finalName>
                <plugins>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration>
                            <outputDirectory>deployments</outputDirectory>
                            <warName>ROOT</warName><!-- ROOT -->
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

问题回答

暂无回答




相关问题
具有相同形象的集装箱,但具有不同的组合

Is there a way to have an application with 2 containers with the same image version but with different name and resources on OpenShift? For example: In the same namespace, given a micro service with ...

使用带 Jboss 和 Openshift 的罐子图书馆

我试图使用Jboss 和 Eclipse 来在 Openfight 上安装一个简单的 REST Web Service。 我有一个 Jar 库, 里面藏着一些课程, 我把它放在路径上: src/main/webapp/WEB-INF/lib/ of the...

Daily cron at specific time

I would like to run a daily job at the OpenShift Express PaaS. I know how to activate the cron cartridge on my app and how to add scripts into the correct cron folder. But I have a special need to ...

指挥线上的超重弹(Openshitft)

第一夫人 我对Ruby不了解很多情况,但开放式袭击指挥线利用警钟管理我对云的 app。 尼斯!

Spring doesn t get env variable from Openshift

I have Spring Boot Application that is automatically deployed to Openshift when I commit some change to Git. I need to externalize the datasource config. I m trying to use envonriment variables as ...