Scan mavenRequiredVersion

Issue #1 resolved
mjensenbitbucket-bot repo owner created an issue

If the local pom.xml has a maven enforcer plugin with a mavenRequiredVersion set, use this to select a maven version.

Comments (4)

  1. mjensenbitbucket-bot reporter

    I don't like the idea of trying to guess the maven version from the enforcer plugin details. The enforcer could be set in a parent pom, it may not be available, it may not be accurate, it may infer a range which we will need to resolve, etc.

  2. Caspar Krieger Account Deactivated

    Indeed, it could be horribly wrong, but that's what the MVNVM output is for right? You'd spot that it's wrong. Adding support for this will automatically add support for a bunch of different projects, without having to convince them to add and keep up to date a mvnvm.properties file.

    You can always make an existing mvnvm.properties override whatever would be picked up from the pom.

  3. Andrew S

    When running mvn -version in a directory with no POM, I get this:

    aswan:~ aswan$ mvn -version
    -:8:in `initialize': No such file or directory - pom.xml (Errno::ENOENT)
        from -:8:in `new'
        from -:8:in `<main>'
    [MVNVM] Using maven: 3.0.5
    Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-20 00:51:28+1100)
    Maven home: /Users/aswan/.mvnvm/apache-maven-3.0.5
    Java version: 1.6.0_65, vendor: Apple Inc.
    Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    Default locale: en_US, platform encoding: MacRoman
    OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac"
    

    Is mvnvm assuming the existence of a POM in the current directory?

  4. Log in to comment