Commit 3c4d153f authored by mindthegab's avatar mindthegab
Browse files

issue 123: enabled jrebel support for amp-archetype and added alfresco-rad...

issue 123: enabled jrebel support for amp-archetype and added alfresco-rad module to provide remote running of JUnit tests. Switched demo test to using spring annotation as it works on alfresco 4.2.0, both for remote and local running of JUnit. The -Pamp-to-war profile adds the relevant JUnit listener (jetty) which listens for the class name and method, using junit-remote (https://github.com/Tradeshift/junit-remote)

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@719 04253f4f-3451-0410-a141-5562f1e59037
parent e3aeee23
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -61,9 +61,9 @@
      </includes>
    </fileSet>
    <fileSet filtered="false" encoding="UTF-8">
      <directory>src/test/properties</directory>
      <directory>src/test/resources</directory>
      <includes>
        <include>**/*.properties</include>
        <include>**/*</include>
      </includes>
    </fileSet>
    <fileSet filtered="false" encoding="UTF-8">
+34 −0
Original line number Diff line number Diff line
<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  
  <artifactId>alfresco-rad</artifactId>
  <packaging>jar</packaging>

  <name>alfresco-rad</name>
  
  <parent>
      <groupId>org.alfresco.maven</groupId>
      <artifactId>alfresco-lifecycle-aggregator</artifactId>
      <version>1.0.3-SNAPSHOT</version>
      <relativePath>../../pom.xml</relativePath>
  </parent>

  <dependencies>
       <!-- Enables JUnit remote testing (using JRebel) -->
       <dependency>
            <groupId>com.tradeshift</groupId>
            <artifactId>junit-remote</artifactId>
            <version>3</version>
            <type>jar</type>
       </dependency>
       <!-- Required to have annotation based remote testing working -->
       <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>3.0.6.RELEASE</version>
            <type>jar</type>
       </dependency>
  </dependencies>

</project>
+16 −0
Original line number Diff line number Diff line
package org.alfresco.maven.rad;

import com.tradeshift.test.remote.RemoteServer;

public class RemoteRunnerWrapper implements Runnable {

	public void run() {
		try {
	        RemoteServer.main(new String []{});
        } catch (Exception e) {
	        System.out.println("Could not start JUnit remoteServer");
        }

	}

}
+29 −0
Original line number Diff line number Diff line
<?xml version='1.0' encoding='UTF-8'?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. 
    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.
    
-->
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
     
    <bean id="remoteRunnnerWrapper" class="org.alfresco.maven.rad.RemoteRunnerWrapper"/>
    
    <bean id="remoteRunnnerWrapperThread" class="java.lang.Thread" init-method="start" destroy-method="interrupt">
        <constructor-arg ref="remoteRunnnerWrapper"/>
    </bean>


</beans>
+2 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@

    <!-- All the modules of the Maven Alfresco SDK -->
    <modules>
        <!-- Modules -->
        <module>modules/alfresco-rad</module>       
        <!-- Plugins -->
        <module>plugins/alfresco-maven-plugin</module>
        <!-- POM files -->
Loading