Kilian
Kilian

Reputation: 1939

Invalid Pom project file when sending request to include bintray package in jcenter

First of all, I successfully linked multiple projects to JCenter before and am at a loss why I am not able to submit an inclusion request for this specific package.

The following error message pops up when trying to follow the "add to Jcenter" steps.

enter image description here

The package in question: https://bintray.com/kilianb/maven/pcg-java

The 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>[email protected]</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>

Everything builds without errors and installed in my local maven repository the artifact can be used without any issues. How is this pom invalid or which mandatory information is missing?

Upvotes: 2

Views: 632

Answers (2)

Kilian
Kilian

Reputation: 1939

I was able to solve the issue by manually adding the xml header as well as the scm tag to my pom file, which eclipse does not add by default. Strangely enough these pom files were accepted a while ago.

<?xml version="1.0" encoding="UTF-8"?>

Upvotes: 1

fry
fry

Reputation: 41

I just ran into the same problem and couldn't find any documentation on what information jcenter requires. I added the following fields:

  • name
  • description
  • licenses
  • scm
  • developers

With these fields in my pom I was able to send my inclusion request.

I don't know if all of them are required. I suppose at least name and description (which are both missing in your pom) are.

Upvotes: 2

Related Questions