Maven EJB packaging with dependent libraries

前端 未结 2 1736
再見小時候
再見小時候 2020-12-29 14:50

Im facing an issue how to correctly package my enterprise (EAR) application with simple WAR and EJB3 module for JBoss7 application server. The thing is, that EJB module is u

相关标签:
2条回答
  • 2020-12-29 15:14

    I managed to solve the problem. It seems that these libraries has to be packaged within /lib directory and not in root of EAR. Adding defaultLibBundleDir element solved the problem.

    E.g.:

    <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <defaultLibBundleDir>lib</defaultLibBundleDir>
    ...
    
    0 讨论(0)
  • 2020-12-29 15:18

    Did you leave the <addClasspath>true</addClasspath> on the EJB config?

    Well, you can leave it like this, but you'll get a heap of log entries (WARN) on server start complaining about the classpath entries. I prefer to set it to false. <addClasspath>false</addClasspath>

    0 讨论(0)
提交回复
热议问题