开发者

m2eclipse wtp deploy an ejb project with dependencies

I have a ejb project with 1 dependent project (also in my workspace) that I want to deploy on glassfish. I use m2eclipse to resolve my projects en configure my eclipse projects.

Everything works fine when I create a war or ear. But with an ejb project it fails to add the dependent project to my server.

<groupId>be.stijn</groupId>
<artifactId>moviez-ejb</artifactId>
<packaging>ejb</packaging>
<version>0.0.1-SNAPSHOT&开发者_如何学Pythonlt;/version>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ejb-plugin</artifactId>
            <configuration>
                <ejbVersion>3.1</ejbVersion>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>be.stijn</groupId>
        <artifactId>moviez-dom</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <scope>compile</scope>
    </dependency>

No dependent project moviez-dom deployed to the server:

m2eclipse wtp deploy an ejb project with dependencies

:-(


If you will change your packaging model, your maven configuration will cause that moviez-dom will be packed as a JAR library inside moviez-ejb EAR. In such case you have to deploy only moviez-ejb and everything should work fine. That's the standard way how things are done - EAR stands for enterprise application and include JARs and WARs inside.

If you want to deploy some project to server using eclipse plugin you mentioned, you have to do it explicitly - your maven configuration cannot do it for you. In Eclipse, you can set it in the server 'modules' tab.


The moviez-dom project isn't going to be a deployable entity. You need to include the moviez-dom project code in the build for your moviez-ejb project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