我正在尝试使用Maven构建项目,但是当我的依赖项开始下载时。 Jackson注释的下载链接不正确。该版本未添加到链接中,如下所示($ {jackson.version.annotations})。
https://na.artifactory.blabla.com/artifactory/sysdse-maven-blabla/com/fasterxml/jackson/core/jackson-annotations/${jackson.version.annotations}/jackson-annotations-${jackson.version.annotations}.pom
我正在从人工制品中提取依赖关系。因此,存储库是正确的,而不是版本。
这是我的pom.xml文件:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.7</version>
</dependency>
这是我收到的错误消息。
WARN org.apache.maven.DefaultMaven - The POM for com.fasterxml.jackson.core:jackson-annotations:jar:2.9.7 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for com.fasterxml.jackson.core:jackson-annotations:2.9.7
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @
ERROR org.apache.maven.cli.MavenCli - Failed to execute goal on project cde-pilot: Could not resolve dependencies for project com.ibm:cde-pilot:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.fasterxml.jackson.core:jackson-databind:jar:2.9.7 -> com.fasterxml.jackson.core:jackson-annotations:jar:${jackson.version.annotations}: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-annotations:jar:${jackson.version.annotations}: Could not transfer artifact com.fasterxml.jackson.core:jackson-annotations:pom:${jackson.version.annotations} from/to artifactory-release (https://na.artifactory.blabla.com/artifactory/sysdse-maven-blabla): Illegal character in path at index 117: https://na.artifactory.blabla.com/artifactory/sysdse-maven-blabla/com/fasterxml/jackson/core/jackson-annotations/${jackson.version.annotations}/jackson-annotations-${jackson.version.annotations}.pom
更新: 我在Pom层次结构中发现了这种奇怪的设置。它表明与版本存在冲突。
我通过从pom和.m2目录中的存储库文件中删除依赖项并将软件包再次添加到pom来解决了此问题。
但是现在我收到此错误:
'parent.artifactId' must be changed, the parent element cannot have the same groupId:artifactId as the project
这是我的POM:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.ibm</groupId>
<artifactId>zpe-lap</artifactId>
<version>1.0-SNAPSHOT</version>
<name>ZPE</name>
<dependencies>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>soap</groupId>
<artifactId>soap</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.util</groupId>
<artifactId>ws-commons-util</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons</groupId>
<artifactId>ws-commons-java5</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-common</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>net.sf.ezmorph</groupId>
<artifactId>ezmorph</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.8</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.11</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.8</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.0</version>
<classifier>jdk13</classifier>
</dependency>
<dependency>
<groupId>com.ibm.sdwb</groupId>
<artifactId>cmvc-client</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc4</artifactId>
<version>4.15.134</version>
</dependency>
<dependency>
<groupId>com.ibm.bluepages</groupId>
<artifactId>bluepages-java-toolkit</artifactId>
<version>3.0.6.0</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>dv2common</artifactId>
<version>0.93</version>
</dependency>
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>FTPProtocol</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>dv2pm</artifactId>
<version>0.93</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>databasetools</artifactId>
<version>0.93</version>
</dependency>
<dependency>
<groupId>com.telelogic.focalpoint</groupId>
<artifactId>focalpoint-webservices2</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira.plugins</groupId>
<artifactId>jira-soapclient</artifactId>
<version>3.13</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>NCSO</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>odtclient</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>tctapi</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>tct</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ibm.retain</groupId>
<artifactId>retain-toolkit</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>com.ibm.sport</groupId>
<artifactId>sport-wrappers</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ibm.sport</groupId>
<artifactId>sport-commandline</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>db2java</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.mylyn.github</groupId>
<artifactId>org.eclipse.egit.github.core</artifactId>
<version>2.1.5</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.7</version>
</dependency>
</dependencies>
</project>
答案 0 :(得分:0)
您是否尝试过将其添加到pom.xml?
<properties>
<jackson.annotations.version>2.9.7</jackson.annotations.version>
</properties>