Author: rsearls
Date: 2014-05-25 16:50:19 -0400 (Sun, 25 May 2014)
New Revision: 18691
Modified:
stack/cxf/branches/rsearls/modules/dist/pom.xml
stack/cxf/branches/rsearls/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/rsearls/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
stack/cxf/branches/rsearls/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/branches/rsearls/modules/server/pom.xml
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
stack/cxf/branches/rsearls/pom.xml
Log:
added support for unix4j SED utility
Modified: stack/cxf/branches/rsearls/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/rsearls/modules/dist/pom.xml 2014-05-23 16:31:34 UTC (rev 18690)
+++ stack/cxf/branches/rsearls/modules/dist/pom.xml 2014-05-25 20:50:19 UTC (rev 18691)
@@ -128,6 +128,15 @@
<artifactId>opensaml</artifactId>
<scope>provided</scope>
</dependency>
+ <!-- Java Sed utilities -->
+ <dependency>
+ <groupId>org.unix4j</groupId>
+ <artifactId>unix4j-base</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.unix4j</groupId>
+ <artifactId>unix4j-command</artifactId>
+ </dependency>
<!-- container integration -->
<dependency>
<groupId>org.jboss.ws</groupId>
Modified:
stack/cxf/branches/rsearls/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
---
stack/cxf/branches/rsearls/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-05-23
16:31:34 UTC (rev 18690)
+++
stack/cxf/branches/rsearls/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-05-25
20:50:19 UTC (rev 18691)
@@ -67,6 +67,8 @@
<include>javax.jws:jsr181-api:jar</include>
<include>org.codehaus.woodstox:stax2-api:jar</include>
<include>org.codehaus.woodstox:woodstox-core-asl:jar</include>
+ <include>org.unix4j:unix4j-base:jar</include>
+ <include>org.unix4j:unix4j-command:jar</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
Modified:
stack/cxf/branches/rsearls/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
===================================================================
---
stack/cxf/branches/rsearls/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2014-05-23
16:31:34 UTC (rev 18690)
+++
stack/cxf/branches/rsearls/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2014-05-25
20:50:19 UTC (rev 18691)
@@ -74,5 +74,6 @@
<include path="META-INF"/>
</imports>
</module>
+ <module name="org.unix4j"/>
</dependencies>
</module>
Modified:
stack/cxf/branches/rsearls/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
---
stack/cxf/branches/rsearls/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-05-23
16:31:34 UTC (rev 18690)
+++
stack/cxf/branches/rsearls/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-05-25
20:50:19 UTC (rev 18691)
@@ -130,6 +130,11 @@
<include name="**/jbossws-(a){jbossid}-server-integration.jar"/>
</fileset>
</copy>
+ <copy todir="@{targetdir}/org/unix4j/main" flatten="false"
overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/unix4j*.jar"/>
+ </fileset>
+ </copy>
<!-- module.xml files -->
<installModules targetDir="@{targetdir}">
<fileset dir="@{thirdpartydir}/modules/@{modules-jbossid}">
Modified: stack/cxf/branches/rsearls/modules/server/pom.xml
===================================================================
--- stack/cxf/branches/rsearls/modules/server/pom.xml 2014-05-23 16:31:34 UTC (rev 18690)
+++ stack/cxf/branches/rsearls/modules/server/pom.xml 2014-05-25 20:50:19 UTC (rev 18691)
@@ -253,6 +253,17 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.unix4j</groupId>
+ <artifactId>unix4j-base</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.unix4j</groupId>
+ <artifactId>unix4j-command</artifactId>
+ </dependency>
+
</dependencies>
<!-- Plugins -->
Modified:
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
===================================================================
---
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-05-23
16:31:34 UTC (rev 18690)
+++
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-05-25
20:50:19 UTC (rev 18691)
@@ -27,6 +27,7 @@
import java.net.URL;
import org.jboss.wsf.spi.management.ServerConfig;
+import org.unix4j.Unix4j;
/**
* Helper for rewriting soap:address in published wsdl
@@ -149,8 +150,7 @@
sb.append(port);
// replace original context-root with replacement context
if (additionalCcontext != null && additionalCcontext.length() > 0) {
- String tmpAdditionalCcontext = additionalCcontext.startsWith("/")
? additionalCcontext : "/" + additionalCcontext;
- String tmpPath = path.replace(contextRoot, tmpAdditionalCcontext);
+ String tmpPath =
Unix4j.builder().echo(path).sed(additionalCcontext).toStringResult();
sb.append(tmpPath);
} else
{
@@ -192,8 +192,7 @@
{
final URL url = new URL(address);
final String path = url.getPath();
- final String tmpAdditionalCcontext =
additionalCcontext.startsWith("/") ? additionalCcontext : "/" +
additionalCcontext;
- final String tmpPath = path.replace(contextRoot, tmpAdditionalCcontext);
+ final String tmpPath =
Unix4j.builder().echo(path).sed(additionalCcontext).toStringResult();
final String newUrl=url.toString().replace(path, tmpPath);
ADDRESS_REWRITE_LOGGER.addressRewritten(address, newUrl);
Modified:
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
===================================================================
---
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2014-05-23
16:31:34 UTC (rev 18690)
+++
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2014-05-25
20:50:19 UTC (rev 18691)
@@ -537,7 +537,8 @@
{
setModifySOAPAddress(true);
final String addContext = "xx/jaxws-jbws2150";
- setWebServicePath(addContext);
+ final String sedCmd = "s/jaxws-jbws2150/xx\\/jaxws-jbws2150/g";
+ setWebServicePath(sedCmd);
deploy("jaxws-jbws2150.war");
try
{
@@ -583,7 +584,8 @@
{
setModifySOAPAddress(true);
final String addContext = "xx/jaxws-jbws2150-codefirst";
- setWebServicePath(addContext);
+ final String sedCmd =
"s/jaxws-jbws2150-codefirst/xx\\/jaxws-jbws2150-codefirst/g";
+ setWebServicePath(sedCmd);
deploy("jaxws-jbws2150-codefirst.war");
try
{
@@ -609,7 +611,8 @@
{
setModifySOAPAddress(true);
final String addContext = "jaxws-jbws2150-codefirst";
- setWebServicePath("xx/" + addContext);
+ final String sedCmd =
"s/jaxws-jbws2150-codefirst/xx\\/jaxws-jbws2150-codefirst/g";
+ setWebServicePath(sedCmd);
setWebServiceHost(ServerConfig.UNDEFINED_HOSTNAME);
deploy("jaxws-jbws2150-codefirst.war");
try
@@ -644,7 +647,8 @@
{
setModifySOAPAddress(true);
final String addContext = "jaxws-jbws2150";
- setWebServicePath("xx/" + addContext);
+ final String sedCmd = "s/jaxws-jbws2150/xx\\/jaxws-jbws2150/g";
+ setWebServicePath(sedCmd);
setWebServiceHost(ServerConfig.UNDEFINED_HOSTNAME);
deploy("jaxws-jbws2150.war");
try
Modified: stack/cxf/branches/rsearls/pom.xml
===================================================================
--- stack/cxf/branches/rsearls/pom.xml 2014-05-23 16:31:34 UTC (rev 18690)
+++ stack/cxf/branches/rsearls/pom.xml 2014-05-25 20:50:19 UTC (rev 18691)
@@ -111,6 +111,7 @@
<shrinkwrap.version>1.1.3</shrinkwrap.version>
<jaspi.api.version>1.0.0.Alpha1</jaspi.api.version>
<javax.inject.version>1</javax.inject.version>
+ <unix4j-version>0.3</unix4j-version>
</properties>
@@ -1269,7 +1270,17 @@
<artifactId>easymockclassextension</artifactId>
<version>2.4</version>
</dependency>
-
+ <!-- Java SED util -->
+ <dependency>
+ <groupId>org.unix4j</groupId>
+ <artifactId>unix4j-base</artifactId>
+ <version>${unix4j-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.unix4j</groupId>
+ <artifactId>unix4j-command</artifactId>
+ <version>${unix4j-version}</version>
+ </dependency>
<!-- Other test dependencies -->
<dependency>
<groupId>org.picketlink</groupId>
Show replies by date