Changeset 126850 for trunk/dports/java


Ignore:
Timestamp:
Oct 16, 2014, 8:51:27 AM (6 years ago)
Author:
easieste@…
Message:

Obsolete 'java/maven-devel' in favor of 'java/maven3'.

Add 'java/maven31' for users that still need a maven-3.1.x version, as
maven-3.2.x still has problems with some older tools.

'maven31' unlike 'maven-devel' now works with maven_select correctly.

Location:
trunk/dports/java
Files:
4 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/java/maven-devel/Portfile

    r112879 r126850  
    22# $Id$
    33
    4 PortSystem 1.0
    5 PortGroup select 1.0
     4PortSystem       1.0
    65
    76name            maven-devel
    87version         3.1.1
     8revision        2
     9
     10replaced_by     maven3
    911
    1012categories      java devel
     
    3133homepage        http://maven.apache.org/
    3234
    33 master_sites    apache:maven/maven-3/${version}/binaries
    34 distname        apache-maven-${version}-bin
    35 worksrcdir      apache-maven-${version}
     35distfiles
    3636
    37 checksums           md5     6342fdf6b0aabc1457c7f8cc218127ed \
    38                     sha1    630eea2107b0742acb315b214009ba08602dda5f \
    39                     sha256  077ed466455991d5abb4748a1d022e2d2a54dc4d557c723ecbacdc857c61d51b
     37livecheck.type  none
    4038
    41 depends_run     port:maven_select
    42 
    43 use_configure     no
    44 # hmm? 
    45 universal_variant no
    46 
    47 select.group    maven
    48 select.file     ${filespath}/maven3
    49 
    50 # Source builds of maven are not possible. So, the default build is a binary
    51 # install of the jars.
    52 build {
     39pre-configure {
     40    ui_error "Please do not install this port since it has been replaced by 'maven3'.\n
     41If you wish to install a version of maven-3.1.1 please use the java/maven31 port."
     42    return -code error
    5343}
    54 
    55 destroot {
    56     set maven_dir    apache-maven-${version}
    57     set maven_path   ${destroot}${prefix}/share/java/${maven_dir}
    58 
    59     # Create the target java directory exists
    60     xinstall -m 755 -d ${maven_path}
    61 
    62     # Copy over the needed elements of our directory tree
    63     file copy \
    64         ${worksrcpath}/bin \
    65         ${worksrcpath}/boot \
    66         ${worksrcpath}/conf \
    67         ${worksrcpath}/lib \
    68         ${maven_path}
    69 
    70     # Remove extraneous bat files
    71     foreach f [glob -directory ${maven_path}/bin *.bat] {
    72         file delete $f
    73     }
    74 
    75     # Fix permissions on shell scripts
    76     foreach f { maven install_repo.sh } {
    77         if [file exists ${maven_path}/bin/$f] {
    78             file attributes ${maven_path}/bin/$f -permissions +x
    79         }
    80     }
    81 
    82     # Reduce the permissions on the distribution files.
    83     file attributes ${maven_path}/conf -permissions 0755
    84     file attributes ${maven_path}/conf/settings.xml -permissions 0644
    85     foreach f [glob -directory ${maven_path}/boot *.jar] {
    86         file attributes $f -permissions 0644
    87     }
    88     foreach f [glob -directory ${maven_path}/lib *.jar] {
    89         file attributes $f -permissions 0644
    90     }
    91 
    92     # Symlink maven into the bin directory
    93     ln -s ${prefix}/share/java/${maven_dir}/bin/mvn ${prefix}/bin/mvn3
    94 }
    95 
    96 notes \
    97 "To make maven $version the default, please run
    98 \tsudo port select --set ${select.group} $name"
    99 
    100 livecheck.type  regex
    101 livecheck.url   ${homepage}download.html
    102 livecheck.regex apache-maven-(3\\.\[0-9.\]+)-bin\\.tar
Note: See TracChangeset for help on using the changeset viewer.