[SYNCOPE-1023] Moving the Activiti test content setup from the all profile into the embedded profile (with condition)
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e4947c90 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e4947c90 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e4947c90 Branch: refs/heads/master Commit: e4947c909e4cf18713653a4e4977489331c5fb45 Parents: 0d090c7 Author: Francesco Chicchiriccò <ilgro...@apache.org> Authored: Wed Feb 22 18:59:41 2017 +0100 Committer: Francesco Chicchiriccò <ilgro...@apache.org> Committed: Wed Feb 22 19:01:15 2017 +0100 ---------------------------------------------------------------------- .../archetype-resources/console/pom.xml | 112 +------------------ .../resources/archetype-resources/core/pom.xml | 37 +----- .../archetype-resources/enduser/pom.xml | 34 ++++++ 3 files changed, 36 insertions(+), 147 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/e4947c90/archetype/src/main/resources/archetype-resources/console/pom.xml ---------------------------------------------------------------------- diff --git a/archetype/src/main/resources/archetype-resources/console/pom.xml b/archetype/src/main/resources/archetype-resources/console/pom.xml index 144757d..4102c4e 100644 --- a/archetype/src/main/resources/archetype-resources/console/pom.xml +++ b/archetype/src/main/resources/archetype-resources/console/pom.xml @@ -192,117 +192,7 @@ ORYX.Editor.createByUrl = function(modelUrl){"/> </testResources> </build> - <profiles> - <profile> - <id>embedded</id> - - <properties> - <conf.directory>${project.build.directory}/test-classes</conf.directory> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.syncope.fit</groupId> - <artifactId>syncope-fit-build-tools</artifactId> - <version>${syncope.version}</version> - <type>war</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <defaultGoal>clean verify cargo:run</defaultGoal> - - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <inherited>true</inherited> - <executions> - <execution> - <id>setupEmbeddedConf</id> - <phase>package</phase> - <configuration> - <target> - <delete dir="../core/target/syncope/WEB-INF/classes/domains"/> - <copy todir="../core/target/syncope/WEB-INF/classes/domains"> - <fileset dir="../core/target/test-classes/domains"/> - </copy> - <copy file="../core/target/test-classes/connid.properties" - todir="../core/target/syncope/WEB-INF/classes" - overwrite="true"/> - <copy file="../core/target/test-classes/db.jsp" - todir="../core/target/syncope" - overwrite="true"/> - - <copy file="${project.build.directory}/test-classes/console.properties" - todir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes" - overwrite="true"/> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <inherited>true</inherited> - <configuration> - <container> - <dependencies> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - </dependency> - </dependencies> - </container> - <configuration> - <type>standalone</type> - <properties> - <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port> - <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port> - <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port> - - <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC</cargo.jvmargs> - </properties> - </configuration> - <deployables> - <deployable> - <groupId>org.apache.syncope.fit</groupId> - <artifactId>syncope-fit-build-tools</artifactId> - <type>war</type> - <properties> - <context>syncope-fit-build-tools</context> - </properties> - </deployable> - <deployable> - <location>../core/target/syncope</location> - <properties> - <context>syncope</context> - </properties> - </deployable> - <deployable> - <location>${project.build.directory}/${project.build.finalName}</location> - <properties> - <context>syncope-console</context> - </properties> - </deployable> - </deployables> - </configuration> - </plugin> - </plugins> - </build> - </profile> - + <profiles> <profile> <id>all</id> http://git-wip-us.apache.org/repos/asf/syncope/blob/e4947c90/archetype/src/main/resources/archetype-resources/core/pom.xml ---------------------------------------------------------------------- diff --git a/archetype/src/main/resources/archetype-resources/core/pom.xml b/archetype/src/main/resources/archetype-resources/core/pom.xml index 62558a1..24f7f19 100644 --- a/archetype/src/main/resources/archetype-resources/core/pom.xml +++ b/archetype/src/main/resources/archetype-resources/core/pom.xml @@ -178,42 +178,7 @@ under the License. </dependency> </dependencies> - <build> - <plugins> - <!-- Adds Activiti test content --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>xml-maven-plugin</artifactId> - <inherited>true</inherited> - <executions> - <execution> - <phase>prepare-package</phase> - <goals> - <goal>transform</goal> - </goals> - </execution> - </executions> - <configuration> - <transformationSets> - <transformationSet> - <dir>${project.build.directory}/test-classes</dir> - <includes> - <include>domains/MasterContent.xml</include> - </includes> - <outputDir>${project.build.directory}/classes</outputDir> - <stylesheet>${basedir}/src/test/resources/addActivitiToContent.xsl</stylesheet> - <outputProperties> - <outputProperty> - <name>indent</name> - <value>yes</value> - </outputProperty> - </outputProperties> - </transformationSet> - </transformationSets> - </configuration> - </plugin> - </plugins> - + <build> <resources> <resource> <directory>src/main/resources</directory> http://git-wip-us.apache.org/repos/asf/syncope/blob/e4947c90/archetype/src/main/resources/archetype-resources/enduser/pom.xml ---------------------------------------------------------------------- diff --git a/archetype/src/main/resources/archetype-resources/enduser/pom.xml b/archetype/src/main/resources/archetype-resources/enduser/pom.xml index 6bbcfeb..99ed1df 100644 --- a/archetype/src/main/resources/archetype-resources/enduser/pom.xml +++ b/archetype/src/main/resources/archetype-resources/enduser/pom.xml @@ -168,6 +168,33 @@ under the License. <inherited>true</inherited> <executions> <execution> + <id>addActivitiTestContent</id> + <phase>prepare-package</phase> + <configuration> + <target> + <taskdef resource="net/sf/antcontrib/antcontrib.properties" + classpathref="maven.plugin.classpath"/> + + <if> + <available file="../core/target/syncope/WEB-INF/lib/activiti-engine-${activiti.version}.jar"/> + <then> + <xslt basedir="../core/target/test-classes/domains" + includes="MasterContent.xml" + destdir="../core/target" + extension=".xml" + force="true" + style="../core/src/test/resources/addActivitiToContent.xsl"/> + <move file="../core/target/MasterContent.xml" + tofile="../core/target/test-classes/domains/MasterContent.xml"/> + </then> + </if> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + <execution> <id>setupEmbeddedConf</id> <phase>package</phase> <configuration> @@ -193,6 +220,13 @@ under the License. </goals> </execution> </executions> + <dependencies> + <dependency> + <groupId>ant-contrib</groupId> + <artifactId>ant-contrib</artifactId> + <version>20020829</version> + </dependency> + </dependencies> </plugin> <plugin>