我有父母pom和两个模块poms.在第一个模块中,我想将第二个模块(jar)复制到某个文件夹.当我从第一个模块pom编译项目时 - 它工作,但当我尝试从父项目pom编译时,插件尝试复制jar的模块类:
[错误]无法执行目标org.apache.maven.plugins:maven-dependency-plugin:2.1:复制(默认)项目模块1:错误将工件从/ home/chardex/projects/test/module2/target/classes复制到/ home/chardex/projects/test/module1/target/lib/classes:/ home/chardex/projects/test/module2/target/classes(是目录) - > [帮助1]
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>...</groupId>
<artifactId>module2</artifactId>
<version>...</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
谢谢.
从CXF POJO服务获取http标头的正确方法是什么?
我有下面的代码,但它不起作用:
ServerFactoryBean svrFactory = new ServerFactoryBean();
svrFactory.setServiceClass(TestService.class);
svrFactory.setAddress("http://localhost:8080/test");
svrFactory.getServiceFactory().setDataBinding(new AegisDatabinding());
svrFactory.create();
public class TestService {
protected javax.xml.ws.WebServiceContext wsContext;
public void someMethod() {
// the problem is that wsContext.getMessageContext() is null
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢!