如何将项目jar添加到eclipseworkspace \ .metadata \ .plugins \ serverfolder \ projectfolder \ web-inf \ lib

时间:2011-03-02 04:28:28

标签: java tomcat maven-2

我正在使用Eclipse IDE。我有一个maven项目,如lmexadapter-core-api,lmexadapter-core-impl,lmex-moodle-api,lmexserver-mobile-api,lmexadapter-moodle-api,lmexadapter-moodle-impl。我对pom的依赖如下:

<parent>
        <artifactId>lmexadapter-moodle</artifactId>
        <groupId>com.platysgroup.lmex.adapter</groupId>
        <version>1.0</version>
    </parent>
    <groupId>com.platysgroup.lmex.adapter</groupId>
    <artifactId>lmexadapter-moodle-web</artifactId>
    <version>1.0</version>
    <packaging>war</packaging>
    <name>Maven Webapp Archetype</name>
    <url>http://maven.apache.org</url>

    <dependencies>
        <dependency>
            <groupId>com.platysgroup.lmex.adapter.core</groupId>
            <artifactId>lmexadapter-core-api</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.platysgroup.lmex.adapter.core</groupId>
            <artifactId>lmexadapter-core-impl</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.platysgroup.lmex.server.mobile</groupId>
            <artifactId>lmexserver-mobile-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.platysgroup.lmex.adapter.moodle</groupId>
            <artifactId>lmexadapter-moodle-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.platysgroup.lmex.adapter.moodle</groupId>
            <artifactId>lmexadapter-moodle-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

我使用tomcat作为我的应用程序服务器。我得到了除了lmexadapter-moodle-api,lmexadapter-moodle-impl之外的所有jar,我的D:\ EclipseWorskpace \ ew-pg \ lmexadapter.metadata.plugins \ org.eclipse.wst.server.core \ tmp0 \ wtpwebapps \ lmexadapter- Moodle的的web \ WEB-INF \ lib中。因为这个应用程序无法找到lmexadapter-moodle-impl的类。我应该如何定义,以便在上面的指定路径中使用jar。

请帮帮我。

谢谢

1 个答案:

答案 0 :(得分:0)

假设当前版本的Eclipse和Maven插件,这可以通过将Maven依赖项添加到“项目部署程序集”来解决吗? 如果您在Eclipse中将项目配置为Dynamic Web Project并将Tomcat配置为服务器,则在Project-&gt; Deployment Assembly-&gt; Add-&gt; java build path entries - &gt;下进行。 Maven依赖。