当前位置: 首页 > 知识库问答 >
问题:

如何修复Java中的插件依赖错误

陶乐生
2023-03-14

我是java新手,当maven编译java代码时,我得到了这个错误

[ERROR]处理POM时遇到一些问题:gov.nih.nlm.nls.lvg:lvgdist:jar的“build.plugins.plugin[org.codehaus.mojo:exec-maven-plugin].dependencies.dependency.version”丢失。@第174行,第20栏

我检查了这个库它存在

<?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>

共有1个答案

江鸿羲
2023-03-14

正如Strelok提到的

丢失了...标签

添加此标记后工作

 类似资料:
  • 我是毕业生的新手,我需要配置我的构建.gradle文件。我正在使用硒网络驱动程序,我有.jar文件列表。我如何将此jar文件作为依赖项包含在我的build.gradle文件中?我有这个.jar在我的包中一个名为lib的文件夹中。我有 }但是我一直有下面的错误: 失败:生成失败,出现异常。 其中:构建文件“/主页/ola/工作区/构建分级”行: 20 出错了:评估根项目“工作区”时出现问题。无法将对

  • 我只是从我当地的回购协议中克隆了一个Android项目,我很难“构建”它。也许它错过了一些外部图书馆,但我不知道。 在开始等级构建时,我得到以下信息: 我试着检查“清单”文件,但我找不到。我完全迷路了... 我很确定这是一个配置错误,因此我可以在这里找到所有的配置文件: settings.gradle代码 (来自项目文件夹内)的输出如下:

  • Java 插件给项目增加了许多关于依赖的配置, 如下所示, 这些配置被分配给许多任务, 比如 compileJava 和 test 等配置 表22.5.Java插件-依赖配置 名称 扩展 被使用时运行的任务 含义 compile - compileJava 编译时的依赖 runtime compile - 运行时的依赖 testCompile compile compileTestJava 编译测

  • 依赖 AdminLTE 依赖两个主要的框架。下载的软件包中已经包含这两个库,因此你不必手动下载它们。 Bootstrap 4 jQuery 3.3.1+ Popper.js 1.14.7+ 下面列出了所有其他插件 插件 AdminLTE 使用以下插件。相关文档,更新或许可证信息,请访问提供的链接。 你需要手动加载插件的 js/css 文件。 AdminLTE 不会自动加载所有插件,这会造成页面加载

  • 错误: ./src/containers/administration/dwConnections/switch。js第11:6行:React Hook useEffect缺少依赖项:“enabled”。包括它或删除依赖项数组react hooks/dep

  • 问题内容: 我有一个项目,需要以下Maven jibx插件: 在jibx插件pom内部,有一个xpp3依赖关系,我想从我的项目构建过程中排除它(由于某种原因,我无法在私有存储库中拥有它)。 有没有一种方法可以配置我的pom.xml(而不是插件pom)来排除该依赖关系? 编辑:我试图从插件pom中删除xpp3依赖项,并且该项目可以成功构建,所以我知道依赖项不是强制性的。 问题答案: 这是一个示例,其