Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501176 - dev-lang/scala-2.10.3 - ../work/scala-2.10.3/build.xml:175: Unable to resolve artifact: Missing: junit:junit:jar:4.10
Summary: dev-lang/scala-2.10.3 - ../work/scala-2.10.3/build.xml:175: Unable to resolve...
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-02-13 11:57 UTC by Another Mortal
Modified: 2014-10-06 03:28 UTC (History)
0 users

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


Attachments
build.log (build.log,4.01 KB, text/plain)
2014-02-13 11:58 UTC, Another Mortal
Details
scala-2.10.3-build.log (build.log,7.26 KB, text/plain)
2014-03-13 09:04 UTC, Christian Strahl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Another Mortal 2014-02-13 11:57:31 UTC
I got suspicious when dev-lang/scala-2.10.3 built fine on my “open” box,
but failed on the one behind a more restrictive firewall…

The build.log tells the complete story…
I’m not sure why scala cannot just use the _already_installed_ junit package.
This is especially conspicuous considering that the ebuild lists dev-java/junit:4
in both DEPEND and RDEPEND...

Reproducible: Always




'emerge —info’ is not included as it’s totally irrelevant.
I’ll attach the ‘build.log’ right away.
Comment 1 Another Mortal 2014-02-13 11:58:44 UTC
Created attachment 370306 [details]
build.log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-13 14:18:50 UTC
Maybe you had the wrong dev-java/junit installed? The scala ebuild doesn't specify which precise version to use.
Comment 3 Another Mortal 2014-02-14 14:05:54 UTC
Since I have 4.11 installed and the ebuild is trying to fetch 4.10,
your theory sounded plausible; so, I decided to put it to the test. 

I emerged =dev-java/junit-4.10 (which got rid of 4.11 and pulled
in a host of other dependencies, 4.11 didn’t seem to need..)
Then, I proceeded to emerge scala, only to find that -due to junit:4
in [R]DEPEND, junit-4.11 got pulled in again.  That got fixed by —nodeps,
but the ebuild failed at the _exact_same_ place with the _exact_same_ error.

Not good..
Comment 4 Mark Wright gentoo-dev 2014-02-16 10:28:40 UTC
Thanks for reporting. Iff you wanted to please upload a file for me, then I could fix it (maven is downloading different stuff on my machine as it has a pax kernel):

On the machine where it builds ok:

FEATURES=noclean emerge -av =dev-lang/scala-2.10.3
cd /var/tmp/portage/dev-lang/scala-2.10.3/work
tar cvf ~/scala-2.10.3-maven-deps-non-pax.tar
cd ~
gzip scala-2.10.3-maven-deps-non-pax.tar
# clean up the junk now that we have the stuff
rm -rf /var/tmp/portage/dev-lang/scala-2.10.3

Then please upload it somewhere with a pointer to it.
Comment 5 Mark Wright gentoo-dev 2014-02-16 10:32:03 UTC
Sorry I forgot the .me on the end of the tar command, which is important as
otherwise the tar file would be huge, and I only need the .m2 directory:

FEATURES=noclean emerge -av =dev-lang/scala-2.10.3
cd /var/tmp/portage/dev-lang/scala-2.10.3/work
tar cvf ~/scala-2.10.3-maven-deps-non-pax.tar .m2
cd ~
gzip scala-2.10.3-maven-deps-non-pax.tar
# clean up the junk now that we have the stuff
rm -rf /var/tmp/portage/dev-lang/scala-2.10.3
Comment 6 Juergen Rose 2014-02-17 11:01:14 UTC
It seems me, that I have the same error. Downloading junit-4.10.pom fails from a system behind a firewall.

init:
[artifact:dependencies] Downloading: junit/junit/4.10/junit-4.10.pom from repository central at http://repo1.maven.org/maven2
[artifact:dependencies] Error transferring file: Connection timed out
[artifact:dependencies] [WARNING] Unable to get resource 'junit:junit:pom:4.10' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out


 The firewall is open for http, ssh and git. I suppose 'emerge scala' tries an other protocoll. On other systems, which are not behind a firewall, 'emerge scala' works. And I also have junit-4.11 installed.

root@leopard:/root(17)# qlist -Iv junit
dev-java/ant-junit-1.9.2
dev-java/junit-3.8.2-r1
dev-java/junit-4.11

