3

I am a beginner in using Maven.. I tried to add Grobid (for pdf parsing) in maven. The dependency I gave is :

<dependency>
    <groupId>org.grobid</groupId>
    <artifactId>grobid-core</artifactId>
    <version>0.3.4</version>
 </dependency>

But on building the pom it shows the following error:

[ERROR] Failed to execute goal on project Miner: Could not resolve dependencies for project Miner:war:1.0-SNAPSHOT: Failed to collect dependencies at org.grobid:grobid-core:jar:0.3.4 -> org.chasen:crfpp:jar:1.0.2: Failed to read artifact descriptor for org.chasen:crfpp:jar:1.0.2: Could not transfer artifact org.chasen:crfpp:pom:1.0.2 from/to 3rd-party-local-repo (file:///${basedir}/lib/): Repository path /${basedir}/lib does not exist, and cannot be created. -> [Help 1]

I have gone through different questions related..I tried after adding pom etc. Still it is not working.. why this error comes..do we have to do extra codes for Grobid..?

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
Naima
  • 101
  • 1
  • 4
  • 9
  • Possible duplicate of [Maven Could not resolve dependencies, artifacts could not be resolved](http://stackoverflow.com/questions/4650460/maven-could-not-resolve-dependencies-artifacts-could-not-be-resolved) – Mistalis Jan 30 '17 at 09:26

3 Answers3

1

add the below repository in pom or .m2/settings.xml

  <repositories>
    <repository>
      <id>Grobid repository</id>
      <url>https://mvnrepository.com/artifact/org.grobid/grobid-core</url>
    </repository>
 </repositories>
Hiccup
  • 596
  • 6
  • 19
  • Thank you very much..:) can you explain why the dependency one didn't worked (code was taken from Grobid' site itself) – Naima Jan 30 '17 at 09:40
0

Start by downloading maven from http://mirror.vorboss.net/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip

Unzip it somewhere, then assuming your're on windows

1) set an environment variable M2_HOME to point at the unziped folder.

2) add %M2_HOME%/bin to your PATH environment variable

3) go to your home directory (probably C:/Users/????? and create a .m2 folder

4) move the settings.xml file from the maven unzippped/conf directory to the directory created in step 3.

5) you may have to set the proxy element correctly in your settings.xml file

It should work.

Essex Boy
  • 7,565
  • 2
  • 21
  • 24
0

You might be new to maven, but it explicit the problem here:

Repository path /${basedir}/lib does not exist, and cannot be created.

This means that Maven could not locate the repository path you are trying to access. Or (from the "cannot be created") can't find the directory where to save the content.

As you did not provide pom.xml to look further, you'll have to find all ${basedir}/lib path in your pom.xml and in your maven settings (default to %USERPROFILE%/.m2/settings.xml or $HOME/.m2/settings.xml), then you may want to

  • try with an absolute path.
  • use an actual HTTP repository where that dependency and child' dependencies are.
  • use a repository server such as Sonatype Nexus or Archiva and provide a mirror/copy of it.
NoDataFound
  • 11,381
  • 33
  • 59