Fixing distribution pom

revert-dabc3590
Geeth Munasinghe 10 years ago
parent 60eb7a7a77
commit cde8456f8d

@ -3,270 +3,259 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>
<artifactId>wso2cdm-parent</artifactId> <artifactId>wso2cdm-parent</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>wso2emm</artifactId> <artifactId>wso2emm</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>WSO2 Connected Device Manager (CDM) - Distribution</name> <name>WSO2 Connected Device Manager (CDM) - Distribution</name>
<description>WSO2 Connected Device Manager (CDM) Distribution</description> <description>WSO2 Connected Device Manager (CDM) Distribution</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.shindig</groupId> <groupId>org.apache.shindig</groupId>
<artifactId>shindig-server</artifactId> <artifactId>shindig-server</artifactId>
<version>2.5.0-beta5</version> <version>2.5.0-beta5</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.el</groupId> <groupId>javax.el</groupId>
<artifactId>el-api</artifactId> <artifactId>el-api</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId> <artifactId>buildnumber-maven-plugin</artifactId>
<version>${maven-buildnumber-plugin.version}</version> <version>${maven-buildnumber-plugin.version}</version>
<configuration> <configuration>
<format>{0,date,dd MMM yyyy}</format> <format>{0,date,dd MMM yyyy}</format>
<items> <items>
<item>timestamp</item> <item>timestamp</item>
</items> </items>
<doCheck>false</doCheck> <doCheck>false</doCheck>
<doUpdate>false</doUpdate> <doUpdate>false</doUpdate>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<phase>validate</phase> <phase>validate</phase>
<goals> <goals>
<goal>create</goal> <goal>create</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<!--<version>${maven-dependency-plugin.version}</version>--> <!--<version>${maven-dependency-plugin.version}</version>-->
<inherited>false</inherited> <inherited>false</inherited>
<executions> <executions>
<execution> <execution>
<id>2-unpack-wso2carbon</id> <id>2-unpack-wso2carbon</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>unpack</goal> <goal>unpack</goal>
</goals> </goals>
<configuration> <configuration>
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>
<artifactId>wso2carbon-core</artifactId> <artifactId>wso2carbon-core</artifactId>
<version>${carbon.kernal.version}</version> <version>${carbon.kernal.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<outputDirectory>target</outputDirectory> <outputDirectory>target</outputDirectory>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.apache.shindig</groupId> <groupId>org.apache.shindig</groupId>
<artifactId>shindig-server</artifactId> <artifactId>shindig-server</artifactId>
<version>2.5.0-beta5</version> <version>2.5.0-beta5</version>
<type>war</type> <type>war</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<outputDirectory>target/shindig</outputDirectory> <outputDirectory>target/shindig</outputDirectory>
</artifactItem> </artifactItem>
</artifactItems> </artifactItems>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<!--<version>${maven-antrun-plugin.version}</version>--> <!--<version>${maven-antrun-plugin.version}</version>-->
<executions> <executions>
<execution> <execution>
<id>3-extract-docs-from-components</id> <id>3-extract-docs-from-components</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>run</goal> <goal>run</goal>
</goals> </goals>
<configuration> <configuration>
<tasks> <tasks>
<property name="tempdir" value="target/docs-temp"/> <property name="tempdir" value="target/docs-temp"/>
<property name="jardir" value="target/jars"/> <property name="jardir" value="target/jars"/>
<property name="shindig.version" value="2.5.0-beta5"/> <property name="shindig.version" value="2.5.0-beta5"/>
<mkdir dir="${tempdir}"/> <mkdir dir="${tempdir}"/>
<mkdir dir="${tempdir}/wso2emm-${project.version}/repository/components"/> <mkdir dir="${tempdir}/wso2emm-${project.version}/repository/components"/>
<unzip dest="${tempdir}"> <unzip dest="${tempdir}">
<fileset dir="target"> <fileset dir="target">
<include name="wso2emm-${project.version}.zip"/> <include name="wso2emm-${project.version}.zip"/>
</fileset> </fileset>
</unzip> </unzip>
<copy todir="target/wso2carbon-core-${carbon.kernal.version}/repository/components" <copy todir="target/wso2carbon-core-${carbon.kernal.version}/repository/components"
overwrite="true"> overwrite="true">
<fileset dir="${tempdir}/wso2emm-${project.version}/repository/components"></fileset> <fileset
</copy> dir="${tempdir}/wso2emm-${project.version}/repository/components"></fileset>
<!--testing --> </copy>
<unzip src="target/shindig/WEB-INF/lib/shindig-common-${shindig.version}.jar" <!--testing -->
dest="${jardir}/shindig-common-${shindig.version}"> <unzip src="target/shindig/WEB-INF/lib/shindig-common-${shindig.version}.jar"
<patternset> dest="${jardir}/shindig-common-${shindig.version}">
<exclude name="**/shindig.properties"/> <patternset>
</patternset> <exclude name="**/shindig.properties"/>
</unzip> </patternset>
<copy file="src/repository/conf/shindig.properties" </unzip>
todir="${jardir}/shindig-common-${shindig.version}"/> <copy file="src/repository/conf/shindig.properties"
<delete file="target/shindig/WEB-INF/lib/shindig-common-${shindig.version}.jar"/> todir="${jardir}/shindig-common-${shindig.version}"/>
<zip destfile="target/shindig/WEB-INF/lib/shindig-common-${shindig.version}.jar" <delete file="target/shindig/WEB-INF/lib/shindig-common-${shindig.version}.jar"/>
basedir="${jardir}/shindig-common-${shindig.version}"/> <zip destfile="target/shindig/WEB-INF/lib/shindig-common-${shindig.version}.jar"
<delete> basedir="${jardir}/shindig-common-${shindig.version}"/>
<fileset dir="target/shindig/WEB-INF/lib" includes="slf4j*"/> <delete>
</delete> <fileset dir="target/shindig/WEB-INF/lib" includes="slf4j*"/>
<copy file="src/repository/resources/shindig/index.jsp" </delete>
todir="target/shindig"/> <copy file="src/repository/resources/shindig/index.jsp"
todir="target/shindig"/>
<!-- <concat destfile="target/wso2carbon-core-${carbon.kernal.version}/repository/log4j.properties">
<zip destfile="target/ROOT.war" og4j.logger.net.sf.ehcache=ERROR
basedir="target/shindig" /> </concat>
-->
<concat destfile="target/wso2carbon-core-${carbon.kernal.version}/repository/log4j.properties"> <delete file="target/wso2emm-${project.version}.zip"/>
og4j.logger.net.sf.ehcache=ERROR <delete dir="${tempdir}"/>
</concat> </tasks>
</configuration>
</execution>
<execution>
<id>copy_modules_apps</id>
<phase>package</phase>
<configuration>
<tasks>
<copy todir="target/wso2carbon-core-${carbon.kernal.version}/modules"
overwrite="true">
<fileset dir="src/repository/modules"></fileset>
</copy>
<copy todir="target/wso2carbon-core-${carbon.kernal.version}/repository/deployment/server/jaggeryapps"
overwrite="true">
<fileset dir="../apps"></fileset>
</copy>
<delete file="target/wso2emm-${project.version}.zip"/> <copy todir="target/wso2carbon-core-${carbon.kernal.version}/repository/components/plugins"
<delete dir="${tempdir}"/> overwrite="true">
</tasks> <fileset dir="src/repository/components/patches/apimgt"></fileset>
</configuration> </copy>
</execution>
<execution>
<id>copy_modules_apps</id>
<phase>package</phase>
<configuration>
<tasks>
<copy todir="target/wso2carbon-core-${carbon.kernal.version}/modules"
overwrite="true">
<fileset dir="src/repository/modules"></fileset>
</copy>
<!-- -->
<copy todir="target/wso2carbon-core-${carbon.kernal.version}/repository/deployment/server/jaggeryapps"
overwrite="true">
<fileset dir="../apps"></fileset>
</copy>
<!-- -->
<copy todir="target/wso2carbon-core-${carbon.kernal.version}/repository/components/patches/patch0001"
overwrite="true">
<fileset dir="src/repository/plugins"></fileset>
</copy>
<copy todir="target/wso2carbon-core-${carbon.kernal.version}/repository/components/plugins" </tasks>
overwrite="true"> </configuration>
<fileset dir="src/repository/components/patches/apimgt"></fileset> <goals>
</copy> <goal>run</goal>
</goals>
</execution>
<execution>
<id>clean_target</id>
<phase>install</phase>
<configuration>
<tasks>
<delete dir="target/jars"/>
<delete dir="target/*.xml"/>
<delete dir="target/archive-tmp"/>
<delete dir="target/dependency-maven-plugin-markers"/>
<delete dir="target/maven-archiver"/>
<delete dir="target/wso2carbon-core-${carbon.kernal.version}"/>
<delete file="target/wso2emm-${project.version}.jar"/>
<delete dir="target/sources"/>
<delete dir="target/site"/>
<delete dir="target/antrun"/>
<delete dir="src/site"/>
<delete dir="target/shindig"/>
<delete dir="target/jaxwebapps"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</tasks> <plugin>
</configuration> <groupId>org.apache.maven.plugins</groupId>
<goals> <artifactId>maven-assembly-plugin</artifactId>
<goal>run</goal> <executions>
</goals> <execution>
</execution> <id>1-pre-dist</id>
<execution> <phase>test</phase>
<id>clean_target</id> <!--we are creating a temporary carbon distribution for document extracting purposes during the test phase-->
<phase>install</phase> <goals>
<configuration> <goal>attached</goal>
<tasks> </goals>
<delete dir="target/jars"/> <configuration>
<delete dir="target/*.xml"/> <filters>
<delete dir="target/archive-tmp"/> <filter>${basedir}/src/assembly/filter.properties</filter>
<delete dir="target/dependency-maven-plugin-markers"/> </filters>
<delete dir="target/maven-archiver"/> <descriptors>
<delete dir="target/wso2carbon-core-${carbon.kernal.version}"/> <descriptor>${basedir}/src/assembly/dist.xml</descriptor>
<delete file="target/wso2emm-${project.version}.jar"/> </descriptors>
<delete dir="target/sources"/> </configuration>
<delete dir="target/site"/> </execution>
<delete dir="target/antrun"/>
<delete dir="src/site"/>
<delete dir="target/shindig"/>
<delete dir="target/jaxwebapps"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <execution>
<groupId>org.apache.maven.plugins</groupId> <id>2-dist</id>
<artifactId>maven-assembly-plugin</artifactId> <phase>package</phase>
<executions> <goals>
<execution> <goal>attached</goal>
<id>1-pre-dist</id> </goals>
<phase>test</phase> <configuration>
<!--we are creating a temporary carbon distribution for document extracting purposes during the test phase--> <filters>
<goals> <filter>${basedir}/src/assembly/filter.properties</filter>
<goal>attached</goal> </filters>
</goals> <descriptors>
<configuration> <descriptor>${basedir}/src/assembly/bin.xml</descriptor>
<filters> <!--
<filter>${basedir}/src/assembly/filter.properties</filter> <descriptor>${basedir}/src/assembly/docs.xml</descriptor>
</filters> -->
<descriptors> </descriptors>
<descriptor>${basedir}/src/assembly/dist.xml</descriptor> </configuration>
</descriptors> </execution>
</configuration> </executions>
</execution> </plugin>
<execution> <plugin>
<id>2-dist</id> <groupId>org.apache.maven.plugins</groupId>
<phase>package</phase> <artifactId>maven-clean-plugin</artifactId>
<goals> <executions>
<goal>attached</goal> <execution>
</goals> <id>auto-clean</id>
<configuration> <phase>initialize</phase>
<filters> <goals>
<filter>${basedir}/src/assembly/filter.properties</filter> <goal>clean</goal>
</filters> </goals>
<descriptors> </execution>
<descriptor>${basedir}/src/assembly/bin.xml</descriptor> </executions>
<!-- </plugin>
<descriptor>${basedir}/src/assembly/docs.xml</descriptor> </plugins>
--> </build>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

Loading…
Cancel
Save