我正在尝试添加cxf-codegen-plugin,但是下面是错误:-
找不到工件org.apache.cxf:cxf-codegen-plugin:pom: in central (https://repo.maven.apache.org/maven2)无法找到工件org.apache.cxf:cxf-codegen-plugin:jar: in central (https://repo.maven.apache.org/maven2)
从我的pom.xml上剪下来
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>${java.version}</source> <!-- or higher, depending on your project -->
<target>${java.version}</target> <!-- or higher, depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<executions>
<execution>
<id>locate-wsdl</id>
<phase>generate-sources</phase>
<configuration>
<wsdlOptions>
<wsdlOption>
<wsdl>${project.basedir}/src/main/resources/name.wsdl</wsdl>
<wsdlLocation>name.wsdl</wsdlLocation>
</wsdlOption>
</wsdlOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>发布于 2022-01-12 10:50:14
您的setting.xml文件可能出错。Settings.xml文件可以在.m2文件夹中找到。试着用这个:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>adobe-public</id>
<repositories>
<repository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>https://repo.adobe.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>这个库是公共可用的,所以您不能下载它的唯一原因是与maven存储库的连接。
https://stackoverflow.com/questions/70093377
复制相似问题