# $Id$

PortSystem          1.0

name                maven-ant-tasks
version             2.1.3
categories          devel java
maintainers         nomaintainer
license             Apache-2
description         Use many of Maven's artifact handling features from Ant.
long_description    ${description}
homepage            http://maven.apache.org/ant-tasks/
platforms           darwin
depends_build       port:maven2

use_zip             yes
master_sites        http://www.apache.org/dist/maven/source/
extract.suffix      -src${extract.suffix}
checksums           md5     ae62c0c7f811f3f7fc60ad91a8b0b822 \
                    rmd160  21f093f0115f81c5530145fe52c6094c606d2ddf \
                    sha256  3b838f089adff04f59e54d3e453d4d9e364d927fd258e53fa029388f3abd71b4

use_configure       no

build.env-append    HOME=${workpath}/home
build.cmd           mvn2
build.target        package

destroot {
    set jarfile ${name}.jar
    set jardir ${destroot}${prefix}/share/java

    move ${worksrcpath}/target/${name}-${version}.jar \
        ${worksrcpath}/target/${jarfile}

    xinstall -m 0755 -d ${jardir}
    xinstall -m 0644 ${worksrcpath}/target/${jarfile} ${jardir}
}

livecheck.type      regex
livecheck.url       ${homepage}download.html
livecheck.regex     ${name}-(2\\.\[0-9.\]+).jar