我正在尝试使用maven发布一个项目,但不是发布到Releases存储库,而是将它放在我们的Snapshots repo中.
我的pom看起来像:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.my.profiler</groupId>
<artifactId>profilerlib</artifactId>
<name>Profiler Lib</name>
<version>1.0.2-SNAPSHOT</version>
<description>Profiler Library</description>
<scm>
<connection>scm:svn:https://svn.example.com/my-project/profilerlib/trunk
</connection>
<developerConnection>scm:svn:https://svn.example.com/my-project/profilerlib/trunk
</developerConnection>
</scm>
<distributionManagement>
<!-- Publish the versioned releases here -->
<repository>
<id>nexus</id>
<name>nexus</name>
<url>http://repo.example.com:8081/nexus/content/repositories/releases
</url>
</repository>
<!-- Publish the versioned releases here -->
<snapshotRepository>
<id>nexus</id>
<name>nexus</name>
<url>http://repo.example.com:8081/nexus/content/repositories/snapshots
</url>
</snapshotRepository>
</distributionManagement>
<!-- download artifacts from this repo -->
<repositories>
<repository>
<id>nexus</id>
<name>EXAMPLE Public Repository</name>
<url>http://repo.example.com:8081/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
...
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId> …Run Code Online (Sandbox Code Playgroud) 我有一个 SOAP 服务,我需要与之交谈。第一个 SOAP 请求在 SOAP 标头中接收带有sessionID元素的响应,我需要在最终发布命令中发送该元素。
为了获取这个 sessionID 值,我计划使用ClientInterceptor。在我的WebServiceGatewaySupport实现中,我注册了我的拦截器:
this.setInterceptors(new ClientInterceptor[] { new MyWebServiceClientInterceptor() });
Run Code Online (Sandbox Code Playgroud)
我的拦截器:
public class MyWebServiceClientInterceptor implements ClientInterceptor {
public final QName SessionID_QNAME = new QName("http://xml.example.com/ws/session", "sessionID");
public boolean handleFault(MessageContext context) throws WebServiceClientException {
logger.info("Handle Fault");
return true;
}
public boolean handleResponse(MessageContext context) throws WebServiceClientException {
logger.info("Handle Response");
SoapMessage soapMessage = (SoapMessage) context.getRequest();
SoapHeader soapHeader = soapMessage.getSoapHeader();
logger.info("Response Header: " + soapHeader.getName());
Iterator<SoapHeaderElement> qn = soapHeader.examineAllHeaderElements();
while (qn.hasNext()) {
SoapElement …Run Code Online (Sandbox Code Playgroud) 运行Mac(OS X 10.8.1).我们升级到最新的Java安全更新1.6.0_35-b10-428,从那时起我们的主应用程序无法在Eclipse中启动.
启动Openfire 3.6.4时会抛出以下异常.几乎解析openfire.xml配置的地方是错误发生的时间:
private void buildDoc(Reader in) throws IOException {
try {
SAXReader xmlReader = new SAXReader();
xmlReader.setEncoding("UTF-8");
document = xmlReader.read(in);
}
catch (Exception e) {
Log.error("Error reading XML properties", e);
System.out.println("NOOO");
e.printStackTrace();
throw new IOException(e.getMessage());
}
finally {
if (in != null) {
in.close();
}
}
}
Run Code Online (Sandbox Code Playgroud)
抛出异常:
Exception in thread "main" java.lang.StackOverflowError
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52)
at java.nio.ByteBuffer.wrap(ByteBuffer.java:350)
at java.nio.ByteBuffer.wrap(ByteBuffer.java:373)
at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:237)
at java.lang.StringCoding.encode(StringCoding.java:272)
at java.lang.String.getBytes(String.java:946)
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
at java.io.File.exists(File.java:733)
at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:999)
at sun.misc.URLClassPath.getResource(URLClassPath.java:169)
at …Run Code Online (Sandbox Code Playgroud) java ×3
interceptor ×1
macos ×1
maven ×1
release ×1
snapshot ×1
soap ×1
spring ×1
web-services ×1