1 year ago

#359494

test-img

Werner Daehn

maven-javadoc-plugin has issues with package-info.java and annotations

I get the following error message:

Error:  Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.2:
jar (attach-javadocs) on project: 
MavenReportException: Error while generating Javadoc: 
Error:  Exit code: 1 - ...../package-info.java:1: error: unknown tag: XmlSchema

Everywhere else I use the @XmlSchema annotation it does not complain and the Eclipse IDE has no problems with compiling it either. The dependencies are listed in pom.xml.

    <dependency>
        <groupId>jakarta.xml.bind</groupId>
        <artifactId>jakarta.xml.bind-api</artifactId>
        <version>4.0.0-RC3</version>
    </dependency>

The pacakge-info.java is

@XmlSchema(
    elementFormDefault = XmlNsForm.QUALIFIED,
    xmlns = {
            @XmlNs(prefix="edmx", namespaceURI="http://docs.oasis-open.org/odata/ns/edmx"),
            @XmlNs(prefix="", namespaceURI="http://docs.oasis-open.org/odata/ns/edm")
    },
    namespace = "http://docs.oasis-open.org/odata/ns/edm"
)

package io.rtdi.appcontainer.odata.entity.metadata;

import jakarta.xml.bind.annotation.XmlNs;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>3.3.2</version>
    <configuration>
        <source>11</source>
        <detectJavaApiLink>false</detectJavaApiLink>
    </configuration>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals>
                <goal>jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Any thoughts why that might fail with openjdk 12.0.2 as builder in github?

java

maven

maven-javadoc-plugin

0 Answers

Your Answer

Accepted video resources