blob: 32e8a44e0cd7466c0624c72a5ae6502dac165272 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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.apache.flex.pmd</groupId>
<artifactId>flex-pmd-java</artifactId>
<version>1.3-SNAPSHOT</version>
</parent>
<artifactId>flex-pmd-cpd-command-line</artifactId>
<packaging>jar</packaging>
<name>Adobe Flex CPD Command line</name>
<properties>
<maven.jar.plugin.version>2.2</maven.jar.plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>com.martiansoftware</groupId>
<artifactId>jsap</artifactId>
<version>${jsap.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<artifactId>flex-pmd-command-line-api</artifactId>
</dependency>
<dependency>
<groupId>pmd</groupId>
<artifactId>pmd</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<version>${project.parent.version}</version>
<artifactId>flex-pmd-cpd</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<artifactId>flex-pmd-files</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>as3-plugin-utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>as3-parser</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>as3-parser-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>flex-pmd-test-resources</artifactId>
<version>${project.parent.version}</version>
<classifier>resources</classifier>
<type>zip</type>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>${project.build.directory}/test/generated-resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-test-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>${project.groupId}</includeGroupIds>
<includes>**/*.as,**/*.mxml</includes>
<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
<configuration>
<archive>
<manifest>
<mainClass>com.adobe.ac.cpd.commandline.FlexCPD</mainClass>
<packageName>com.adobe.ac.cpd.commandline</packageName>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
<executions>
<execution>
<id>package-ant-task</id>
<phase>install</phase>
<configuration>
<tasks>
<echo message="Building ant-task"/>
<mkdir dir="${project.build.directory}/release"/>
<echo message=""/>
<echo message="Copying Flex CPD dependencies..."/>
<copy file="${project.build.directory}/${project.build.finalName}.jar"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${org.apache.flex.pmd:flex-pmd-command-line-api:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${org.apache.flex.pmd:as3-parser-api:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${org.apache.flex.pmd:as3-parser:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${org.apache.flex.pmd:flex-pmd-cpd:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${org.apache.flex.pmd:flex-pmd-files:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${org.apache.flex.pmd:as3-plugin-utils:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<echo message="Copying Command line dependencies..."/>
<copy file="${pmd:pmd:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${commons-lang:commons-lang:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${com.martiansoftware:jsap:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<echo message="Extracting license..."/>
<copy file="../../src/etc/header.txt"
tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true"/>
<echo message="Compressing zip..."/>
<zip destfile="${project.build.directory}/${project.build.finalName}.zip"
basedir="${project.build.directory}/release" excludes="*.zip"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>