From: Martin W. <ama...@us...> - 2006-08-23 21:39:47
|
User: amartinwest Date: 06/08/23 14:39:44 Added: distribution pom.xml .cvsignore distribution/src/antrun copy-2-website.xml copy-m2-m1.xml Log: Add distribution module for copying to maven and web from maven2, needs work Revision Changes Path 1.1 plugins/distribution/pom.xml Index: pom.xml =================================================================== <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.andromda.plugins</groupId> <artifactId>andromda-plugins</artifactId> <version>1.0-SNAPSHOT</version> </parent> <artifactId>andromda-plugin-distribution</artifactId> <packaging>pom</packaging> <name>AndroMDA Plugin Distribution</name> <description>Provides the assembly of the AndroMDA Plugin distribution</description> <dependencies> <!-- Add dependencies here to ensure they're built before the distribution itself --> <dependency> </dependency> </dependencies> <build> <plugins> <!--plugin> <groupId>org.andromda.maven.plugins</groupId> <artifactId>andromda-distribution-plugin</artifactId> <version>${pom.version}</version> <executions> <execution> <id>binary</id> <goals> <goal>assemble</goal> </goals> <configuration> <name>andromda-bin-${pom.version}</name> <artifactDirectory>andromda</artifactDirectory> <dependencyDirectory>lib</dependencyDirectory> <projectIncludes> <include>**/pom.xml</include> </projectIncludes> <projectExcludes> <exclude>distribution/**</exclude> </projectExcludes> <artifactExcludes> <artifact> <groupId>org\.andromda\.samples.*</groupId> </artifact> <artifact> <groupId>org\.andromda\.bootstrap.*</groupId> </artifact> </artifactExcludes> <locations> <location> <path>${pom.basedir}/../samples</path> <excludes> <exlude>conf/**</exlude> <exclude>**/target/**</exclude> <exclude>**/CVS/**</exclude> <exclude>**/.cvsignore</exclude> <exclude>*</exclude> <exclude>**/*.log</exclude> </excludes> <outputPath>samples/</outputPath> </location> <location> <path>${pom.basedir}/../maven/2/andromdapp/target/plugin-install</path> <includes> <include>**/*.xml</include> </includes> <outputPath>andromda/</outputPath> </location> <location> <path>${pom.basedir}/../ant/andromda/src/ant/build.xml.vsl</path> <outputPath>andromda/org/andromda/ant/build.xml</outputPath> </location> </locations> </configuration> </execution> <execution> <id>source</id> <goals> <goal>assemble</goal> </goals> <configuration> <name>andromda-src-${pom.version}</name> <locations> <location> <path>${pom.basedir}/../</path> <excludes> <exclude>**/target/**</exclude> <exclude>**/CVS/**</exclude> <exclude>**/.cvsignore</exclude> <exclude>**/*.log</exclude> </excludes> </location> </locations> </configuration> </execution> </executions> </plugin--> <plugin> <artifactId>maven-antrun-plugin</artifactId> <!-- set property, do something like this in ~/.m2/settings.xml <profiles> <profile> <id>andromda</id> <properties> <maven1Repository>/var/maven/repository</maven1Repository> <websiteDir>/var/www/andromda</websiteDir> </properties> </profile> </profiles> <activeProfiles> <activeProfile>andromda</activeProfile> </activeProfiles> --> <executions> <execution> <phase>install</phase> <configuration> <tasks> <property name="maven1Repository" value="/andromda/maven/repository"/> <property name="websiteDir" value="/var/www/andromda"/> <ant dir="src/antrun" antfile="copy-m2-m1.xml"> <property name="maven1.repository" value="${maven1Repository}"/> <property name="maven2.repository" value="${settings.localRepository}"/> </ant> <ant dir="src/antrun" antfile="copy-2-website.xml"> <property name="website.dir" value="${websiteDir}"/> <property name="maven1.repository" value="${maven1Repository}"/> <property name="maven2.repository" value="${settings.localRepository}"/> <property name="distribution.output.directory" value="${project.build.directory}"/> </ant> <echo message="Copy and install of m2 to m1 artifacts done."/> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> 1.1 plugins/distribution/.cvsignore Index: .cvsignore =================================================================== target 1.1 plugins/distribution/src/antrun/copy-2-website.xml Index: copy-2-website.xml =================================================================== <project name="Copy artifacts to website" default="copy-2-website"> <condition property="repositories.present"> <and> <available file="${maven1.repository}" type="dir"/> <available file="${maven2.repository}" type="dir"/> </and> </condition> <available property="website.present" file="${website.dir}" type="dir"/> <target name="copy-2-website" depends="fail1,fail2,copy"> </target> <target name="fail1" unless="repositories.present"> <echo> ****** copy-2-website ******************************************************* ** maven1.repository (${maven1.repository} and/or ** maven2.repository (${maven2.repository}) not set or does not exist."> ***************************************************************************** </echo> </target> <target name="fail2" unless="website.present"> <echo> ****** copy-2-website ******************************************************* ** website dir (${website.dir} not set or does not exist."> ***************************************************************************** </echo> </target> <!-- Copy maven 2 and maven1 artifacts to website --> <target name="copy" > <echo> Copying M1 artifacts from ${maven1.repository}/andromda to ${website.dir}/maven </echo> <copy todir="${website.dir}/maven" preservelastmodified="true"> <fileset dir="${maven1.repository}/"> <include name="andromda/**/*"/> </fileset> </copy> <echo> Copying M2 artifacts from ${maven2.repository}/org/andromda to ${website.dir}/maven2 </echo> <copy todir="${website.dir}/maven2" preservelastmodified="true"> <fileset dir="${maven2.repository}"> <include name="org/andromda/**/*"/> </fileset> </copy> <copy todir="${website.dir}/maven2/org/andromda/distributions" preservelastmodified="true"> <fileset dir="${distribution.output.directory}"> <include name="*.zip"/> </fileset> </copy> <echo message="Copy Done."/> </target> </project> 1.1 plugins/distribution/src/antrun/copy-m2-m1.xml Index: copy-m2-m1.xml =================================================================== <project name="M2 M1 copy" default="copy-m2-m1"> <condition property="repositories.present"> <and> <available file="${maven1.repository}" type="dir"/> <available file="${maven2.repository}" type="dir"/> </and> </condition> <target name="copy-m2-m1" depends="fail,copy"> </target> <target name="fail" unless="repositories.present"> <echo> ********* copy-m2-m1 ******************************************************** ** maven1.repository (${maven1.repository} and/or ** maven2.repository (${maven2.repository}) not set or does not exist."> ***************************************************************************** </echo> </target> <!-- Copy maven 2 artifacts to maven 1 repository--> <target name="copy" if="repositories.present"> <echo> Copying M2 artifacts from ${maven2.repository}/org/andromda to ${maven1.repository}/andromda </echo> <copy todir="${maven1.repository}/andromda/uml2" flatten="true" preservelastmodified="true"> <fileset dir="${maven2.repository}/org/andromda"> <include name="**/*.uml2"/> </fileset> </copy> <copy todir="${maven1.repository}/andromda/jars" flatten="true" preservelastmodified="true"> <fileset dir="${maven2.repository}/org/andromda"> <include name="**/*.jar"/> </fileset> </copy> <copy todir="${maven1.repository}/andromda/xml.zips" flatten="true" preservelastmodified="true"> <fileset dir="${maven2.repository}/org/andromda/profiles/uml14"> <include name="**/*.xml.zip"/> </fileset> </copy> </target> </project> |