开发者

Eclipse: don't include some maven dependencies at runtime

开发者 https://www.devze.com 2023-03-17 08:34 出处:网络
I am running a GWT + GAE Maven project in Eclipse, which has a dependency on the lombok jar: <dependency>

I am running a GWT + GAE Maven project in Eclipse, which has a dependency on the lombok jar:

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>0.9.3</version>
        <scope>provided</scope>
    </dependency>

I then launch my application using the Google Plugin for Eclipse.

It all works fine, except that the lombok jar is present in the classpath at runtime (Sys开发者_如何学Ctem.getProperty("java.class.path") shows the jar is included). And this is supposed to a cause some issues with app engine / datanucleus.

I checked:

- The jar is not copied in the war/WEB-INF/lib folder

- The jar is present in the Maven Dependencies of the project build path

- The Maven Dependencies are automatically included in the Classpath of the project configuration.

What I am looking for is a means to avoid having the jar being part of the runtime classpath.

Thanks in advance for any hint you may offer,

Sébastien


You need to define the scope as provided. This assumes you will have the dependency provided for your application at runtime. It will, of course, be used to compile your code.


Looks a lot like http://code.google.com/p/google-web-toolkit/issues/detail?id=4929


Using the latest version of lombok (0.10.0-RC1) solves the issue.

0

精彩评论

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