Skip to content

A required class was missing javax/xml/bind/annotation/XmlSchema #798

Open

Description

@hohwille
[ERROR] Failed to execute goal com.simpligility.maven.plugins:android-maven-plugin:4.6.0:generate-sources (default-generate-sources) on project mmm-ui-android-tab: Execution default-generate-sources of goal com.simpligility.maven.plugins:android-maven-plugin:4.6.0:generate-sources failed: A required class was missing while executing com.simpligility.maven.plugins:android-maven-plugin:4.6.0:generate-sources: javax/xml/bind/annotation/XmlSchema

To me it seems this plugin does not work with Java11 but only unsupported and outdated Java8 versions...
https://github.com/simpligility/android-maven-plugin/blob/master/.travis.yml#L5

Could you consider adding support for JDK 11?
Hint: https://github.com/devonfw/devon4j/blob/master/documentation/guide-jdk.asciidoc#upgrading

Activity

  1. pawellabaj commented on Apr 27, 2021

    @pawellabaj

    Is there any workaround for the issue except downgrading JDK?

  2. Robin479 commented on Nov 3, 2021

    @Robin479

    The XML API has been deprecated and removed from the JRE since Java 9, because it was too heavy and better suited to be an external library/module. That said: You need to define a dependency onto javax.xml.bind:jaxb-api:2.3.1 to have it back in your classpath, if you are using JDK 9 or above, e.g.

    <profile>
    	<id>JDK9+</id>
    	<activation>
    		<jdk>[9,)</jdk>
    	</activation>
    	<build>
    		<pluginManagement>
    			<plugins>
    				<plugin>
    					<groupId>com.simpligility.maven.plugins</groupId>
    					<artifactId>android-maven-plugin</artifactId>
    					<dependencies>
    						<dependency>
    							<groupId>javax.xml.bind</groupId>
    							<artifactId>jaxb-api</artifactId>
    							<version>2.3.1</version>
    						</dependency>
    					</dependencies>
    				</plugin>
    			</plugins>
    		</pluginManagement>
    	</build>
    </profile>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions