source: trunk/dports/java/maven3/Portfile

Last change on this file was 142900, checked in by blair@…, 13 months ago

maven3: upgrade to 3.3.9; closes #49813.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 142900 2015-11-26 20:56:10Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup select 1.0
6
7name            maven3
8version         3.3.9
9
10categories      java devel
11license         Apache-2
12maintainers     blair kickstyle.net:gk5885
13platforms       darwin
14supported_archs noarch
15
16description     A java-based build and project management environment.
17long_description \
18                Maven is a Java project management and project \
19                comprehension tool.  Maven is based on the \
20                concept of a project object model (POM) in that \
21                all the artifacts produced by Maven are a result \
22                of consulting a well defined model for your \
23                project.Builds, documentation, source metrics, \
24                and source cross-references are all controlled by \
25                your POM.  Maven 3 aims to ensure backward \
26                compatibility with Maven 2, improve usability, \
27                increase performance, allow safe embedding, and \
28                pave the way to implement many highly demanded \
29                features.
30
31homepage        http://maven.apache.org/
32
33master_sites    apache:maven/maven-3/${version}/binaries
34distname        apache-maven-${version}-bin
35worksrcdir      apache-maven-${version}
36
37checksums       rmd160 20634fcdc2393c0c8930d94d6c755a040890a858 \
38                sha256 6e3e9c949ab4695a204f74038717aa7b2689b1be94875899ac1b3fe42800ff82
39
40depends_run     port:maven_select \
41                bin:java:kaffe
42
43use_configure   no
44
45select.group    maven
46select.file     ${filespath}/${name}
47
48# Source builds of maven are not possible. So, the default build is a binary
49# install of the jars.
50build {
51}
52
53destroot {
54    set mavendir ${destroot}${prefix}/share/java/${name}
55
56    # Create the target java directory exists
57    xinstall -m 755 -d ${mavendir}
58
59    # Copy over the needed elements of our directory tree
60    file copy \
61        ${worksrcpath}/bin \
62        ${worksrcpath}/boot \
63        ${worksrcpath}/conf \
64        ${worksrcpath}/lib \
65        ${mavendir}
66
67    # Reduce the permissions on the distribution files.
68    file attributes ${mavendir}/conf -permissions 0755
69    file attributes ${mavendir}/conf/settings.xml -permissions 0644
70    foreach f [glob -directory ${mavendir}/boot *.jar] {
71        file attributes $f -permissions 0644
72    }
73    foreach f [glob -directory ${mavendir}/lib *.jar] {
74        file attributes $f -permissions 0644
75    }
76
77    # Symlink maven into the bin directory
78    ln -s ../share/java/${name}/bin/mvn ${destroot}${prefix}/bin/mvn3
79}
80
81# Delete this pre-activate section after 2016-03-18, after which it
82# will have existed for a year to clean up cruft on people's systems.
83pre-activate {
84    # Remove stray files due to a destroot bug that has since been
85    # fixed.
86    foreach file {bin/mvn3} {
87        set filepath ${prefix}/${file}
88        if {![catch {file type ${filepath}}] && [registry_file_registered ${filepath}] == "0"} {
89            delete ${filepath}
90        }
91    }
92}
93
94notes \
95"To make maven $version the default, please run
96\tsudo port select --set ${select.group} $name"
97
98livecheck.type  regex
99livecheck.url   ${homepage}docs/history.html
100livecheck.regex >(3\\.\[0-9.\]+\\.\[0-9.\]+)</
Note: See TracBrowser for help on using the repository browser.