Search code examples
javaeclipsemavendependenciesstanford-nlp

Adding Stanford CoreNLP 3.9.2 as Dependency via Maven


I'm trying to add Stanford CoreNLP 3.9.2 as dependency to my Eclipse/Maven project:

<dependency>
   <groupId>edu.stanford.nlp</groupId>
   <artifactId>stanford-corenlp</artifactId>
   <version>3.9.2</version>
</dependency>

Next to my POM.xml file I see a little red x icon. When I open POM.xml there is no additional information regarding the error.

When I click on Java -> Properties -> Java Build Path -> Maven Dependencies I see that the Jars that were expected to be added to Maven via this dependency are missing. This is odd because I regularly add dependencies this way without any error.

Apparently, something is preventing Maven from downloading the dependencies. What could it be?

Update:

I changed POM file to version 3.5.2 (instead of 3.9.2) and now all errors are gone.

If anyone can explain WHY this solved my problem (and how to make things work with version 3.9.2) I will accept it as the answer.

Update:

When I go to my Maven repository I see that most of the required Jars have been downloaded by Maven. For example, Maven repository will contain the folders: \\maven\.m2\repository\edu\stanford\nlp\stanford-corenlp\3.9.2 However the folder will not contain the Jar: stanford-corenlp-3.9.2 - but it will contain every other Jar such as stanford-corenlp-3.9.2-models and stanford-corenlp-3.9.2-sources etc.

This makes the whole situation even more confusing. If Maven is downloading the Jars why is it skipping just one Jar? I looked in several other folders (dependencies of corenlp) and I see similar phenomenon - it's always the main Jar of that folder that is missing.

What's worse, when I download and add the missing Jars manually to Maven folder, the (missing) text next to Jar goes away but there's still a little red x icon next to POM file. I have no idea what is going on.

Any insights?

Thanks!


Solution

  • I have no idea why this fixed the problem but in my POM file I had an entry:

    <dependency>
        <groupId>org.eclipse.platform</groupId>
        <artifactId>org.eclipse.debug.core</artifactId>
        <version>3.13.0</version>
    </dependency>
    

    I update this dependency to:

    <dependency>
        <groupId>org.eclipse.platform</groupId>
        <artifactId>org.eclipse.debug.core</artifactId>
        <version>3.14.0</version>
    </dependency>
    

    Now all errors have disappeared.