google-code-export / dkpro-core-asl

Automatically exported from code.google.com/p/dkpro-core-asl
0 stars 0 forks source link

TreeTagger Component: adding model as managed dependency does not work under Windows #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

Adding TreeTagger models as managed dependencies (as done in the unit tests of 
dkpro-asl) does not seem to work - at least not under Windows.

See attached file with the relevant parts of the pom and the stack trace.

Adding the TreeTagger models this way - not in the <dependencyManagement> 
section -  does work, however (under Windows):

  <dependency>
    <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
    <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-de</artifactId>
    <version>20121207.0</version>
  </dependency>

  <dependency>
    <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
    <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-bin</artifactId>
    <version>20130228.0</version>
    <type>jar</type>
    <scope>compile</scope>
  </dependency>

Best
Judith

Original issue reported on code.google.com by eckle.kohler on 26 May 2013 at 4:01

Attachments:

GoogleCodeExporter commented 9 years ago
The model and binary dependencies must be "real" dependencies. Their versions 
may imported from the "de.tudarmstadt.ukp.dkpro.core.treetagger-asl" artifact, 
which then must be specified in the dependencyManagement section.

If you want to use managed dependencies, it should look like this:

<dependencies>
    <dependency>
        <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
        <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-bin</artifactId>
    </dependency>           
    <dependency>
        <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
        <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-de</artifactId>
    </dependency>
    <dependency>
        <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
        <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-en</artifactId>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
            <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-asl</artifactId>
            <version>1.4.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
  </dependencyManagement>

This strategy ensures that you always get compatible model/binary versions when 
you upgrade to a new version of the DKPro Core TreeTagger component.

Original comment by richard.eckart on 26 May 2013 at 4:09

GoogleCodeExporter commented 9 years ago
This does not work for me :(
I get the following errors (i.e. all classes in the project turned red):
I also tried to empty the local m2/repository, but it did not help.

Multiple annotations found at this line:
    - Project build error: 'dependencies.dependency.version' for de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-model-en:jar is 
     missing.
    - Project build error: 'dependencies.dependency.version' for de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-bin:jar is 
     missing.
    - Project build error: 'dependencies.dependency.version' for de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-model-de:jar is 
     missing.

Original comment by eckle.kohler on 26 May 2013 at 5:35

GoogleCodeExporter commented 9 years ago
That looks like you did not properly add this:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
            <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-asl</artifactId>
            <version>1.4.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
  </dependencyManagement>

Maybe you set the scope or type wrong or you used the wrong artifact, e.g. 
"de.tudarmstadt.ukp.dkpro.core-asl" instead of 
"de.tudarmstadt.ukp.dkpro.core.treetagger-asl". The managed dependencies are 
declared in the latter artifact as you can see here:

http://search.maven.org/remotecontent?filepath=de/tudarmstadt/ukp/dkpro/core/de.
tudarmstadt.ukp.dkpro.core.treetagger-asl/1.4.0/de.tudarmstadt.ukp.dkpro.core.tr
eetagger-asl-1.4.0.pom

Original comment by richard.eckart on 26 May 2013 at 6:35

GoogleCodeExporter commented 9 years ago
thanks for your help, Richard - now it's working

However, in your first comment, one dependency is missing (without that the 
TreeTagger components can not be found):
     <dependency>
         <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
         <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-asl</artifactId>
     </dependency>      

So to make the picture complete, it should like this:
<dependencies>
       <dependency>
                <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
                <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-asl</artifactId>
       </dependency>        
    <dependency>
        <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
        <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-bin</artifactId>
    </dependency>           
    <dependency>
        <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
        <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-de</artifactId>
    </dependency>
    <dependency>
        <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
        <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-en</artifactId>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
            <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-asl</artifactId>
            <version>1.4.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
  </dependencyManagement>

Original comment by eckle.kohler on 26 May 2013 at 7:07

GoogleCodeExporter commented 9 years ago

Original comment by eckle.kohler on 26 May 2013 at 7:11

GoogleCodeExporter commented 9 years ago
True, I was only explaining the dependency management for the resources 
(models/binaries), not for the component itself.

Original comment by richard.eckart on 26 May 2013 at 7:13