Marty Pitt
Marty Pitt

Reputation: 29290

Exporting Groovy Dependencies in STS/Maven project causes invalid classpath

I'm using STS, and with a Web (WTP); Maven; Groovy stack.

By default, it appears that the Groovy classpath entries weren't marked to be exported, and I was issued with the following warning:

Classpath entry GROOVY_DSL_SUPPORT will not be exported or published. Runtime ClassNotFoundExceptions may result. Classpath entry GROOVY_SUPPORT will not be exported or published. Runtime ClassNotFoundExceptions may result.

So, I added the libraries from Project Properties -> Deployment Assembly -> Add...

However, now I get the following error:

Invalid classpath publish/export dependency /Users/martypitt/springsource/2.8.1.RELEASE/sts-2.8.1.RELEASE/plugins/org.codehaus.groovy_1.8.4.xx-20111212-0900-e37-RELEASE/lib/antlr-2.7.7.jar. The project contains another dependency with the same archive name.

I worked around by excluding antlr manually from my pom.xml. However, this seems counter-intuitive, and leaves me concerned about issues later when I deploy to a server outside of STS.

Is there a more appropriate way to resolve this issue?

Upvotes: 2

Views: 1713

Answers (2)

Muthuveerappan
Muthuveerappan

Reputation: 136

Looks like your project is groovy project. Go to eclipse and install groovy addon - from software site - http://dist.springsource.org/snapshot/GRECLIPSE/e4.6/

After this restart eclipse and you should have these in path/eclipse to work with.

Detailed instructions @ https://github.com/groovy/groovy-eclipse/wiki

Make sure you have the proxy configured properly - if any.

Upvotes: 0

Andrew Eisenberg
Andrew Eisenberg

Reputation: 28757

You do not need to export the DSL support container. It provides editing support for some built in Groovy AST transforms. There is nothing in the classpath container required for compilation or runtime.

Upvotes: 4

Related Questions