mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-19 17:15:24 +00:00
- improved approach for issue 197 (especially for IDEA, Ole you are
welcome :) - reduced usage of copy-resources where possible to maximize idea compatibility - reduced duplication of amp resources in the classpath - tested in eclipse and all seems to work (test, remote junit test, amp-to-war, hot java reload with spring loaded, new webscript hot loaded, jsp change)
This commit is contained in:
parent
3f44c3be58
commit
760d970240
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
|
<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
|
||||||
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory}" />
|
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory};${project.build.directory}/${project.build.finalName}/config" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
|
<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
|
||||||
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory}" />
|
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory};${project.build.directory}/${project.build.finalName}/config" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||||
|
@ -75,7 +75,6 @@
|
|||||||
-->
|
-->
|
||||||
<app.amp.folder>src/main/amp</app.amp.folder>
|
<app.amp.folder>src/main/amp</app.amp.folder>
|
||||||
<app.amp.output.folder>../${project.build.finalName}</app.amp.output.folder>
|
<app.amp.output.folder>../${project.build.finalName}</app.amp.output.folder>
|
||||||
<app.amp.test.output.folder>${project.build.directory}/amp-test-classpath</app.amp.test.output.folder>
|
|
||||||
<!-- Empty AMP source excludes by default, see the amp-to-war profile for usage example -->
|
<!-- Empty AMP source excludes by default, see the amp-to-war profile for usage example -->
|
||||||
<app.amp.excludes></app.amp.excludes>
|
<app.amp.excludes></app.amp.excludes>
|
||||||
<app.properties.folder>src/main/properties/${env}</app.properties.folder>
|
<app.properties.folder>src/main/properties/${env}</app.properties.folder>
|
||||||
@ -308,7 +307,10 @@
|
|||||||
</goals>
|
</goals>
|
||||||
</pluginExecutionFilter>
|
</pluginExecutionFilter>
|
||||||
<action>
|
<action>
|
||||||
<ignore></ignore>
|
<execute>
|
||||||
|
<runOnIncremental>true</runOnIncremental>
|
||||||
|
<runOnConfiguration>true</runOnConfiguration>
|
||||||
|
</execute>
|
||||||
</action>
|
</action>
|
||||||
</pluginExecution>
|
</pluginExecution>
|
||||||
</pluginExecutions>
|
</pluginExecutions>
|
||||||
@ -439,47 +441,27 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.alfresco.maven.plugin</groupId>
|
<groupId>org.alfresco.maven.plugin</groupId>
|
||||||
<artifactId>alfresco-maven-plugin</artifactId>
|
<artifactId>alfresco-maven-plugin</artifactId>
|
||||||
|
<extensions>true</extensions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
<!-- Copies module properties to the test classpath in the right location, so that it can be picked up by tests and tomcat embedded -->
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<!-- Enable AMP testing if finds a module.properties, including unit testing support -->
|
|
||||||
<profile>
|
|
||||||
<id>enable-amp-dev</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>src/main/amp/module.properties</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<!-- Basically copies AMP config and module.properties in target/test-classes so that they can be loaded at test time and the module can be installed -->
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>prepare-amp-testing-classpath</id>
|
<id>add-module-properties-to-test-classpath</id>
|
||||||
<phase>process-test-resources</phase>
|
<phase>process-test-resources</phase>
|
||||||
<goals><goal>copy-resources</goal></goals>
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
|
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
|
||||||
<directory>${app.amp.folder}/config</directory>
|
|
||||||
<filtering>${app.filtering.enabled}</filtering>
|
|
||||||
<excludes>
|
|
||||||
<exclude>module.properties</exclude>
|
|
||||||
</excludes>
|
|
||||||
</resource>
|
|
||||||
<!-- If exists, copies the module properties in the right classpath, to install it at test time -->
|
|
||||||
<resource>
|
<resource>
|
||||||
<directory>${app.amp.folder}</directory>
|
<directory>${app.amp.folder}</directory>
|
||||||
<filtering>${app.filtering.enabled}</filtering>
|
|
||||||
<includes>
|
<includes>
|
||||||
<include>module.properties</include>
|
<include>module.properties</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<filtering>${app.filtering.enabled}</filtering>
|
||||||
<targetPath>alfresco/module/${project.artifactId}</targetPath>
|
<targetPath>alfresco/module/${project.artifactId}</targetPath>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
@ -489,6 +471,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<!-- Enables alfresco testing dependencies if a src/test/java folder is found, by adding appropriate dependencies -->
|
<!-- Enables alfresco testing dependencies if a src/test/java folder is found, by adding appropriate dependencies -->
|
||||||
@ -507,21 +490,12 @@
|
|||||||
<version>${maven.surefire.version}</version>
|
<version>${maven.surefire.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<argLine>${app.testing.jvm.args}</argLine>
|
<argLine>${app.testing.jvm.args}</argLine>
|
||||||
|
<additionalClasspathElements>
|
||||||
|
<!-- Adds both the module config to test classpath -->
|
||||||
|
<additionalClasspathElement>${project.build.directory}/${project.build.finalName}/config</additionalClasspathElement>
|
||||||
|
</additionalClasspathElements>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Add RAD capabilities for remote JUnit test running. This is added to Tomcat classpath,
|
|
||||||
so the custom JUnit test receiver is found in the running webapp classpath -->
|
|
||||||
<!-- <plugin> -->
|
|
||||||
<!-- <groupId>org.apache.tomcat.maven</groupId> -->
|
|
||||||
<!-- <artifactId>tomcat7-maven-plugin</artifactId> -->
|
|
||||||
<!-- <dependencies> -->
|
|
||||||
<!-- <dependency> -->
|
|
||||||
<!-- <groupId>org.alfresco.maven</groupId> -->
|
|
||||||
<!-- <artifactId>alfresco-rad</artifactId> -->
|
|
||||||
<!-- <version>${maven.alfresco.version}</version> -->
|
|
||||||
<!-- </dependency> -->
|
|
||||||
<!-- </dependencies> -->
|
|
||||||
<!-- </plugin> -->
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user