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
 
<https://github.com/jrjsmrtn/macports-ports/blob/update-postgresql-jdbc/java/postgresql-jdbc/Portfile>


Reply via email to