numenta / htm.java

Hierarchical Temporal Memory implementation in Java - an official Community-Driven Java port of the Numenta Platform for Intelligent Computing (NuPIC).
GNU Affero General Public License v3.0
310 stars 160 forks source link

maven build fails because of missing dependency #555

Open thatsdone opened 2 years ago

thatsdone commented 2 years ago

DESCRIPTION

Maven build of htm.java fails saying 'algorithmfoundry:algorithmfoundry-shade-culled:jar:1.3' is missing.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.705 s
[INFO] Finished at: 2021-10-22T21:44:52+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project htm.java: Could not resolve dependencies for project org.numenta:htm.java:jar:0.6.13: Could not find artifact algorithmfoundry:algorithmfoundry-shade-culled:jar:1.3 in repo (http://metaware.us/maven3) -> [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/DependencyResolutionException

REPRODUCE PROCEDURE

Just try to clone & buid htm.java using maven.

In case of me, build environment is the following:

ANALYSYS and SUGGESTED RESOLUTION

It seems this is a long standing(?) issue as you can find out below:

https://discourse.numenta.org/t/dependency-problem-from-maven-release/2042

The original Matrix Tool Kit for Java implementation (with a method addRow() that missing in the current MTJ) from algorithmfoundry seems to have been lost, and now htm.java bundles a copy of 'algorithmfoundry-shade-culled-1.3.jar' under 'libs' directory.

Thus, just updating pom.xml like below resolves this issue.

$ diff -u  pom.xml pom.xml.new
--- pom.xml     2021-10-23 09:11:55.324013034 +0900
+++ pom.xml.new 2021-10-22 21:30:08.009629309 +0900
@@ -144,6 +144,8 @@
                        <groupId>algorithmfoundry</groupId>
                        <artifactId>algorithmfoundry-shade-culled</artifactId>
                        <version>1.3</version>
+                       <scope>system</scope>
+                       <systemPath>${project.basedir}/libs/algorithmfoundry-shade-culled-1.3.jar</systemPath>
                </dependency>
        </dependencies>

I will create a PR for this soon.

Regards, Masanori