gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 19:33:30 25 4
gpt4 key购买 nike

我是java新手maven 编译 Java 代码时出现此错误

[ERROR] Some problems were encountered while processing the POMs: 'build.plugins.plugin[org.codehaus.mojo:exec-maven-plugin].dependencies.dependency.version' for gov.nih.nlm.nls.lvg:lvgdist:jar is missing. @ line 174, column 20

我检查了这个库它是否存在

enter image description here

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

我觉得还不错

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

如何修复这个错误?

最佳答案

正如Strelok提到的

缺少...标签

添加此标签后有效

关于java - 如何修复 Java 中的插件依赖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59242640/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com