DPascalBernard / maven-alfresco-archetypes

Automatically exported from code.google.com/p/maven-alfresco-archetypes
0 stars 0 forks source link

All-in-one archetype doesn't do hot deployment with JRebel #181

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install & configure JRebel 5.5.1 with valid licence
2. Create a new maven project with All-in-one archetype
3.  Perform a mvn install -Prun,rad
4. When Alfresco is up and running add the folders:
/extension/templates/webscripts 
inside  
/amp/src/main/amp/config/alfresco/
5. Create a webscript descriptor inside the webscripts folder, 

example "jrebel-test.get.desc.xml"

<webscript>
   <shortname>Jrebel-test</shortname>
   <url>/enterprise/admin/jrebel-test</url>
</webscript>

6. Refresh Alfresco Webscripts

What is the expected output? 
JRebel should hot deploy and alfresco should install the new webscript

What do you see instead?
The new webscript is not installed

What version of the product are you using? 
SDK 1.1.0
All-in-on archetype
Alfresco 4.2.0

Please provide any additional information below.
Works fine with the AMP archetype

Original issue reported on code.google.com by marco.ma...@gmail.com on 4 Mar 2014 at 4:30

GoogleCodeExporter commented 8 years ago
I could see in my logs:

JRebel: ERROR Error! Invalid 'dir' defined in class path of rebel.xml 
(jndi:/localhost/share/WEB-INF/classes/rebel.xml): Directory 
'/Users/xxx/Documents/workspace/maven-jrebel-aio/jrebel-test/share/target/test-c
lasses' does not exist
JRebel: ERROR Error! Invalid 'dir' defined in web link of rebel.xml   
(jndi:/localhost/share/WEB-INF/classes/rebel.xml): Directory 
'/Users/xxx/Documents/workspace/maven-jrebel-aio/jrebel-test/share/target/share-
war' does not exist
JRebel: ERROR Error! Invalid 'dir' defined in class path of rebel.xml 
(jndi:/localhost/alfresco/WEB-INF/classes/rebel.xml): Directory 
'/Users/xxx/Documents/workspace/maven-jrebel-aio/jrebel-test/alfresco/target/tes
t-classes' does not exist
JRebel: ERROR Error! Invalid 'dir' defined in web link of rebel.xml 
(jndi:/localhost/alfresco/WEB-INF/classes/rebel.xml): Directory 
'/Users/xxx/Documents/workspace/maven-jrebel-aio/jrebel-test/alfresco/target/alf
resco-war' does not exist
JRebel: ERROR Error! Invalid 'dir' defined in web link of rebel.xml 
(jar:file:/Users/xxx/Documents/workspace/maven-jrebel-aio/jrebel-test/runner/tar
get/tomcat/webapps/alfresco/WEB-INF/lib/amp.jar!/rebel.xml): Directory 
'/Users/xxx/Documents/workspace/maven-jrebel-aio/jrebel-test/amp/target/amp-war'
 does not exist

So I have changed the AIO pom.xml to override the JRebel Plugin adding:

<profile>
      <id>rad</id>
      <build>
        <plugins>
            <plugin>
                <groupId>org.zeroturnaround</groupId>
                <artifactId>jrebel-maven-plugin</artifactId>
                <version>1.1.5</version>
                <executions>
                  <execution>
                    <id>generate-rebel-xml</id>
                    <phase>prepare-package</phase>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </execution>
                </executions>
                <configuration>
                    <packaging>war</packaging>
                    <generateDefaultElements>false</generateDefaultElements>
                    <classpath>
                        <resources>
                            <resource>
                                <directory>${project.build.outputDirectory}</directory>
                            </resource>
                            <resource>
                                <directory>${project.build.testOutputDirectory}</directory>
                            </resource>
                        </resources>
                    </classpath>
                    <web>
                        <resources>
                            <resource>
                                <target>/</target>
                                <directory>${project.build.directory}/${project.build.finalName}</directory>
                            </resource>
                            <resource>
                                <target>/</target>
                                <directory>${project.build.directory}/war</directory>  
                            </resource>
                        </resources>
                    </web>
                </configuration>
            </plugin>
        </plugins>
      </build>
      <dependencies>
          <!-- Add RAD capabilities for remote JUnit test running (client) -->
          <dependency>
              <groupId>org.alfresco.maven</groupId>
              <artifactId>alfresco-rad</artifactId>
              <version>${maven.alfresco.version}</version>
          </dependency>
      </dependencies>

    </profile>

  </profiles>

Now any changes inside the Alfresco project and Share project are taken into 
account, not inside the amp. Is it supposed to work with the AMP as well?

Original comment by marco.ma...@gmail.com on 26 Jun 2014 at 3:44

GoogleCodeExporter commented 8 years ago
Marco, can you commit this in the SDK parent POM so that we can close this 
issue?

Assigning it to you for now. Let me know!

Original comment by colum...@gmail.com on 18 Jul 2014 at 12:10