manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1634133 - in /manifoldcf/branches/dev_1x: ./ connectors/alfresco-webscript/ connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/ connectors/alfresco-webscript/connector/src/test/...
Date Fri, 24 Oct 2014 20:33:15 GMT
Author: kwright
Date: Fri Oct 24 20:33:14 2014
New Revision: 1634133

URL: http://svn.apache.org/r1634133
Log:
Pull up fix for CONNECTORS-1060 from trunk.

Added:
    manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java
      - copied unchanged from r1634132, manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java
    manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/BaseITHSQLDB.java
      - copied unchanged from r1634132, manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/BaseITHSQLDB.java
    manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/CMISUtils.java
      - copied unchanged from r1634132, manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/CMISUtils.java
Modified:
    manifoldcf/branches/dev_1x/   (props changed)
    manifoldcf/branches/dev_1x/CHANGES.txt
    manifoldcf/branches/dev_1x/build.xml
    manifoldcf/branches/dev_1x/connectors/alfresco-webscript/build.xml
    manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java
    manifoldcf/branches/dev_1x/connectors/alfresco-webscript/pom.xml
    manifoldcf/branches/dev_1x/connectors/alfresco-webscript/test-materials-proprietary/ 
 (props changed)

Propchange: manifoldcf/branches/dev_1x/
------------------------------------------------------------------------------
  Merged /manifoldcf/branches/CONNECTORS-1060:r1632947-1634129
  Merged /manifoldcf/trunk:r1634132

Modified: manifoldcf/branches/dev_1x/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/CHANGES.txt?rev=1634133&r1=1634132&r2=1634133&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/CHANGES.txt (original)
+++ manifoldcf/branches/dev_1x/CHANGES.txt Fri Oct 24 20:33:14 2014
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 1.8-dev =====================
 
+CONNECTORS-1060: Implement Alfresco webscript connector integration
+test.
+(Maurizio Pillitu)
+
 CONNECTORS-1081: ElasticSearch documentation update.
 (Jens Jahnke)
 

Modified: manifoldcf/branches/dev_1x/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/build.xml?rev=1634133&r1=1634132&r2=1634133&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/build.xml (original)
+++ manifoldcf/branches/dev_1x/build.xml Fri Oct 24 20:33:14 2014
@@ -94,7 +94,7 @@
     <property name="jackson-core.version" value="2.1.3"/>
     <property name="jetty-jsp-jdt.version" value="2.3.3"/>
     <property name="jetty-schemas.version" value="3.1.M0"/>
-    <property name="alfresco-indexer-client.version" value="0.6.2"/>
+    <property name="alfresco-indexer-client.version" value="0.6.5"/>
     <property name="gson.version" value="2.2.4"/>
     <property name="guava.version" value="15.0"/>
     <property name="mockito.version" value="1.9.5"/>

Modified: manifoldcf/branches/dev_1x/connectors/alfresco-webscript/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/alfresco-webscript/build.xml?rev=1634133&r1=1634132&r2=1634133&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/alfresco-webscript/build.xml (original)
+++ manifoldcf/branches/dev_1x/connectors/alfresco-webscript/build.xml Fri Oct 24 20:33:14
2014
@@ -30,6 +30,8 @@
 
     <import file="${mcf-dist}/connector-build.xml"/>
 
+    <property name="alfresco.version" value="0.6.5"/>
+
     <path id="connector-classpath">
         <path refid="mcf-connector-build.connector-classpath"/>
         <fileset dir="../../lib">
@@ -39,6 +41,22 @@
         </fileset>
     </path>
 
+    <path id="connector-test-classpath">
+        <path refid="mcf-connector-build.connector-test-classpath"/>
+        <fileset dir="../../lib">
+            <include name="chemistry*.jar"/>
+            <include name="stax*.jar"/>
+            <include name="streambuffer*.jar"/>
+            <include name="jaxb*.jar"/>
+            <include name="jaxws*.jar"/>
+            <include name="wstx-asl*.jar"/>
+            <include name="mimepull*.jar"/>
+            <include name="resolver*.jar"/>
+            <include name="org.osgi.core*.jar"/>
+            <include name="commons-lang*.jar"/>
+        </fileset>
+    </path>
+
     <target name="lib" depends="mcf-connector-build.lib,precompile-check" if="canBuild">
         <mkdir dir="dist/lib"/>
         <copy todir="dist/lib">
@@ -50,8 +68,30 @@
         </copy>
     </target>
 
