JBossWS SVN: r15244 - hudson/trunk/scripts.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 13:39:47 -0500 (Fri, 11 Nov 2011)
New Revision: 15244
Modified:
hudson/trunk/scripts/jbossws-qa.sh
Log:
Modified: hudson/trunk/scripts/jbossws-qa.sh
===================================================================
--- hudson/trunk/scripts/jbossws-qa.sh 2011-11-11 18:39:32 UTC (rev 15243)
+++ hudson/trunk/scripts/jbossws-qa.sh 2011-11-11 18:39:47 UTC (rev 15244)
@@ -11,7 +11,11 @@
rm -rf $WORKSPACE/jboss-as
cp -r $JBOSS_INSTANCE $WORKSPACE/jboss-as
export JBOSS_HOME=$WORKSPACE/jboss-as
- # HACK if running cxf on AS6, first install/update native
+ if [[ $JBOSS_TARGET == jboss71* ]]; then
+ echo "Copying default mgmt-users.properties to AS..."
+ cp $STACK_DIR/etc/mgmt-users.properties $JBOSS_HOME/standalone/configuration
+ fi;
+ # HACK if running cxf on AS6 / AS71x, first install/update native
if [ "$STACK_ID" = "cxf" ] && [[ $JBOSS_TARGET == jboss6* ]]; then
echo "cxf stack with AS 6x, first installing native..."
STACK_ID=native
13 years, 2 months
JBossWS SVN: r15243 - in stack/cxf/trunk: etc and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 13:39:32 -0500 (Fri, 11 Nov 2011)
New Revision: 15243
Added:
stack/cxf/trunk/etc/
stack/cxf/trunk/etc/mgmt-users.properties
Log:
Adding default mgmt-users.properties
Added: stack/cxf/trunk/etc/mgmt-users.properties
===================================================================
--- stack/cxf/trunk/etc/mgmt-users.properties (rev 0)
+++ stack/cxf/trunk/etc/mgmt-users.properties 2011-11-11 18:39:32 UTC (rev 15243)
@@ -0,0 +1 @@
+admin=c22052286cd5d72239a90fe193737253
13 years, 2 months
JBossWS SVN: r15242 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 13:28:45 -0500 (Fri, 11 Nov 2011)
New Revision: 15242
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[AS7-2520] Default to trying passing admin/admin credential for management console access when no username/pwd is provided for the jbossws testsuite run
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-11-11 18:23:59 UTC (rev 15241)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-11-11 18:28:45 UTC (rev 15242)
@@ -999,7 +999,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${endorsed.dirs}</argLine>
+ <argLine>${surefire.jvm.args} ${surefire.jvm.management.args} ${surefire.default-mgmt-serurity.args} -Djava.endorsed.dirs=${endorsed.dirs}</argLine>
<excludes>
<!-- # UsernameTokenHTTPSTestCase requires keystore & trustore in jboss-web tomcat configuration-->
<exclude>org/jboss/test/ws/interop/nov2007/wsse/UsernameTokenHTTPSTestCase.*</exclude>
@@ -1204,6 +1204,29 @@
<jboss.server.instance>default</jboss.server.instance>
</properties>
</profile>
+
+ <profile>
+ <id>default-mgmt-security</id>
+ <activation>
+ <property>
+ <name>!jbossws.deployer.authentication.username</name>
+ </property>
+ </activation>
+ <properties>
+ <surefire.default-mgmt-serurity.args>-Djbossws.deployer.authentication.username=admin -Djbossws.deployer.authentication.password=admin</surefire.default-mgmt-serurity.args>
+ </properties>
+ </profile>
+ <profile>
+ <id>custom-mgmt-security</id>
+ <activation>
+ <property>
+ <name>jbossws.deployer.authentication.username</name>
+ </property>
+ </activation>
+ <properties>
+ <surefire.default-mgmt-serurity.args> </surefire.default-mgmt-serurity.args>
+ </properties>
+ </profile>
</profiles>
</project>
13 years, 2 months
JBossWS SVN: r15241 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 13:23:59 -0500 (Fri, 11 Nov 2011)
New Revision: 15241
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[AS7-2520] Default to trying passing admin/admin credential for management console access when no username/pwd is provided for the jbossws testsuite run
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-11-11 18:22:48 UTC (rev 15240)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-11-11 18:23:59 UTC (rev 15241)
@@ -484,7 +484,7 @@
<surefire.jvm.args>${surefire.security.args} ${surefire.memory.args}</surefire.jvm.args>
</properties>
</profile>
-
+
<!--
Name: management
Descr: Enable remote jmx management (useful to attach JConsole, for instance)
@@ -1265,7 +1265,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
+ <argLine>${surefire.jvm.args} ${surefire.jvm.management.args} ${surefire.default-mgmt-serurity.args} -Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
<!-- Lib below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
@@ -1384,6 +1384,29 @@
<jboss.server.instance>default</jboss.server.instance>
</properties>
</profile>
+
+ <profile>
+ <id>default-mgmt-security</id>
+ <activation>
+ <property>
+ <name>!jbossws.deployer.authentication.username</name>
+ </property>
+ </activation>
+ <properties>
+ <surefire.default-mgmt-serurity.args>-Djbossws.deployer.authentication.username=admin -Djbossws.deployer.authentication.password=admin</surefire.default-mgmt-serurity.args>
+ </properties>
+ </profile>
+ <profile>
+ <id>custom-mgmt-security</id>
+ <activation>
+ <property>
+ <name>jbossws.deployer.authentication.username</name>
+ </property>
+ </activation>
+ <properties>
+ <surefire.default-mgmt-serurity.args> </surefire.default-mgmt-serurity.args>
+ </properties>
+ </profile>
</profiles>
</project>
13 years, 2 months
JBossWS SVN: r15240 - shared-testsuite/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 13:22:48 -0500 (Fri, 11 Nov 2011)
New Revision: 15240
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
Log:
[AS7-2520] Be more verbose on management credential errors
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2011-11-11 16:39:03 UTC (rev 15239)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2011-11-11 18:22:48 UTC (rev 15240)
@@ -33,6 +33,7 @@
import javax.management.MBeanServerConnection;
import javax.naming.NamingException;
+import javax.security.sasl.SaslException;
import junit.extensions.TestSetup;
import junit.framework.Test;
@@ -144,7 +145,15 @@
authenticationOptions.put("rolesProperties", rolesPropFile);
}
authenticationOptions.put("unauthenticatedIdentity", "anonymous");
- JBossWSTestHelper.addSecurityDomain(JBOSSWS_SEC_DOMAIN, authenticationOptions);
+ try {
+ JBossWSTestHelper.addSecurityDomain(JBOSSWS_SEC_DOMAIN, authenticationOptions);
+ } catch (Exception e) {
+ //be lenient here, the default jbossws security domain might be there because of
+ //a previously prematurely interrupted testsuite run, so go ahead with that, it
+ //will removed and re-installed at next test requiring it in any case
+ e.printStackTrace();
+ log.warn("Could not add default security domain!", e);
+ }
}
List<URL> clientJars = new ArrayList<URL>();
@@ -187,9 +196,21 @@
{
JBossWSTestHelper.deploy(archive);
}
- catch (Exception ex)
+ catch (Throwable ex)
{
ex.printStackTrace();
+ Throwable cause = ex.getCause();
+ boolean foundSecurityCause = false;
+ while (!foundSecurityCause && cause != null && cause != ex) {
+ foundSecurityCause = cause instanceof SaslException;
+ ex = cause;
+ cause = cause.getCause();
+ }
+ if (foundSecurityCause) {
+ System.out.println("\n** Please make sure you properly setup authentication credentials to the application server management console **\n\n" +
+ "In order for running the JBossWS testsuite against a protected application server (username/password different from 'admin' / 'admin'),\n" +
+ "use '-Djbossws.deployer.authentication.username=username -Djbossws.deployer.authentication.password=password'\n");
+ }
JBossWSTestHelper.undeploy(archive);
}
}
13 years, 2 months
JBossWS SVN: r15239 - maven/parent/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 11:39:03 -0500 (Fri, 11 Nov 2011)
New Revision: 15239
Modified:
maven/parent/trunk/pom.xml
Log:
[JBWS-3382] Require maven-assembly-plugin 2.2-beta-5 and at least maven 2.2.1
Modified: maven/parent/trunk/pom.xml
===================================================================
--- maven/parent/trunk/pom.xml 2011-11-11 11:29:33 UTC (rev 15238)
+++ maven/parent/trunk/pom.xml 2011-11-11 16:39:03 UTC (rev 15239)
@@ -114,6 +114,10 @@
<pluginManagement>
<plugins>
<plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-5</version>
+ </plugin>
+ <plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
@@ -234,7 +238,7 @@
<configuration>
<rules>
<requireMavenVersion>
- <version>2.0.11</version>
+ <version>2.2.1</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.6</version>
13 years, 2 months
JBossWS SVN: r15238 - in stack/cxf/trunk: modules/dist and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 06:29:33 -0500 (Fri, 11 Nov 2011)
New Revision: 15238
Modified:
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/trunk/modules/testsuite/pom.xml
stack/cxf/trunk/pom.xml
Log:
[JBWS-3382] Adding dependency on jbossws-jboss700 with tests-integration classifier and shipping that into bin distro
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2011-11-11 11:28:35 UTC (rev 15237)
+++ stack/cxf/trunk/modules/dist/pom.xml 2011-11-11 11:29:33 UTC (rev 15238)
@@ -254,8 +254,14 @@
</property>
</activation>
<dependencies>
- <!--Libraries required for running binary distro testsuite and not available on server-->
+ <!-- Libraries required for running binary distro testsuite and not available on server-->
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <classifier>tests-integration</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-webservices-tests-integration</artifactId>
<scope>provided</scope>
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-11-11 11:28:35 UTC (rev 15237)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-11-11 11:29:33 UTC (rev 15238)
@@ -103,6 +103,17 @@
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<scope>provided</scope>
<useProjectArtifact>false</useProjectArtifact>
+ </dependencySet>
+
+ <dependencySet>
+ <outputDirectory>deploy-artifacts/lib</outputDirectory>
+ <unpack>false</unpack>
+ <includes>
+ <include>org.jboss.ws:jbossws-jboss700:jar:*:tests-integration</include>
+ </includes>
+ <outputFileNameMapping>${artifact.artifactId}${dashClassifier}.${artifact.extension}</outputFileNameMapping>
+ <scope>provided</scope>
+ <useProjectArtifact>false</useProjectArtifact>
</dependencySet>
<dependencySet>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-11-11 11:28:35 UTC (rev 15237)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-11-11 11:29:33 UTC (rev 15238)
@@ -946,7 +946,7 @@
<profile>
<id>jboss700</id>
<properties>
- <jboss.version>7.0.0.Final</jboss.version>
+ <jboss.version>${jboss700.version}</jboss.version>
<jbossws.integration.target>jboss700</jbossws.integration.target>
</properties>
<dependencies>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2011-11-11 11:28:35 UTC (rev 15237)
+++ stack/cxf/trunk/pom.xml 2011-11-11 11:29:33 UTC (rev 15238)
@@ -53,6 +53,7 @@
<jbossws.jboss600.version>4.0.0-SNAPSHOT</jbossws.jboss600.version>
<jbossws.jboss610.version>4.0.0-SNAPSHOT</jbossws.jboss610.version>
<jbossws.jboss700.version>4.0.0-SNAPSHOT</jbossws.jboss700.version>
+ <jboss700.version>7.0.0.Final</jboss700.version>
<jboss710.version>7.1.0.Alpha2-SNAPSHOT</jboss710.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
<cxf.version>2.4.4</cxf.version>
@@ -155,6 +156,12 @@
<version>${jbossws.jboss700.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <version>${jbossws.jboss700.version}</version>
+ <classifier>tests-integration</classifier>
+ </dependency>
+ <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-webservices-tests-integration</artifactId>
<version>${jboss710.version}</version>
13 years, 2 months
JBossWS SVN: r15237 - in stack/native/trunk: modules/dist and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 06:28:35 -0500 (Fri, 11 Nov 2011)
New Revision: 15237
Modified:
stack/native/trunk/modules/dist/pom.xml
stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/trunk/modules/testsuite/pom.xml
stack/native/trunk/pom.xml
Log:
[JBWS-3382] Adding dependency on jbossws-jboss700 with tests-integration classifier and shipping that into bin distro
Modified: stack/native/trunk/modules/dist/pom.xml
===================================================================
--- stack/native/trunk/modules/dist/pom.xml 2011-11-11 11:26:56 UTC (rev 15236)
+++ stack/native/trunk/modules/dist/pom.xml 2011-11-11 11:28:35 UTC (rev 15237)
@@ -235,8 +235,14 @@
</property>
</activation>
<dependencies>
- <!--Libraries required for running binary distro testsuite and not available on server-->
+ <!-- Libraries required for running binary distro testsuite and not available on server-->
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <classifier>tests-integration</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-webservices-tests-integration</artifactId>
<scope>provided</scope>
Modified: stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-11-11 11:26:56 UTC (rev 15236)
+++ stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-11-11 11:28:35 UTC (rev 15237)
@@ -102,6 +102,17 @@
</dependencySet>
<dependencySet>
+ <outputDirectory>deploy-artifacts/lib</outputDirectory>
+ <unpack>false</unpack>
+ <includes>
+ <include>org.jboss.ws:jbossws-jboss700:jar:*:tests-integration</include>
+ </includes>
+ <outputFileNameMapping>${artifact.artifactId}${dashClassifier}.${artifact.extension}</outputFileNameMapping>
+ <scope>provided</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ </dependencySet>
+
+ <dependencySet>
<outputDirectory>deploy-artifacts/lib</outputDirectory>
<unpack>false</unpack>
<includes>
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-11-11 11:26:56 UTC (rev 15236)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-11-11 11:28:35 UTC (rev 15237)
@@ -739,7 +739,7 @@
<profile>
<id>jboss700</id>
<properties>
- <jboss.version>7.0.0.Final</jboss.version>
+ <jboss.version>${jboss700.version}</jboss.version>
<jbossws.integration.target>jboss700</jbossws.integration.target>
<endorsed.dirs>${project.build.directory}/endorsed</endorsed.dirs>
</properties>
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2011-11-11 11:26:56 UTC (rev 15236)
+++ stack/native/trunk/pom.xml 2011-11-11 11:28:35 UTC (rev 15237)
@@ -52,6 +52,7 @@
<jbossws.jboss600.version>4.0.0-SNAPSHOT</jbossws.jboss600.version>
<jbossws.jboss610.version>4.0.0-SNAPSHOT</jbossws.jboss610.version>
<jbossws.jboss700.version>4.0.0-SNAPSHOT</jbossws.jboss700.version>
+ <jboss700.version>7.0.0.Final</jboss700.version>
<jboss710.version>7.1.0.Alpha2-SNAPSHOT</jboss710.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
<ant.version>1.7.1</ant.version>
@@ -132,6 +133,12 @@
<version>${jbossws.jboss700.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <version>${jbossws.jboss700.version}</version>
+ <classifier>tests-integration</classifier>
+ </dependency>
+ <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-webservices-tests-integration</artifactId>
<version>${jboss710.version}</version>
13 years, 2 months
JBossWS SVN: r15236 - shared-testsuite/trunk/testsuite/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 06:26:56 -0500 (Fri, 11 Nov 2011)
New Revision: 15236
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
Log:
[JBWS-3382] Updating classpath for binary distro
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2011-11-11 11:24:56 UTC (rev 15235)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2011-11-11 11:26:56 UTC (rev 15236)
@@ -236,7 +236,7 @@
The 's.extra.classpath' contains stack specific jars that are needed to run the stack specific tests.
-->
<path id="integration.target.client.classpath">
- <pathelement location="${thirdparty.dir}/jboss-as-webservices-tests-integration.jar"/> <!-- included from thirdparty local dir as it's not installed on AS -->
+ <pathelement location="${thirdparty.dir}/jbossws-jboss700-tests-integration.jar"/> <!-- included from thirdparty local dir as it's not installed on AS -->
<pathelement location="${thirdparty.dir}/jbossws-shared-testsuite.jar"/> <!-- included from thirdparty local dir as it's not installed on AS -->
<pathelement location="${thirdparty.dir}/jnp-client.jar"/> <!-- included from thirdparty local dir as it's not installed on AS -->
<pathelement location="${jboss.home}/jboss-modules.jar"/>
13 years, 2 months
JBossWS SVN: r15235 - in container/jboss70/branches/jbossws-jboss700: src/main/java/org/jboss/as/webservices and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-11-11 06:24:56 -0500 (Fri, 11 Nov 2011)
New Revision: 15235
Added:
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/tests/
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
container/jboss70/branches/jbossws-jboss700/src/main/resources/META-INF/services/org.jboss.wsf.spi.deployer.Deployer
Modified:
container/jboss70/branches/jbossws-jboss700/pom.xml
Log:
[JBWs-3382] Adding new jar with 'tests-integration' classifier for shipping AS7 RemoteDeployer in JBossWS binary distribution
Modified: container/jboss70/branches/jbossws-jboss700/pom.xml
===================================================================
--- container/jboss70/branches/jbossws-jboss700/pom.xml 2011-11-11 07:17:42 UTC (rev 15234)
+++ container/jboss70/branches/jbossws-jboss700/pom.xml 2011-11-11 11:24:56 UTC (rev 15235)
@@ -82,5 +82,39 @@
<scope>provided</scope>
</dependency>
</dependencies>
+
+ <!-- plugins -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-jar</id>
+ <goals><goal>jar</goal></goals>
+ <phase>package</phase>
+ <configuration>
+ <excludes>
+ <exclude>**/tests/**</exclude>
+ <exclude>**/org.jboss.wsf.spi.deployer.Deployer</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ <execution>
+ <id>tests-integration</id>
+ <goals><goal>jar</goal></goals>
+ <phase>package</phase>
+ <configuration>
+ <classifier>tests-integration</classifier>
+ <includes>
+ <include>**/tests/**</include>
+ <include>**/org.jboss.wsf.spi.deployer.Deployer</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java (rev 0)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java 2011-11-11 11:24:56 UTC (rev 15235)
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.as.webservices.tests;
+
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REMOVE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
+import static org.jboss.as.security.Constants.AUTHENTICATION;
+import static org.jboss.as.security.Constants.CODE;
+import static org.jboss.as.security.Constants.FLAG;
+import static org.jboss.as.security.Constants.MODULE_OPTIONS;
+import static org.jboss.as.security.Constants.SECURITY_DOMAIN;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentAction;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentPlanResult;
+import org.jboss.dmr.ModelNode;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployer.Deployer;
+
+/**
+ * Remote deployer that uses AS7 client deployment API.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:alessio.soldano@jboss.com">Alessio Soldano</a>
+ */
+public final class RemoteDeployer implements Deployer {
+
+ private static final Logger LOGGER = Logger.getLogger(RemoteDeployer.class);
+ private static final int PORT = 9999;
+ private final Map<URL, String> url2Id = new HashMap<URL, String>();
+ private final InetAddress address = InetAddress.getByName("127.0.0.1");
+
+ private ServerDeploymentManager deploymentManager;
+
+ public RemoteDeployer() throws IOException {
+ deploymentManager = ServerDeploymentManager.Factory.create(address, PORT);
+ }
+
+ @Override
+ public void deploy(final URL archiveURL) throws Exception {
+ final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan().add(archiveURL).andDeploy();
+ final DeploymentPlan plan = builder.build();
+ final DeploymentAction deployAction = builder.getLastAction();
+ final String uniqueId = deployAction.getDeploymentUnitUniqueName();
+ executeDeploymentPlan(plan, deployAction);
+ url2Id.put(archiveURL, uniqueId);
+ }
+
+ @Override
+ public void undeploy(final URL archiveURL) throws Exception {
+ final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
+ final String uniqueName = url2Id.get(archiveURL);
+ if (uniqueName != null) {
+ final DeploymentPlan plan = builder.undeploy(uniqueName).remove(uniqueName).build();
+ final DeploymentAction deployAction = builder.getLastAction();
+ try {
+ executeDeploymentPlan(plan, deployAction);
+ } finally {
+ url2Id.remove(archiveURL);
+ }
+ }
+ }
+
+ private void executeDeploymentPlan(final DeploymentPlan plan, final DeploymentAction deployAction) throws Exception {
+ try {
+ final ServerDeploymentPlanResult planResult = deploymentManager.execute(plan).get();
+
+ if (deployAction != null) {
+ final ServerDeploymentActionResult actionResult = planResult
+ .getDeploymentActionResult(deployAction.getId());
+ if (actionResult != null) {
+ final Exception deploymentException = (Exception) actionResult.getDeploymentException();
+ if (deploymentException != null)
+ throw deploymentException;
+ }
+ }
+ } catch (final Exception e) {
+ LOGGER.fatal(e.getMessage(), e);
+ throw e;
+ }
+ }
+
+ @Override
+ public void addSecurityDomain(String name, Map<String, String> authenticationOptions) throws Exception {
+ ModelControllerClient client = ModelControllerClient.Factory.create(address, PORT);
+ ModelNode result = createSecurityDomain(client, name, authenticationOptions);
+ checkResult(result);
+ }
+
+ @Override
+ public void removeSecurityDomain(String name) throws Exception {
+ ModelControllerClient client = ModelControllerClient.Factory.create(address, PORT);
+ ModelNode result = removeSecurityDomain(client, name);
+ checkResult(result);
+ }
+
+ private static ModelNode createSecurityDomain(ModelControllerClient client, String name, Map<String, String> authenticationOptions) throws IOException {
+ ModelNode op = new ModelNode();
+ op.get(OP).set(ADD);
+ op.get(OP_ADDR).add(SUBSYSTEM, "security");
+ op.get(OP_ADDR).add(SECURITY_DOMAIN, name);
+ ModelNode loginModule = op.get(AUTHENTICATION).add();
+ loginModule.get(CODE).set("UsersRoles");
+ loginModule.get(FLAG).set("required");
+ ModelNode moduleOptions = loginModule.get(MODULE_OPTIONS);
+ if (authenticationOptions != null) {
+ for (String k : authenticationOptions.keySet()) {
+ moduleOptions.add(k, authenticationOptions.get(k));
+ }
+ }
+ return client.execute(op);
+ }
+
+ private static ModelNode removeSecurityDomain(ModelControllerClient client, String name) throws IOException {
+ ModelNode op = new ModelNode();
+ op.get(OP).set(REMOVE);
+ op.get(OP_ADDR).add(SUBSYSTEM, "security");
+ op.get(OP_ADDR).add(SECURITY_DOMAIN, name);
+ return client.execute(op);
+ }
+
+ private static void checkResult(ModelNode result) throws Exception {
+ if (result.hasDefined("outcome") && "success".equals(result.get("outcome").asString())) {
+ if (result.hasDefined("result")) {
+ LOGGER.info(result.get("result"));
+ }
+ } else if (result.hasDefined("failure-description")) {
+ throw new Exception(result.get("failure-description").toString());
+ } else {
+ throw new Exception("Operation not successful; outcome = " + result.get("outcome"));
+ }
+ }
+}
Added: container/jboss70/branches/jbossws-jboss700/src/main/resources/META-INF/services/org.jboss.wsf.spi.deployer.Deployer
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/resources/META-INF/services/org.jboss.wsf.spi.deployer.Deployer (rev 0)
+++ container/jboss70/branches/jbossws-jboss700/src/main/resources/META-INF/services/org.jboss.wsf.spi.deployer.Deployer 2011-11-11 11:24:56 UTC (rev 15235)
@@ -0,0 +1 @@
+org.jboss.as.webservices.tests.RemoteDeployer
13 years, 2 months