Opened 10 years ago
Last modified 10 years ago
#45005 new defect
cassandra fails to build
Reported by: | coditect (Nicholas Rawlings) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.1 |
Keywords: | Cc: | petrrr | |
Port: | cassandra |
Description
Cassandra (both version 1.2.3 that is currently in MacPorts, and version 2.1.0 that I submitted in #45004) fails to build because the destination folders for eight of the Maven artifacts cannot be created. For example:
:info:build [artifact:dependencies] [WARNING] Unable to get resource 'commons-logging:commons-logging:jar:1.1.1' from repository apache (https://repository.apache.org/content/repositories/releases): Specified destination directory cannot be created: /opt/local/var/macports/home/.m2/repository/commons-logging/commons-logging/1.1.1
The folder /opt/local/var/macports/home
already existed on my system, but /opt/local/var/macports/home/.m2
did not. I found that by manually creating /opt/local/var/macports/home/.m2
and setting its mode to 0777, the build would succeed without any further issues. Perhaps some component of the build process is not running with the proper permissions?
Full log file attached.
Attachments (1)
Change History (4)
Changed 10 years ago by coditect (Nicholas Rawlings)
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 10 years ago by neverline@…
Had the same issue, it seams that maven uses ${user.home} java variable which is set by java itself and it doesn't honor env vars at least as of latest v8 from oracle website, to workaround this I used
build.env-append _JAVA_OPTIONS=-Duser.home=${workpath}/home
The home directory should be the .home subdirectory of the work directory, to which ports are allowed to write. I'm not sure why in your situation here the home directory is being seen as /opt/local/var/macports/home instead. Regardless, anything any port is attempting to do to a home directory is likely irrelevant, as in the normal situation it's a temporary directory deleted after the build finishes. As such, the build could be changed to not do whatever it's doing to home, since it won't survive the install anyway.