Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517166 - dev-lang/scala-2.11.1 - Unable to resolve artifact: Missing: biz.aQute:bnd:jar:1.50.0
Summary: dev-lang/scala-2.11.1 - Unable to resolve artifact: Missing: biz.aQute:bnd:ja...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-15 15:06 UTC by Christian Strahl
Modified: 2014-10-06 05:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
scala-2.11.1-build.log (scala-2.11.1-build.log,12.81 KB, application/octet-stream)
2014-07-15 15:12 UTC, Christian Strahl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Strahl 2014-07-15 15:06:42 UTC
Build failed on computer behind a firewall.
(see also #501176)

Reproducible: Always
Comment 1 Christian Strahl 2014-07-15 15:12:46 UTC
Created attachment 380758 [details]
scala-2.11.1-build.log
Comment 2 mkaama 2014-09-27 17:44:20 UTC
# emerge -v dev-lang/scala

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ~] dev-lang/scala-2.11.1:0/2.11.1  USE="-binary -doc -emacs -source" 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB


>>> Verifying ebuild manifests
>>> Running pre-merge checks for dev-lang/scala-2.11.1
 * Checking for at least 1532 MiB RAM ...                                                                        [ ok ]

>>> Emerging (1 of 1) dev-lang/scala-2.11.1

[..SKIPPING SEVERAL SCREENS OF LOG..]

init.git:

init:
    [mkdir] Created dir: /var/tmp/portage/dev-lang/scala-2.11.1/work/.m2/repository
[artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.pom from repository central at http://repo1.maven.org/maven2
 * ACCESS DENIED:  mkdir:        /root/.m2
 * ACCESS DENIED:  mkdir:        /root/.m2
[artifact:dependencies] [WARNING] Unable to get resource 'biz.aQute:bnd:pom:1.50.0' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/biz/aQute/bnd/1.50.0
[artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.jar from repository central at http://repo1.maven.org/maven2
 * ACCESS DENIED:  mkdir:        /root/.m2
 * ACCESS DENIED:  mkdir:        /root/.m2
[artifact:dependencies] [WARNING] Unable to get resource 'biz.aQute:bnd:jar:1.50.0' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/biz/aQute/bnd/1.50.0
[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
[artifact:dependencies]  Diagnosis:
[artifact:dependencies]
[artifact:dependencies] Unable to resolve artifact: Missing:
[artifact:dependencies] ----------
[artifact:dependencies] 1) biz.aQute:bnd:jar:1.50.0
[artifact:dependencies]
[artifact:dependencies]   Try downloading the file manually from the project website.
[artifact:dependencies]
[artifact:dependencies]   Then, install it using the command:
[artifact:dependencies]       mvn install:install-file -DgroupId=biz.aQute -DartifactId=bnd -Dversion=1.50.0 -Dpackaging=jar -Dfile=/path/to/file
[artifact:dependencies]
[artifact:dependencies]   Alternatively, if you host your own repository you can deploy the file there:
[artifact:dependencies]       mvn deploy:deploy-file -DgroupId=biz.aQute -DartifactId=bnd -Dversion=1.50.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[artifact:dependencies]
[artifact:dependencies]   Path to dependency:
[artifact:dependencies]         1) org.apache.maven:super-pom:jar:2.0
[artifact:dependencies]         2) biz.aQute:bnd:jar:1.50.0
[artifact:dependencies]
[artifact:dependencies] ----------
[artifact:dependencies] 1 required artifact is missing.
[artifact:dependencies]
[artifact:dependencies] for artifact:
[artifact:dependencies]   org.apache.maven:super-pom:jar:2.0
[artifact:dependencies]
[artifact:dependencies] from the specified remote repositories:
[artifact:dependencies]   central (http://repo1.maven.org/maven2)
[artifact:dependencies]
[artifact:dependencies]

BUILD FAILED
Comment 3 mkaama 2014-09-27 18:14:02 UTC
In Christian's case it is an obvious network malfunction, not a gentoo bug.

In my case it is more puzzling. After merging >200 packages flawlessly, I had to do by hand:

mkdir -p /root/.m2/repository/biz/aQute/bnd/1.50.0
mkdir -p /root/.m2/repository/junit/junit/4.10
mkdir -p /root/.m2/repository/org/hamcrest/hamcrest-core/1.1
mkdir -p /root/.m2/repository/org/hamcrest/hamcrest-parent/1.1
...
chmod -R 777 /root/.m2/
ebuild  /usr/portage/dev-lang/scala/scala-2.11.1.ebuild compile

, because I repeatedly get errors:

init:
[artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.pom from repository central at http://repo1.maven.org/maven2
[artifact:dependencies] Transferring 1K from central
 * ACCESS DENIED:  rename:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp
[artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.jar from repository central at http://repo1.maven.org/maven2
[artifact:dependencies] Transferring 809K from central
 * ACCESS DENIED:  rename:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp
[artifact:dependencies] Downloading: junit/junit/4.10/junit-4.10.pom from repository central at http://repo1.maven.org/maven2
 * ACCESS DENIED:  mkdir:        /root/.m2/repository/junit
 * ACCESS DENIED:  mkdir:        /root/.m2/repository/junit
[artifact:dependencies] [WARNING] Unable to get resource 'junit:junit:pom:4.10' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/junit/junit/4.10
[artifact:dependencies] Downloading: junit/junit/4.10/junit-4.10.jar from repository central at http://repo1.maven.org/maven2
 * ACCESS DENIED:  mkdir:        /root/.m2/repository/junit
 * ACCESS DENIED:  mkdir:        /root/.m2/repository/junit
[artifact:dependencies] [WARNING] Unable to get resource 'junit:junit:jar:4.10' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/junit/junit/4.10

[..]

 * ACCESS DENIED:  remove:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp.sha1.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp.sha1.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp

[..]

 * ACCESS DENIED:  remove:       /root/.m2/repository/junit/junit/4.10/junit-4.10.jar.tmp.sha1.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/junit/junit/4.10/junit-4.10.jar.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp.sha1.tmp
 * ACCESS DENIED:  remove:       /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp
 * ERROR: dev-lang/scala-2.11.1 failed (compile phase):
 *   eant failed
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 4046:  Called eant '-Djavac.args=-encoding UTF-8' '-Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work' 'fastdist-opt'
 *   environment, line  730:  Called die
 * The specific snippet of code:
 *       ant ${antflags} "${@}" || die "eant failed"
 *
 * If you need support, post the output of `emerge --info '=dev-lang/scala-2.11.1'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/scala-2.11.1'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=icedtea-bin-6  CLASSPATH="" JAVA_HOME="/opt/icedtea-bin-6.1.13.3"
JAVACFLAGS="-source 1.6 -target 1.6" COMPILER="javac"
and of course, the output of emerge --info =scala-2.11.1
 * The complete build log is located at '/var/tmp/portage/dev-lang/scala-2.11.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/scala-2.11.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/scala-2.11.1/work/scala-2.11.1'
 * S: '/var/tmp/portage/dev-lang/scala-2.11.1/work/scala-2.11.1'
 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-6001.log"
 *
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: rename
S: deny
P: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp
A: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp
R: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp
C: /opt/icedtea-bin-6.1.13.3/bin/java -classpath /usr/share/ant-core/lib/ant-launcher.jar:/opt/icedtea-bin-6.1.13.3/lib/tools.jar -Dant.home=/usr/share/ant-core -Dant.library.dir=/usr/share/ant-core/lib org.apache.tools.ant.launch.Launcher -cp  -Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore -Dmaven.test.skip=true -Djavac.args=-encoding UTF-8 -Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work fastdist-opt

F: remove
S: deny
P: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp
A: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp
R: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp
C: /opt/icedtea-bin-6.1.13.3/bin/java -classpath /usr/share/ant-core/lib/ant-launcher.jar:/opt/icedtea-bin-6.1.13.3/lib/tools.jar -Dant.home=/usr/share/ant-core -Dant.library.dir=/usr/share/ant-core/lib org.apache.tools.ant.launch.Launcher -cp  -Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore -Dmaven.test.skip=true -Djavac.args=-encoding UTF-8 -Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work fastdist-opt

F: mkdir
S: deny
P: /root/.m2/repository/org
A: /root/.m2/repository/org
R: /root/.m2/repository/org
C: /opt/icedtea-bin-6.1.13.3/bin/java -classpath /usr/share/ant-core/lib/ant-launcher.jar:/opt/icedtea-bin-6.1.13.3/lib/tools.jar -Dant.home=/usr/share/ant-core -Dant.library.dir=/usr/share/ant-core/lib org.apache.tools.ant.launch.Launcher -cp  -Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore -Dmaven.test.skip=true -Djavac.args=-encoding UTF-8 -Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work fastdist-opt
Comment 4 Mark Wright gentoo-dev 2014-10-05 13:54:29 UTC
It affects scala-2.11.2.ebuild as well.

It is difficult to configure the maven ant task to not download stuff into
~/.m2/repository.  I tried to find an easier way, but it seems I need to
edit every artifact.dependencies in the build.xml file.  It seems tedious
to have to come up with a patch for that every time that scala is bumped,
so instead I came up with this sed (which looks even more horrible after
bugzilla inserts line breaks everywhere):

		sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n      <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
			-e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
			-e 's@\(<artifact:dependencies .*>\)@\1\n        <localRepository refid="localrepo" />@g' \
			-i "${S}/build.xml" \
			|| die "Could not change location of .m2 maven download directory in ${S}/build.xml"

I'm running tests with that.
Comment 5 Mark Wright gentoo-dev 2014-10-06 05:53:54 UTC
06 Oct 2014; Mark Wright <gienah@gentoo.org> scala-2.11.1.ebuild,
scala-2.11.2.ebuild:
Bug 517166 - dev-lang/scala-2.11.1 - Unable to resolve artifact: Missing:
biz.aQute:bnd:jar:1.50.0. Thanks to Christian Strahl for reporting, mkaama for
helping. sed the build.xml to add in a localRepository pointing to
$WORKDIR/.m2/repository, and sed all of the artifact:dependencies to configure
them to use this localRepository. The localRepository is provided with the
${P}-maven-deps.tar.gz file.