-    <!-- target name="calculate-testcode-condition">
-        <available file="test-materials-proprietary/alfresco.war" property="alfrescoTestcodeStatus"/>
+    <target name="setup-alfresco-indexer-url">
+        <property name="alfresco-indexer-base-url" value="https://repository-maoo.forge.cloudbees.com/release"/>
+    </target>
+    
+    <target name="download-via-alfresco-indexer" depends="setup-alfresco-indexer-url">
+        <get src="${alfresco-indexer-base-url}/${project-path}/${artifact-name}/${artifact-version}/${artifact-name}-${artifact-version}.${artifact-type}"
dest="${target}/${artifact-name}-${artifact-version}.${artifact-type}"/>
+    </target>
+
+    <target name="download-dependencies">
+        <property name="alfresco-package" value="org/alfresco/consulting/indexer"/>
+        <antcall target="download-via-alfresco-indexer"><param name="project-path"
value="${alfresco-package}"/><param name="artifact-version" value="${alfresco.version}"/><param
name="target" value="test-materials-proprietary"/>
+            <param name="artifact-name" value="alfresco-indexer-webscripts-war"/>
+            <param name="artifact-type" value="war"/>
+        </antcall>
+    </target>
+
+    <target name="download-cleanup">
+        <delete>
+            <fileset dir="test-materials-proprietary" excludes="README*.txt"/>
+        </delete>
+    </target>
+
+    <target name="calculate-testcode-condition">
+        <available file="test-materials-proprietary/alfresco-indexer-webscripts-war-${alfresco.version}.war"
property="alfrescoTestcodeStatus"/>
         <condition property="tests-present">
             <isset property="alfrescoTestcodeStatus"/>
         </condition>
@@ -59,7 +99,7 @@
 
     <target name="pretest-warn" depends="calculate-testcode-condition" unless="tests-present">
         <echo message="Alfresco Connector integration tests cannot be be performed without
alfresco.war"/>
-    </target -->
+    </target>
 
     <target name="deliver-connector" depends="mcf-connector-build.deliver-connector">
         <antcall target="general-add-repository-connector">
@@ -72,4 +112,33 @@
         </antcall>
     </target>
 
+    <target name="run-IT-HSQLDB" depends="compile-tests,pretest-check" if="canTest">
+        <mkdir dir="test-HSQLDB-output"/>
+        <junit fork="true" maxmemory="1024m" dir="test-HSQLDB-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
+            <jvmarg value="-DcrawlerWarPath=${mcf-dist}/web/war/mcf-crawler-ui.war"/>
+            <jvmarg value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
+            <jvmarg value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
+            <jvmarg value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+            <jvmarg value="-DalfrescoServerWarPath=../test-materials-proprietary/alfresco-indexer-webscripts-war-${alfresco.version}.war"/>
+            <jvmarg value="-Xms512m"/>
+            <jvmarg value="-Xmx1024m"/>
+            <jvmarg value="-Xss1024k"/>
+            <jvmarg value="-XX:MaxPermSize=256m"/>
+            <jvmarg value="-XX:NewSize=256m"/>
+            <classpath>
+                <fileset dir="${env.JAVA_HOME}/lib">
+                    <include name="tools.jar"/>
+                </fileset>
+                <path refid="connector-test-classpath"/>
+                <pathelement location="build/connector-tests/classes"/>
+            </classpath>
+            <formatter type="brief" usefile="false"/>
+            <batchtest todir="test-HSQLDB-output">
+                <fileset dir="build/connector-tests/classes">
+                    <include name="**/*HSQLDBIT.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
 </project>

Modified: manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java?rev=1634133&r1=1634132&r2=1634133&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java
Fri Oct 24 20:33:14 2014
@@ -82,6 +82,17 @@ public class AlfrescoConnector extends B
     String username = getConfig(config, "username", null);
     String password = getObfuscatedConfig(config, "password", null);
 
+    System.out.println("============");
+    System.out.println(protocol);
+    System.out.println(hostname);
+    System.out.println(port);
+    System.out.println(endpoint);
+    System.out.println(storeProtocol);
+    System.out.println(storeId);
+    System.out.println(username);
+    System.out.println(password);
+    System.out.println("============");
+
     alfrescoClient = new WebScriptsAlfrescoClient(protocol, hostname + ":" + port, endpoint,
         storeProtocol, storeId, username, password);
   }
@@ -173,6 +184,8 @@ public class AlfrescoConnector extends B
         if (Logging.connectors != null && Logging.connectors.isDebugEnabled())
           Logging.connectors.debug(MessageFormat.format("Fetched and added {0} seed documents",
new Object[]{new Integer(count)}));
 
