我正在试图弄清楚我必须在我的pom.xml中包含哪些工件来让别人的JAX-WS瘦客户端编译并运行其junit测试。目前的情况是,它只使用axis2-jaxws工件编译文件:
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jaxws</artifactId>
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
但是,当我尝试运行测试时,我得到一个ClassNotFoundException:
Caused by: java.lang.ClassNotFoundException: org.apache.ws.policy.Assertion
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:25)
at org.apache.axis2.engine.AxisConfiguration.<init>(AxisConfiguration.java:85)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:767)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:113)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:38)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:90)
at org.apache.axis2.jaxws.ClientConfigurationFactory.getClientConfigurationContext(ClientConfigurationFactory.java:116)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:92)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:79)
at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:78)
at org.apache.axis2.jaxws.spi.ServiceDelegate.<init>(ServiceDelegate.java:219)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:83)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:79)
at javax.xml.ws.Service.<init>(Service.java:57)
at javax.xml.ws.Service.create(Service.java:687)
我已经尝试将范围切换为“测试”甚至“编译”,但没有区别。显然,Assertion类不是jaxws依赖树的一部分。一些在jarvana.com上搜索的人向我指出ws-commons/policy artifact,但这很古老。
我似乎无法找到最新的jax-ws工件的最新工件。我也试过包括rampart-project artifact,但无济于事。
任何人都可以帮我指出正确的方向吗?
谢谢,
埃里克
答案 0 :(得分:0)
尝试mvn dependency:analize-only
,它会告诉您哪些工件是您的编码引用但未声明