mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Added incremental build tasks
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@78749 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
45
build.xml
45
build.xml
@@ -8,14 +8,12 @@
|
|||||||
|
|
||||||
<property environment="env" />
|
<property environment="env" />
|
||||||
|
|
||||||
<target name="cleanTarget">
|
|
||||||
<delete dir="${ant.build.directory}" failonerror="true" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="install">
|
<target name="install">
|
||||||
<exec executable="${mvn.exec}" failonerror="true">
|
<exec executable="${mvn.exec}" failonerror="true">
|
||||||
|
<arg value="clean" />
|
||||||
<arg value="install" />
|
<arg value="install" />
|
||||||
<arg value="-DskipTests" />
|
<arg value="-DskipTests" />
|
||||||
|
<arg value="-PfullBuild" />
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@@ -39,7 +37,7 @@
|
|||||||
<delete dir="${app.folder}" failonerror="true" />
|
<delete dir="${app.folder}" failonerror="true" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="alfresco:amp" depends="cleanTarget, unitTest">
|
<target name="alfresco:amp" depends="install, unitTest">
|
||||||
<exec executable="${mvn.exec}" failonerror="true">
|
<exec executable="${mvn.exec}" failonerror="true">
|
||||||
<arg value="alfresco:amp" />
|
<arg value="alfresco:amp" />
|
||||||
</exec>
|
</exec>
|
||||||
@@ -55,7 +53,7 @@
|
|||||||
<copy file="${ant.build.directory}/${app.package}" todir="${app.tomcat.webapps}" failonerror="true" />
|
<copy file="${ant.build.directory}/${app.package}" todir="${app.tomcat.webapps}" failonerror="true" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="buildAndDeploy" depends="alfresco:install, copyWarFileToTomcat" description=""/>
|
<target name="fullBuild" depends="alfresco:install, copyWarFileToTomcat" description=""/>
|
||||||
|
|
||||||
<target name="getSvnRevision">
|
<target name="getSvnRevision">
|
||||||
<mkdir dir="${ant.build.directory}"/>
|
<mkdir dir="${ant.build.directory}"/>
|
||||||
@@ -66,31 +64,13 @@
|
|||||||
<property file="${svnInfoFile}"/>
|
<property file="${svnInfoFile}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="assembleLocalisationPackage" depends="getSvnRevision" description="">
|
|
||||||
<property name="i18n" value="${ant.build.directory}/i18n" />
|
|
||||||
<delete dir="${i18n}" failonerror="true" />
|
|
||||||
<copy todir="${i18n}/${ant.project.name}/${ant.config.directory}" failonerror="true">
|
|
||||||
<fileset dir="${ant.config.directory}">
|
|
||||||
<include name="**/*.properties" />
|
|
||||||
<exclude name="**/*_*.properties" />
|
|
||||||
<exclude name="**/rm-method-security.properties" />
|
|
||||||
<exclude name="**/alfresco-global.properties" />
|
|
||||||
<exclude name="**/log4j.properties" />
|
|
||||||
<exclude name="**/module.properties" />
|
|
||||||
<exclude name="**/file-mapping.properties" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<xmlproperty file="../pom.xml" keepRoot="false"/>
|
|
||||||
<zip destfile="${i18n}/${ant.project.name}-${version}-r${Revision}.zip" basedir="${i18n}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="copyWebDirectory" if="${web.directory.exists}">
|
<target name="copyWebDirectory" if="${web.directory.exists}">
|
||||||
<copy todir="${app.folder}" failonerror="true">
|
<copy todir="${app.folder}" failonerror="true">
|
||||||
<fileset dir="${ant.source.web.directory}" />
|
<fileset dir="${ant.source.web.directory}" />
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="deployExploded" depends="cleanTarget, install" description="">
|
<target name="package">
|
||||||
<fail message="Exploded webapp directory '${app.war.artifactId}' does not exist.">
|
<fail message="Exploded webapp directory '${app.war.artifactId}' does not exist.">
|
||||||
<condition>
|
<condition>
|
||||||
<not>
|
<not>
|
||||||
@@ -98,11 +78,16 @@
|
|||||||
</not>
|
</not>
|
||||||
</condition>
|
</condition>
|
||||||
</fail>
|
</fail>
|
||||||
<copy todir="${app.folder}/WEB-INF/lib" failonerror="true">
|
<exec executable="${mvn.exec}" failonerror="true">
|
||||||
<fileset dir="${ant.build.directory}">
|
<arg value="package" />
|
||||||
<include name="*.jar" />
|
<arg value="-DskipTests" />
|
||||||
</fileset>
|
</exec>
|
||||||
</copy>
|
</target>
|
||||||
|
|
||||||
|
<target name="incrementalBuild" depends="package, unitTest" description="">
|
||||||
|
<xmlproperty file="pom.xml" keepRoot="false"/>
|
||||||
|
<copy file="${ant.build.directory}/${artifactId}-${parent.version}.jar" tofile="${ant.build.directory}/${artifactId}-${parent.version}-amp.jar" failonerror="true" />
|
||||||
|
<move file="${ant.build.directory}/${artifactId}-${parent.version}-amp.jar" todir="${app.folder}/WEB-INF/lib" failonerror="true" />
|
||||||
<copy todir="${app.folder}/WEB-INF/classes" failonerror="true">
|
<copy todir="${app.folder}/WEB-INF/classes" failonerror="true">
|
||||||
<fileset dir="${ant.config.directory}">
|
<fileset dir="${ant.config.directory}">
|
||||||
<exclude name="**/module.properties" />
|
<exclude name="**/module.properties" />
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<target name="prepareEnv" depends="copyDBDriver, copyDevContextFile" description="" />
|
<target name="prepareEnv" depends="copyDBDriver, copyDevContextFile" description="" />
|
||||||
|
|
||||||
<target name="unitTest" depends="install">
|
<target name="unitTest">
|
||||||
<exec executable="${mvn.exec}" failonerror="true">
|
<exec executable="${mvn.exec}" failonerror="true">
|
||||||
<arg value="test" />
|
<arg value="test" />
|
||||||
<arg value="-Dtest=AllUnitTestSuite" />
|
<arg value="-Dtest=AllUnitTestSuite" />
|
||||||
|
@@ -27,17 +27,6 @@
|
|||||||
</testResource>
|
</testResource>
|
||||||
</testResources>
|
</testResources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.alfresco.maven.plugin</groupId>
|
|
||||||
<artifactId>alfresco-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>amp</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<!-- Additional source folder to be added: source/compatibility -->
|
<!-- Additional source folder to be added: source/compatibility -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
@@ -67,27 +56,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<tasks>
|
|
||||||
<delete file="${project.build.outputDirectory}/alfresco/extension/dev-context.xml"/>
|
|
||||||
<move todir="${project.build.directory}/${project.build.finalName}/config/alfresco">
|
|
||||||
<fileset dir="${project.build.outputDirectory}/alfresco"/>
|
|
||||||
</move>
|
|
||||||
<move file="${project.build.directory}/${project.build.finalName}/config/alfresco/module/org_alfresco_module_rm/module.properties"
|
|
||||||
todir="${project.build.directory}/${project.build.finalName}"/>
|
|
||||||
</tasks>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
@@ -186,6 +154,45 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>fullBuild</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.alfresco.maven.plugin</groupId>
|
||||||
|
<artifactId>alfresco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>amp</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<tasks>
|
||||||
|
<delete file="${project.build.outputDirectory}/alfresco/extension/dev-context.xml"/>
|
||||||
|
<move todir="${project.build.directory}/${project.build.finalName}/config/alfresco">
|
||||||
|
<fileset dir="${project.build.outputDirectory}/alfresco"/>
|
||||||
|
</move>
|
||||||
|
<move file="${project.build.directory}/${project.build.finalName}/config/alfresco/module/org_alfresco_module_rm/module.properties"
|
||||||
|
todir="${project.build.directory}/${project.build.finalName}"/>
|
||||||
|
</tasks>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
Reference in New Issue
Block a user