+        System.out.println(MessageFormat.format("!!! Fetched and added {0} seed documents",
new Object[]{new Integer(count)}));
+
         transactionIdsProcessed = response.getLastTransactionId() - lastTransactionId;
         aclChangesetsProcessed = response.getLastAclChangesetId() - lastAclChangesetId;
 

Modified: manifoldcf/branches/dev_1x/connectors/alfresco-webscript/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/alfresco-webscript/pom.xml?rev=1634133&r1=1634132&r2=1634133&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/alfresco-webscript/pom.xml (original)
+++ manifoldcf/branches/dev_1x/connectors/alfresco-webscript/pom.xml Fri Oct 24 20:33:14 2014
@@ -46,6 +46,7 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <alfresco.indexer.version>0.6.5</alfresco.indexer.version>
     </properties>
 
     <repositories>
@@ -124,6 +125,91 @@
                     <workingDirectory>target/test-output</workingDirectory>
                 </configuration>
             </plugin>
+
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-war</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>target/dependency</outputDirectory>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>${project.groupId}</groupId>
+                                    <artifactId>mcf-api-service</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>war</type>
+                                    <overWrite>false</overWrite>
+                                    <destFileName>mcf-api-service.war</destFileName>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>${project.groupId}</groupId>
+                                    <artifactId>mcf-authority-service</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>war</type>
+                                    <overWrite>false</overWrite>
+                                    <destFileName>mcf-authority-service.war</destFileName>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>${project.groupId}</groupId>
+                                    <artifactId>mcf-crawler-ui</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>war</type>
+                                    <overWrite>false</overWrite>
+                                    <destFileName>mcf-crawler-ui.war</destFileName>
+                                </artifactItem>
+                                <artifactItem>
+                                    <artifactId>alfresco-indexer-webscripts-war</artifactId>
+                                    <groupId>org.alfresco.consulting.indexer</groupId>
+                                    <version>${alfresco.indexer.version}</version>
+                                    <type>war</type>
+                                    <overWrite>false</overWrite>
+                                    <destFileName>alfresco.war</destFileName>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <version>2.12.3</version>
+                <configuration>
+                    <skipTests>${skipITs}</skipTests>
+                    <systemPropertyVariables>
+                        <crawlerWarPath>../dependency/mcf-crawler-ui.war</crawlerWarPath>
+                        <authorityserviceWarPath>../dependency/mcf-authority-service.war</authorityserviceWarPath>
+                        <apiWarPath>../dependency/mcf-api-service.war</apiWarPath>
+                        <alfrescoServerWarPath>../dependency/alfresco.war</alfrescoServerWarPath>
+                    </systemPropertyVariables>
+                    <excludes>
+                        <exclude>**/*Postgresql*.java</exclude>
+                        <exclude>**/*MySQL*.java</exclude>
+                    </excludes>
+                    <forkMode>always</forkMode>
+                    <workingDirectory>target/test-output</workingDirectory>
+                    <argLine>-Xms512m -Xmx1024m -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=256m</argLine>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>integration-test</id>
+                        <goals>
+                            <goal>integration-test</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>verify</id>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
@@ -131,7 +217,7 @@
         <dependency>
             <groupId>org.alfresco.consulting.indexer</groupId>
             <artifactId>alfresco-indexer-client</artifactId>
-            <version>0.6.2</version>
+            <version>${alfresco.indexer.version}</version>
         </dependency>
 
         <dependency>
@@ -156,6 +242,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.chemistry.opencmis</groupId>
+            <artifactId>chemistry-opencmis-client-impl</artifactId>
+            <version>0.10.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
           <groupId>${project.groupId}</groupId>
           <artifactId>mcf-core</artifactId>
           <version>${project.version}</version>
@@ -284,14 +376,14 @@
           <artifactId>jsp-api-2.1-glassfish</artifactId>
           <version>${glassfish.version}</version>
           <scope>test</scope>
-        </dependency>    
+        </dependency>
         <dependency>
           <groupId>org.mortbay.jetty</groupId>
           <artifactId>jsp-2.1-glassfish</artifactId>
           <version>${glassfish.version}</version>
           <scope>test</scope>
         </dependency>
-    
+
         <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-api</artifactId>
@@ -327,4 +419,4 @@
         </dependency>
 
     </dependencies>
-</project>
\ No newline at end of file
+</project>

Propchange: manifoldcf/branches/dev_1x/connectors/alfresco-webscript/test-materials-proprietary/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 24 20:33:14 2014
@@ -0,0 +1 @@
+*.war



Mime
View raw message