Jetty 密封了 javax.naming
我有一个使用struts 1 和torque 的遗留应用程序。上周我努力对其进行了一些重构,并尝试解耦一些类组并引入了单元测试。由于我无法通过单元测试来测试应用程序的所有区域,因此我想添加 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 的依赖项!
有人知道如何解决这个问题吗?
I have a legacy application using struts 1 and torque. I have made an effort last week to refactor it a bit and tried to decouple some groups of classes and introduced unit tests. As I can not test all areas of the application through unit tests, I wanted to add HtmlUnit tests.
To to this, I added the maven-failsafe-plugin and jetty to my project, like so:
<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>
The problem is, that when I run mvn verify, I get the following exception:
java.lang.SecurityException: sealing violation: can't seal package javax.naming: already loaded
I am using javax.naming in some classes, but can't find any dependency that overrides javax.naming!
Does anybody have a clue about how to figure this problem out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论