I am going a project in maven and using <a href="http://java-ml.sourceforge.net/" rel="nofollow">Java-ML</a> in it. While using this library i got error
Now for removing this error, i am trying to import the missing class by
but the import statement is not working as i am not able to find the repository of the Abeel Javakit Tool (AJT) to write in the pom.xml to resolve the dependency.
How to resolve this dependency in maven. Please help.
Thanks in advance.Answer1:
It might not have been deployed to Maven Central or another Maven Repository.
In this case you can do the following:<ul><li>
Add the JAR to your corporate Maven Repository (see here for Nexus: <a href="http://blog.sonatype.com/people/2008/11/adding-a-jar-to-a-maven-repository-with-sonatype-nexus/" rel="nofollow">http://blog.sonatype.com/people/2008/11/adding-a-jar-to-a-maven-repository-with-sonatype-nexus/</a>)</li> <li>
Try to get the JAR deployed to Maven Central:<ol><li>
Ask the project owner to deploy the JAR to Maven Central. Here is the documenation how the project owner can do this: <a href="https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-9.StageaRelease" rel="nofollow">https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-9.StageaRelease</a></li> <li>
If the project owner does not respond but the license is compatible with Maven Central requirements: <a href="https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+The+Central+Repository" rel="nofollow">https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+The+Central+Repository</a></li> </ol></li> </ul>Answer2:
You should import all the recommended libraries list below:
Required libraries: - Apache Commons Math: used in some algorithms, version 1.2 is included Apache Commons Math is distributed under Apache License 2.0 <a href="http://commons.apache.org/math/" rel="nofollow">http://commons.apache.org/math/</a><ul><li>
Abeel Java Toolkit: used in some classes, version 1.20 is included AJT is distributed under GNU GPL 2 or later <a href="http://sourceforge.net/projects/ajt/" rel="nofollow">http://sourceforge.net/projects/ajt/</a></li> <li>
Jama: used in some algorithms, version 1.0.2 is included Jama is distributed as public domain software</li> </ul>Answer3:
I stumbled into the very same problem, and I did not want to do anything complicated.
That's when I realized that, in the javaml download, we have the following hierarchy: javaml-0.1.7 > lib > ajt-2.9.jar
So I just added, in my
app/build.gradle, in the dependencies:
compile fileTree(include: ['*.jar'], dir: 'libs/javaml-0.1.7/lib'). Worked like a charm. I can now go to sleep.
(note: I put my javaml folder in a custom libs/ folder, adapt the dir path to your needs)Answer4:
javaml-0.1.7.jar faced with the exact problem in my
maven project. It easily get fixed when i added
ajt-2.9.jar from <a href="https://github.com/alexeygrigorev/maven-repo/blob/master/be/abeel/ajt/2.9/ajt-2.9.jar" rel="nofollow">this repo</a>.