I have been successfully building DSpace 6.3 in Docker for about 4 months. Today I came across a build error for which no amount of Googling seems to help.
#9 43.60 [INFO] ------------------------------------------------------------------------
#9 43.60 [INFO] Reactor Summary for DSpace Assembly and Configuration 6.3:
#9 43.60 [INFO]
#9 43.60 [INFO] DSpace Addon Modules ............................... SUCCESS [ 0.673 s]
#9 43.60 [INFO] UTS Library DSpace copyright ....................... SUCCESS [ 3.754 s]
#9 43.60 [INFO] DSpace Kernel :: Additions and Local Customizations SUCCESS [ 1.287 s]
#9 43.60 [INFO] UTS Library DSpace taglib .......................... SUCCESS [ 0.239 s]
#9 43.60 [INFO] DSpace JSP-UI :: Local Customizations .............. SUCCESS [ 10.128 s]
#9 43.61 [INFO] DSpace REST :: Local Customizations ................ SUCCESS [ 7.058 s]
#9 43.61 [INFO] DSpace SWORD v2 :: Local Customizations ............ SUCCESS [ 17.577 s]
#9 43.61 [INFO] Apache Solr Webapp ................................. FAILURE [ 0.214 s]
#9 43.61 [INFO] DSpace OAI-PMH :: Local Customizations ............. SKIPPED
#9 43.61 [INFO] DSpace Assembly and Configuration .................. SKIPPED
#9 43.61 [INFO] ------------------------------------------------------------------------
#9 43.61 [INFO] BUILD FAILURE
#9 43.61 [INFO] ------------------------------------------------------------------------
#9 43.61 [INFO] Total time: 41.269 s
#9 43.61 [INFO] Finished at: 2021-04-06T02:47:50Z
#9 43.61 [INFO] ------------------------------------------------------------------------
#9 43.61 [ERROR] Failed to execute goal on project dspace-solr: Could not resolve dependencies for
project org.dspace:dspace-solr:war:6.3: Failed to collect dependencies at org.apache.solr:solr-
core:jar:4.10.4 -> org.restlet.jee:org.restlet:jar:2.1.1: Failed to read artifact descriptor for
org.restlet.jee:org.restlet:jar:2.1.1: Could not transfer artifact org.restlet.jee:org.restlet:pom:2.1.1
from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [maven-snapshots
(http://oss.sonatype.org/content/repositories/snapshots, default, snapshots), maven-restlet
(http://maven.restlet.org, default, releases+snapshots), apache.snapshots
(http://repository.apache.org/snapshots, default, disabled)] -> [Help 1]
#9 43.61 [ERROR]
As the error message says org.restlet.jee is a dependency of org.apache.solr.core-services solr-core-4.10.4.jar and is listed in that jar's pom file. Which seems to be the only reference to it in the maven cascade of pom files as far as I can tell.
I have not come across this "Blocked mirror for repositories" error before and a google of "maven "Blocked mirror for repositories"" is particularly unhelpful. Presumably, the repository that this dependency is registered for has somehow got itself onto a blacklist.
I tried adding the dependency manually to the DSpace Solr pom.xml file, but this doesn't work. Does anyone know a workaround or is it a matter of making a request to Apache Solr team to fix it?
Maven version 3.81 released last week no longer accepts http:// repositories, only https:// - https://www.reddit.com/r/java/comments/mk462r/apache_maven_version_381_released/ .
The part of the error message:
Could not transfer artifact org.restlet.jee:org.restlet:pom:2.1.1
from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories
means that 0.0.0.0 (i.e. all IPs) are blocked for http. The message is a bit cryptic. You'd think the programmers could have given something a little more helpful.
The Docker image we were using to build was maven:3-jdk-8 which was updated to Maven 3.81 a few days ago. So, as soon as Docker updated its image we were no longer able to access http:// repositories. We changed our Maven Docker image to the previous version - 3.6-jdk-8 - and DSpace 6.3 builds fine.
There is no doubt a way to override the default behavior in Maven 3.81 but we are fine with using the older version for now.
This may be a temporary issue, if the old Restlet repository is down/unavailable temporarily.
However, another possible workaround is to add this temporarily to the main POM [src]/pom.xml in the <repositories> tag:
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>https://maven.restlet.com</url>
</repository>
We ran into this a while back in DSpace 7 work (see https://github.com/DSpace/DSpace/pull/2642), but it turned out to only be needed temporarily as the issue was that the older http://maven.restlet.org URL was temporarily unresponsive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With