blob: bb553333c353115f5f6d68f54040c025ce8e9ab3 [file] [log] [blame]
<!--
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-ant-task</artifactId>
<packaging>jar</packaging>
<name>Adobe Flex CPD Ant task</name>
<dependencies>
<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>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${ant.version}</version>
</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>${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>
<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 PMD 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-cpd:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${pmd:pmd:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<echo message="Copying Ant dependencies..."/>
<copy file="${org.apache.flex.pmd:flex-pmd-files: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:as3-parser-api:jar}"
todir="${project.build.directory}/release" overwrite="true"/>
<copy file="${org.apache.ant:ant: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="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>