Can't scala work with  unit-4.11?
Comment 7 Mark Wright gentoo-dev 2014-02-18 00:39:13 UTC
(In reply to Juergen Rose from comment #6)
> It seems me, that I have the same error. Downloading junit-4.10.pom fails
> from a system behind a firewall.

I could try to fix it if you could please, "On other systems, which are not behind a firewall":

FEATURES=noclean emerge -av =dev-lang/scala-2.10.3
cd /var/tmp/portage/dev-lang/scala-2.10.3/work
tar cvf ~/scala-2.10.3-maven-deps-non-pax.tar .m2
cd ~
gzip scala-2.10.3-maven-deps-non-pax.tar
# clean up the junk now that we have the stuff
rm -rf /var/tmp/portage/dev-lang/scala-2.10.3

Then please upload it somewhere with a pointer to it.

The scala build wants to download some maven junk into the
/var/tmp/portage/dev-lang/scala-2.10.3/work/.m2 directory (or maybe into
/root/.m2). So to try to stop it doing that, I tar up this junk into some
files included in the SRC_URI.  But the junk appears to be different on
my box which has a pax kernel, which is the only system I have.
Comment 8 Another Mortal 2014-02-18 10:52:44 UTC
Personally, I don’t think that the tarball approach is the right solution;
especially, if one needs different tarballs depending on system configuration.

If what’s being downloaded is “junk”, then I’d much prefer to streamline
the build process; so, that junk isn’t downloaded even on systems that don’t
have connectivity restrictions.  Go green!  (-;
Comment 9 Juergen Rose 2014-02-21 19:58:18 UTC
Hi Mark,

(In reply to Mark Wright from comment #7)
> (In reply to Juergen Rose from comment #6)
> > It seems me, that I have the same error. Downloading junit-4.10.pom fails
> > from a system behind a firewall.
> 
> I could try to fix it if you could please, "On other systems, which are not
> behind a firewall":
> 
> FEATURES=noclean emerge -av =dev-lang/scala-2.10.3
> cd /var/tmp/portage/dev-lang/scala-2.10.3/work
> tar cvf ~/scala-2.10.3-maven-deps-non-pax.tar .m2
> cd ~
> gzip scala-2.10.3-maven-deps-non-pax.tar
> # clean up the junk now that we have the stuff
> rm -rf /var/tmp/portage/dev-lang/scala-2.10.3
> 
> Then please upload it somewhere with a pointer to it.
> 
> The scala build wants to download some maven junk into the
> /var/tmp/portage/dev-lang/scala-2.10.3/work/.m2 directory (or maybe into
> /root/.m2). So to try to stop it doing that, I tar up this junk into some
> files included in the SRC_URI.  But the junk appears to be different on
> my box which has a pax kernel, which is the only system I have.

you can access the file at

http://141.89.194.24/~rose/scala-2.10.3-maven-deps-non-pax.tar.gz

Regards
Comment 10 Christian Strahl 2014-03-13 09:00:56 UTC
I have the same problem here.
Comment 11 Christian Strahl 2014-03-13 09:04:31 UTC
Created attachment 372546 [details]
scala-2.10.3-build.log

Here is another build log. May be it helps...
Comment 12 Christian Strahl 2014-07-08 10:26:33 UTC
This problem also occurs in version 2.10.4.

Scala-2.10.2-r1 is still the last Version usable behind a firewall.
Comment 13 Mark Wright gentoo-dev 2014-10-06 03:28:56 UTC
06 Oct 2014; Mark Wright <gienah@gentoo.org>
-files/scala-2.10.3-maven-deps.patch, scala-2.10.3.ebuild,
scala-2.10.4.ebuild:
Fix Bug 501176 - dev-lang/scala-2.10.3 - ../work/scala-2.10.3/build.xml:175:
Unable to resolve artifact: Missing: junit:junit:jar:4.10. Thanks to Another
Mortal for testing, Juergen Rose and Christian Strahl for helping. I replaced
the scala-2.10.3-maven-deps.patch with the sed I created as part of the fix
for bug 501176 and bug 517166. For scala-2.10.3 the scala-2.10.3-maven-
deps.tar.gz was missing more stuff that was downloaded from maven central
during the build, added these additional files to scala-2.10.3-maven-
deps-2.tar.gz. For scala-2.10.4, I added the sed and
scala-2.10.4-maven.deps.tar.gz. I have not tested behind a firewall, but I do
not see any downloads during the build.