You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/03/28 12:08:12 UTC
svn commit: r1462036 - in /syncope/trunk/core: pom.xml
src/test/resources/weblogic/
src/test/resources/weblogic/conninstance-reload.jsp
Author: ilgrosso
Date: Thu Mar 28 11:08:12 2013
New Revision: 1462036
URL: http://svn.apache.org/r1462036
Log:
[SYNCOPE-137] Verified with all alternative JEE containers: modifications needed for WebLogic
Added:
syncope/trunk/core/src/test/resources/weblogic/
syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp (with props)
Modified:
syncope/trunk/core/pom.xml
Modified: syncope/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/pom.xml?rev=1462036&r1=1462035&r2=1462036&view=diff
==============================================================================
--- syncope/trunk/core/pom.xml (original)
+++ syncope/trunk/core/pom.xml Thu Mar 28 11:08:12 2013
@@ -505,14 +505,6 @@ under the License.
</configuration>
<deployables>
<deployable>
- <location>${cargo.run.dir}</location>
- <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
- <pingTimeout>60000</pingTimeout>
- <properties>
- <context>syncope</context>
- </properties>
- </deployable>
- <deployable>
<groupId>org.connid.bundles.soap</groupId>
<artifactId>wssample</artifactId>
<type>war</type>
@@ -528,6 +520,14 @@ under the License.
<context>syncope-build-tools</context>
</properties>
</deployable>
+ <deployable>
+ <location>${cargo.run.dir}</location>
+ <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
+ <pingTimeout>60000</pingTimeout>
+ <properties>
+ <context>syncope</context>
+ </properties>
+ </deployable>
</deployables>
</configuration>
<executions>
@@ -650,6 +650,7 @@ under the License.
<exclude>mysql/**</exclude>
<exclude>sqlserver/**</exclude>
<exclude>jboss/**</exclude>
+ <exclude>weblogic/**</exclude>
</excludes>
</testResource>
</testResources>
@@ -1304,11 +1305,18 @@ under the License.
<phase>pre-integration-test</phase>
<configuration>
<target>
+ <!-- Needed because WebLogic has problems in running ApacheDS from the WAR archive -->
<unzip src="${settings.localRepository}/org/apache/syncope/syncope-build-tools/${project.version}/syncope-build-tools-${project.version}.war"
dest="${project.build.directory}/syncope-build-tools-test"/>
+ <!-- Needed because WebLogic is installed (H2 dependency cannot be injected via cargo) -->
<copy file="${settings.localRepository}/com/h2database/h2/${h2.version}/h2-${h2.version}.jar"
todir="${project.build.directory}/syncope-build-tools-test/WEB-INF/lib"
overwrite="true"/>
+ <!-- Needed because WebLogic deploys first core then build-tools: this JSP will just ask core to
+ reload all connectors -->
+ <copy file="${project.build.directory}/test-classes/conninstance-reload.jsp"
+ todir="${project.build.directory}/syncope-build-tools-test"
+ overwrite="true"/>
</target>
</configuration>
<goals>
@@ -1338,14 +1346,6 @@ under the License.
</configuration>
<deployables>
<deployable>
- <location>${cargo.run.dir}</location>
- <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
- <pingTimeout>1200000</pingTimeout>
- <properties>
- <context>syncope</context>
- </properties>
- </deployable>
- <deployable>
<groupId>org.connid.bundles.soap</groupId>
<artifactId>wssample</artifactId>
<type>war</type>
@@ -1355,10 +1355,22 @@ under the License.
</deployable>
<deployable>
<location>${project.build.directory}/syncope-build-tools-test</location>
+ <!-- build-tools are correctly deployed only when call to this JSP returns 200, e.g.
+ when connectors are reloaded by the core -->
+ <pingURL>http://localhost:${cargo.servlet.port}/syncope-build-tools/conninstance-reload.jsp</pingURL>
+ <pingTimeout>1200000</pingTimeout>
<properties>
<context>syncope-build-tools</context>
</properties>
</deployable>
+ <deployable>
+ <location>${cargo.run.dir}</location>
+ <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
+ <pingTimeout>1200000</pingTimeout>
+ <properties>
+ <context>syncope</context>
+ </properties>
+ </deployable>
</deployables>
</configuration>
</plugin>
@@ -1380,6 +1392,12 @@ under the License.
</includes>
</resource>
</resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources/weblogic</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
</build>
</profile>
Added: syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp?rev=1462036&view=auto
==============================================================================
--- syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp (added)
+++ syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp Thu Mar 28 11:08:12 2013
@@ -0,0 +1,48 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
+<%@page import="java.io.InputStreamReader"%>
+<%@page import="java.io.BufferedReader"%>
+<%@page import="java.io.InputStream"%>
+<%@page import="java.io.DataOutputStream"%>
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@page import="java.net.HttpURLConnection"%>
+<%@page import="java.net.URLConnection"%>
+<%@page import="java.net.URL"%>
+<%
+ String encodedAuth = new sun.misc.BASE64Encoder().encode("admin:password".getBytes());
+
+ URL url = new URL("http://localhost:9080/syncope/rest/connector/reload.json");
+
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setRequestMethod("POST");
+ conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+ conn.setRequestProperty("Authorization", "Basic " + encodedAuth);
+ conn.setUseCaches(false);
+ conn.setDoOutput(true);
+
+ InputStream is = conn.getInputStream();
+ BufferedReader rd = new BufferedReader(new InputStreamReader(is));
+ String line;
+ StringBuilder res = new StringBuilder();
+ while ((line = rd.readLine()) != null) {
+ res.append(line);
+ res.append('\n');
+ }
+ rd.close();
+%>
Propchange: syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: syncope/trunk/core/src/test/resources/weblogic/conninstance-reload.jsp
------------------------------------------------------------------------------
svn:mime-type = text/plain