【发布时间】:2020-05-13 15:52:35
【问题描述】:
您好,我是 jenkins & nexus 的新手,所以我正在尝试将 jar 文件推送到 nexus。但是当我建立工作时,我得到了这样的错误:
项目(C:\Program Files (x86)\Jenkins\workspace\job5\pom.xml)有1个错误 [错误] 不可解析的 POM C:\Program Files (x86)\Jenkins\workspace\job5\pom.xml:重复的标签:'repository'(位置:START_TAG 看到 ...\r\n\t...@ 47:14)@ 第 47 行,第 14 列 -> [帮助 2]
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.scmgalaxy.mavensample</groupId>
<artifactId>yoodle</artifactId>
<packaging>jar</packaging>
<version>5.0.0</version>
<name>my-maven</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>sample_nexus</id>
<url>http://localhost:8081/repository/sample_nexus/</url>
<layout>default</layout>
</repository>
<repository>
<id>maven-releases</id>
<url>http://localhost:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>maven-snapshots</id>
<url>http://localhost:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
【问题讨论】:
-
请阅读错误信息
Duplicated tag: 'repository'也给出了行号...