Details
Description
Hi..
I have work arounds for this (double) issue. But I thought I'd share my solution as an FYI. I think you'd possibly want to incorporate the elements that I included into my pom into what the archetype generates (so that others who face these issues don't have to modify the pom by hand.)
ONE)
when deploy the .war i created with 'mvn package' to jetty i get a class not found exception for this class: org.codehaus.groovy.grails.cli.CommandLineHelper
it goes away if i include this dependency:
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-bootstrap</artifactId>
<version>1.2.0</version>
</dependency>
I had another class not found issue that I had to resolve with this dependency: >
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
</dependency>
TWO)
when deploying to jetty and running as .war i ran into the problem documented here: > http://www.slf4j.org/faq.html#IllegalAccessError
solution was to apply the exclusion recommended in the above link, like this:
<!-- Grails defaults to Ehache for the second-level Hibernate cache. --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-ehcache</artifactId> <version>3.3.1.GA</version> <!-- see http://www.slf4j.org/faq.html#IllegalAccessError --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache-core</artifactId> <version>1.7.1</version> <exclusions> <exclusion> <artifactId>jms</artifactId> </exclusion> <exclusion> <artifactId>servlet-api</artifactId> </exclusion> <!-- We have JCL-over-SLF4J instead. --> <exclusion> <artifactId>commons-logging</artifactId> </exclusion> <!-- see http://www.slf4j.org/faq.html#IllegalAccessError --> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion>
complete pom is attached.
Thanks Chris for this post!