Maven 3.2 local repository and macports user

Chris Jones jonesc at hep.phy.cam.ac.uk
Thu Sep 26 22:09:26 UTC 2019


Hi,

I am not familiar with maven, but presumably it must have a way of changing the default build area to be somewhere other than ~/.m2 ? Assuming this to be so, use this to configure the build to use a directory that is under the port build area work space.

Chris

> On 26 Sep 2019, at 10:56 pm, Georges Martin <jrjsmrtn at gmail.com> wrote:
> 
> 
> Folks,
> 
> I am updating the postgresql-jdbc port to version 42.2.8 [1] and switched to maven 3.2 for building.
> 
> Maven creates a local repository at ~/.m2/repository/. Performing the extract phase then building manually under root or my own user is working fine but the build phase is performed under the macports user, and the creation of the /opt/local/var/macports/home/.m2/repository directory fails:
> 
> --->  Building postgresql-jdbc
> DEBUG: Executing org.macports.build (postgresql-jdbc)
> DEBUG: Environment:
> CC_PRINT_OPTIONS='YES'
> CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_gm_Repositories_MyPorts_java_postgresql-jdbc/postgresql-jdbc/work/.CC_PRINT_OPTIONS'
> CPATH='/opt/local/include'
> DEVELOPER_DIR='/Library/Developer/CommandLineTools'
> JAVA_HOME='/Library/Java/JavaVirtualMachines/openjdk11/Contents/Home'
> LIBRARY_PATH='/opt/local/lib'
> MACOSX_DEPLOYMENT_TARGET='10.14'
> Executing:  cd "/opt/local/var/macports/build/_Users_gm_Repositories_MyPorts_java_postgresql-jdbc/postgresql-jdbc/work/postgresql-jdbc-42.2-8.src" && mvn32 package -DskipTests
> DEBUG: system:  cd "/opt/local/var/macports/build/_Users_gm_Repositories_MyPorts_java_postgresql-jdbc/postgresql-jdbc/work/postgresql-jdbc-42.2-8.src" && mvn32 package -DskipTests
> [ERROR] Could not create local repository at /opt/local/var/macports/home/.m2/repository -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException
> Command failed:  cd "/opt/local/var/macports/build/_Users_gm_Repositories_MyPorts_java_postgresql-jdbc/postgresql-jdbc/work/postgresql-jdbc-42.2-8.src" && mvn32 package -DskipTests
> Exit code: 1
> 
> Any suggestion on how to handle this Maven local repository/macports user issue?
> 
> TIA, 
> 
> Georges
> 
>> [1] https://github.com/jrjsmrtn/macports-ports/blob/update-postgresql-jdbc/java/postgresql-jdbc/Portfile
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190926/303a8b04/attachment.html>


More information about the macports-dev mailing list