Struts1とトルクを使用するレガシーアプリケーションがあります。私は先週それを少しリファクタリングする努力をし、クラスのいくつかのグループを切り離してユニットテストを導入しようとしました。単体テストではアプリケーションのすべての領域をテストできないため、HtmlUnitテストを追加したいと思いました。
これに、次のように、maven-failsafe-pluginとjettyをプロジェクトに追加しました。
<build>
...
<plugins>
...
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.16</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopPort>8005</stopPort>
<stopKey>STOP</stopKey>
<contextPath>/</contextPath>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
問題は、mvn verifyを実行すると、次の例外が発生することです。
java.lang.SecurityException: sealing violation: can't seal package javax.naming: already loaded
一部のクラスでjavax.namingを使用していますが、javax.namingをオーバーライドする依存関係が見つかりません。
この問題を理解する方法について誰かが手がかりを持っていますか?