Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 7.2.2
-
Fix Version/s: None
-
Component/s: Maven
-
Labels:None
-
Number of attachments :
Description
We have deployed an application to Jetty which uses net.sf.jtidy:jtidy:r938 which for example offers the method setInputEncoding. Running in Jetty it will fail with:
java.lang.NoSuchMethodError: org.w3c.tidy.Tidy.setInputEncoding(Ljava/lang/String;)V
because the call goes to the JTidy-version provided with Jetty which is jtidy:jtidy:jar:4aug2000r7-dev. This again comes with org.apache.maven.plugin-tools:maven-plugin-tools-api:jar:2.5.1.
Because of MNG-2163 I know of no workaround to get rid of this dependency.
The following Plugin configuration works for me:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <dependencies> <dependency> <groupId>net.sf.jtidy</groupId> <artifactId>jtidy</artifactId> <version>r938</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-api</artifactId> <version>2.5.1</version> <exclusions> <exclusion> <groupId>jetty</groupId> <artifactId>jetty</artifactId> </exclusion> </exclusions> </dependency> </dependencies> [...] </plugin> </plugins>