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

testXjc MOJO - generated test sources are added to sources jar artifact too #134

Closed
petrprochy opened this issue Jun 14, 2019 · 2 comments · Fixed by #184
Closed

testXjc MOJO - generated test sources are added to sources jar artifact too #134

petrprochy opened this issue Jun 14, 2019 · 2 comments · Fixed by #184
Labels

Comments

@petrprochy
Copy link

When is generated test JAXB sources from XSD schema and sources JAR artifact is created too (ex. with -DperformRelease=true), then this generated sources are added to JAR.

I created IT test with this goals: clean test-compile source:jar source:test-jar and output is:

[INFO] --- maven-source-plugin:3.1.0:jar (default-cli) @ xjc-test-sources ---
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-source-plugin:3.1.0:jar from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-source-plugin:3.1.0, parent: sun.misc.Launcher$AppClassLoader@4e25154f]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-source-plugin:3.1.0:jar' with basic configurator -->
[DEBUG] (f) attach = true
[DEBUG] (f) classifier = sources
[DEBUG] (f) defaultManifestFile = D:\usr\projects\maven\jaxb2-maven-plugin\target\it\xjc-test-resources\target\classes\META-INF\MANIFEST.MF
[DEBUG] (f) excludeResources = false
[DEBUG] (f) finalName = xjc-test-sources-1.0-SNAPSHOT
[DEBUG] (f) forceCreation = false
[DEBUG] (f) includePom = false
[DEBUG] (f) outputDirectory = D:\usr\projects\maven\jaxb2-maven-plugin\target\it\xjc-test-resources\target
[DEBUG] (f) project = MavenProject: org.codehaus.mojo.jaxb2.its:xjc-test-sources:1.0-SNAPSHOT @ D:\usr\projects\maven\jaxb2-maven-plugin\target\it\xjc-test-resources\pom.xml
[DEBUG] (f) reactorProjects = [MavenProject: org.codehaus.mojo.jaxb2.its:xjc-test-sources:1.0-SNAPSHOT @ D:\usr\projects\maven\jaxb2-maven-plugin\target\it\xjc-test-resources\pom.xml]
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@21362712
[DEBUG] (f) skipSource = false
[DEBUG] (f) useDefaultExcludes = true
[DEBUG] (f) useDefaultManifestFile = false
[DEBUG] -- end configuration --
[DEBUG] isUp2date: false (Destination D:\usr\projects\maven\jaxb2-maven-plugin\target\it\xjc-test-resources\target\xjc-test-sources-1.0-SNAPSHOT-sources.jar not found.)
[INFO] Building jar: D:\usr\projects\maven\jaxb2-maven-plugin\target\it\xjc-test-resources\target\xjc-test-sources-1.0-SNAPSHOT-sources.jar
[DEBUG] adding directory META-INF/
[DEBUG] adding entry META-INF/MANIFEST.MF
[DEBUG] adding entry Main.java
[DEBUG] adding directory com/
[DEBUG] adding directory com/example/
[DEBUG] adding directory com/example/myschema/
[DEBUG] adding directory META-INF/JAXB/
[DEBUG] adding entry com/example/myschema/AddressType.java
[DEBUG] adding entry com/example/myschema/ObjectFactory.java
[DEBUG] adding entry META-INF/JAXB/episode_xjc-test.xjb
[DEBUG] adding directory META-INF/maven/
[DEBUG] adding directory META-INF/maven/org.codehaus.mojo.jaxb2.its/
[DEBUG] adding directory META-INF/maven/org.codehaus.mojo.jaxb2.its/xjc-test-sources/
[DEBUG] adding entry META-INF/maven/org.codehaus.mojo.jaxb2.its/xjc-test-sources/pom.xml
[DEBUG] adding entry META-INF/maven/org.codehaus.mojo.jaxb2.its/xjc-test-sources/pom.properties

build.log

@mkuzela
Copy link

mkuzela commented Feb 17, 2021

I have same issue, looks like bug was introduced in version 2.3 (2.2 is fine in my case)

marschall added a commit to marschall/jaxb2-maven-plugin that referenced this issue Oct 10, 2021
@marschall
Copy link
Contributor

@mkuzela it looks like the bug was introduced with f460f4a

slachiewicz pushed a commit that referenced this issue Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants