Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hohwille opened this issue Feb 16, 2021 · 2 comments
Open

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

hohwille opened this issue Feb 16, 2021 · 2 comments

Comments

@hohwille
Copy link

[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

@pawellabaj
Copy link

Is there any workaround for the issue except downgrading JDK?

@Robin479
Copy link

Robin479 commented Nov 3, 2021

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants