首先,我之前已经成功地将多个项目链接到JCenter,但茫然无措,为什么我无法为此特定软件包提交包含请求。
尝试执行“添加到Jcenter”步骤时,弹出以下错误消息。
有问题的软件包:https://bintray.com/kilianb/maven/pcg-java
pom:
<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">
<!-- Project settings -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.kilianB</groupId>
<artifactId>pcg-java</artifactId>
<version>1.0.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javac.target>10</javac.target>
<bintrayRepository>maven</bintrayRepository>
<bintrayPackage>pcg-java</bintrayPackage>
</properties>
<licenses>
<license>
<name>MIT</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Kilian Brachtendorf</name>
<email>Kilian.Brachtendorf@t-online.de</email>
<roles>
<role>developer</role>
</roles>
<timezone>Europe/Berlin</timezone>
</developer>
</developers>
<!-- JUnit 5 -->
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerVersion>10</compilerVersion>
<source>${javac.target}</source>
<target>${javac.target}</target>
<excludes>
<!-- -->
<exclude>**/doNotUse/**/*</exclude>
<exclude>**/statBenchmark/**/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<excludePackageNames>com.github.kilianB.pcg.doNotUse:com.github.kilianB.statBenchmark</excludePackageNames>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
</plugins>
</build>
<!-- Environment Settings -->
<distributionManagement>
<repository>
<id>bintray-kilianb-maven</id>
<name>kilianb-maven</name>
<url>https://api.bintray.com/maven/kilianb/${bintrayRepository}//${bintrayPackage}/</url>
</repository>
</distributionManagement>
</project>
所有构建都没有错误,并且可以将其安装在我的本地Maven存储库中,而不会出现任何问题。 pom 如何无效或缺少哪些强制性信息?
答案 0 :(得分:0)
我只是遇到了同样的问题,找不到关于jcenter所需信息的任何文档。我添加了以下字段:
在pom中使用这些字段后,我就可以发送收录请求。
我不知道是否全部都是必需的。我想至少名称和描述(您的pom中都缺少)都是如此。
答案 1 :(得分:0)
我能够通过手动将xml标头和scm标记添加到我的pom文件中来解决此问题,该Eclipse默认情况下不会添加。奇怪的是,不久前这些pom文件被接受了。
<?xml version="1.0" encoding="UTF-8"?>