首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Java中修复插件依赖关系错误

如何在Java中修复插件依赖关系错误
EN

Stack Overflow用户
提问于 2019-12-09 04:42:29
回答 1查看 199关注 0票数 0

我是java新手,我在maven编译Java代码时遇到了这个错误。

在处理POMs:'build.plugins.pluginorg.codehaus.mojo:exec-maven-plugin.dependencies.dependency.version‘for gov.nih.nlm.nls.lvg:lvgdist:jar时遇到了一些问题。@第174行,第20栏

我检查了这个库,它存在

我检查了这个子项目的pom.xml

在我看来没问题

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
    license agreements. See the NOTICE file distributed with this work for additional 
    information regarding copyright ownership. The ASF licenses this file to 
    you under the Apache License, Version 2.0 (the "License"); you may not use 
    this file except in compliance with the License. You may obtain a copy of 
    the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
    by applicable law or agreed to in writing, software distributed under the 
    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
    OF ANY KIND, either express or implied. See the License for the specific 
    language governing permissions and limitations under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>ctakes-clinical-pipeline</artifactId>
    <name>Apache cTAKES ctakes-clinical-pipeline</name>
    <parent>
        <groupId>org.apache.ctakes</groupId>
        <artifactId>ctakes</artifactId>
        <version>4.0.0</version>
    </parent>


    <dependencies>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-context-tokenizer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-preprocessor</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-lvg</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-chunker</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-ne-contexts</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-pos-tagger</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-drug-ner</artifactId>
        </dependency>       
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-assertion</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-dependency-parser</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-ytex</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-ytex-res</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-ytex-uima</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-dictionary-lookup-fast</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-constituency-parser</artifactId>
        </dependency>
        <dependency>
          <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-coreference</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-clinical-pipeline-res</artifactId>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>runCPE</id>
            <activation>
                <property>
                    <name>runCPE</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <!-- depends on other modules being on classpath -->
                                <phase>compile</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <includeProjectDependencies>true</includeProjectDependencies>
                            <includePluginDependencies>true</includePluginDependencies>                     
                            <mainClass>org.apache.uima.tools.cpm.CpmFrame</mainClass>
                            <arguments>
                                <argument />
                            </arguments>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>gov.nih.nlm.nls.lvg</groupId>
                                <artifactId>lvgdist</artifactId>
                            </dependency>
                        </dependencies>                     
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>runCVD</id>
            <activation>
                <property>
                    <name>runCVD</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <!-- depends on other modules being on classpath -->
                                <phase>compile</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <includeProjectDependencies>true</includeProjectDependencies>
                            <includePluginDependencies>true</includePluginDependencies>

                            <mainClass>org.apache.uima.tools.cvd.CVD</mainClass>
                            <!-- Have to specify at least one parameter otherwise, CVD thinks 
                                it's an invalid param because MVN passes null when joining to the mvn thread -->
                            <arguments>
                                <argument>-lookandfeel</argument>
                                <argument>javax.swing.plaf.metal.MetalLookAndFeel</argument>
                            </arguments>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>gov.nih.nlm.nls.lvg</groupId>
                                <artifactId>lvgdist</artifactId>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

如何修复此错误?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-12-09 21:25:44

就像斯特拉克提到的

失踪了..。标签

它在添加了这个标签之后才起作用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59242640

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档