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

No schemas to compile. Skipping XJC execution. #250

Closed
titoc opened this issue Sep 8, 2022 · 8 comments
Closed

No schemas to compile. Skipping XJC execution. #250

titoc opened this issue Sep 8, 2022 · 8 comments
Milestone

Comments

@titoc
Copy link

titoc commented Sep 8, 2022

I have A.wsdl in ${project.basedir}/src/main/resources/wsdl/message and B.wsdl in my ${project.basedir}/src/main/resources/wsdl/search.

But when I do jaxb2:generate, I get the below warning and no class files are generated in the generated-sources directory.

-Didea.version=2022.1.3 org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.15.1:generate
[INFO] Scanning for projects...
[INFO] 
[INFO] --------< xxxxxxx >--------
[INFO] Building xxxxx 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- maven-jaxb2-plugin:0.15.1:generate (default-cli) @ xxxxxx ---
**[WARNING] No schemas to compile. Skipping XJC execution.** 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.121 s
[INFO] Finished at: 2022-09-08T17:26:42-04:00
[INFO] ------------------------------------------------------------------------

Here is my plugin configuration.

<plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.15.1</version>
                <executions>
                    <execution>
                        <id>a</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>${project.basedir}/src/main/resources/wsdl/message</schemaDirectory>
                            <schemaIncludes>
                                <include>A.wsdl</include>
                            </schemaIncludes>
                            <generatePackage>com.a</generatePackage>
                            <generateDirectory>${project.build.directory}/generated-sources/xjc-a</generateDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>b</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>${project.basedir}/src/main/resources/wsdl/search</schemaDirectory>
                            <schemaIncludes>
                                <include>B.wsdl</include>
                            </schemaIncludes>
                            <generatePackage>com.b</generatePackage>
                            <generateDirectory>${project.build.directory}/generated-sources/xjc-b</generateDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Any help is appreciated. I followed this documentation https://github.com/highsource/maven-jaxb2-plugin/wiki/Use-Separate-Target-Directories-for-Separate-Executions

@HeavyS
Copy link

HeavyS commented Oct 28, 2022

The same issues for me. And even more: It works only if configuration is placed not in execution tag but in plugin tag. And even with only one execution configuration it doesn't work:

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.15.1</version>
    <executions>
        <execution>
            <id>v20</id>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <extension>true</extension>
                <args>
                    <arg>-Xinheritance</arg>
                </args>
                <plugins>
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics</artifactId>
                        <version>0.12.0</version>
                    </plugin>
                </plugins>
                <schemaDirectory>src/xsd/v20</schemaDirectory>
                <generateDirectory>src/main/generated/v20</generateDirectory>
                <removeOldOutput>true</removeOldOutput>
            </configuration>
        </execution>
    </executions>
</plugin>

And this one work:

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.15.1</version>
    <executions>
        <execution>
            <id>v20</id>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <extension>true</extension>
        <args>
            <arg>-Xinheritance</arg>
        </args>
        <plugins>
            <plugin>
                <groupId>org.jvnet.jaxb2_commons</groupId>
                <artifactId>jaxb2-basics</artifactId>
                <version>0.12.0</version>
            </plugin>
        </plugins>
        <schemaDirectory>src/xsd/v20</schemaDirectory>
        <generateDirectory>src/main/generated/v20</generateDirectory>
        <removeOldOutput>true</removeOldOutput>
    </configuration>
</plugin>

@stessy
Copy link

stessy commented Nov 17, 2022

Same for me. The generation only works if the configuration is set in the plugin tag.

@mattrpav
Copy link
Collaborator

Check #251 and (soon to be released) 0.15.2.

I updated to newer JAXB 2.3.7 which has some wsdl fixes and reworked jaxb dependencies (esp w/ xjc)

@HeavyS
Copy link

HeavyS commented Jan 13, 2023

Check #251 and (soon to be released) 0.15.2.

I updated to newer JAXB 2.3.7 which has some wsdl fixes and reworked jaxb dependencies (esp w/ xjc)

Thanks for your reply, I've checked my project with new version but nothing has changed for me.
Here is minimum example of my issue:
MavenXJC.zip
Two pom files. pom.xml is what I want and it doesn't work and pom_good.xml works

@LegendaryZer0
Copy link

LegendaryZer0 commented Apr 11, 2023

Has anyone found a way to fix it yet? Upgrading the version didn't work for me.

UPD: Worked for me with 11 jdk version

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Jul 6, 2023

Check #251 and (soon to be released) 0.15.2.
I updated to newer JAXB 2.3.7 which has some wsdl fixes and reworked jaxb dependencies (esp w/ xjc)

Thanks for your reply, I've checked my project with new version but nothing has changed for me. Here is minimum example of my issue: MavenXJC.zip Two pom files. pom.xml is what I want and it doesn't work and pom_good.xml works

Thanks @HeavyS for your sample. We'll try to work on it if latest 2.0.2 version didn't do the job.
Did you also try to specify schemaLanguage tag to wsdl in config since, from what I've seen, you try to generate wsdl files ?

@laurentschoelens
Copy link
Collaborator

Hi @HeavyS and everyone (@LegendaryZer0 / @titoc / @stessy).
I've tested your project example and reproduced your issue with jdk8 and success with jdk11 without changing the pom
The good news is : version 2.0.2 fixed your issue with jdk8

You can use the following (new) version since groupId / artifactId changed from v2.

<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>2.0.2</version>

I'm adding a test project (jt-250) in 2.0.3 to keep this issue under control

@laurentschoelens
Copy link
Collaborator

Test has been added in 2.0.4 release

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

6 participants