简体   繁体   English

找不到架构 XJC

[英]No schemas have been found | XJC

Can someone please help me on this issue. 有人可以帮我解决这个问题。 I have more than 2 schema files in the same directory and trying to generate the java classes using xjc in maven. 我在同一目录中有两个以上的架构文件,并尝试在Maven中使用xjc生成Java类。

Here is my pom.xml 这是我的pom.xml

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jaxb2-maven-plugin</artifactId>
            <version>${jaxb2.version}</version>
            <executions>
                <execution>
                    <id>xjc</id>
                    <goals>
                        <goal>xjc</goal>
                    </goals>
                    <configuration>
                        <clearOutputDir>false</clearOutputDir>
                        <extension>true</extension>
                        <schemaFiles>${root.dir}/schemas/PnTCacheSchema.xsd</schemaFiles>
                        <schemaDirectory>${root.dir}/schemas/</schemaDirectory>
                        <packageName>com.superpages.nbt.gen.pnt</packageName>
                        <outputDirectory>${root.dir}/nbt/src</outputDirectory>
                    </configuration>
                </execution>
                <execution>
                    <id>xjc1</id>
                    <goals>
                        <goal>xjc</goal>
                    </goals>
                    <configuration>
                        <clearOutputDir>false</clearOutputDir>
                        <extension>true</extension>
                        <schemaFiles>${root.dir}/schemas/AdCacheSchema.xsd</schemaFiles>
                        <schemaDirectory>${root.dir}/schemas/</schemaDirectory>
                        <packageName>com.superpages.nbt.gen.cache</packageName>
                        <outputDirectory>${root.dir}/nbt/src</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Getting this exception 获取此异常

[ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc (default-cli) on project gypsygen: No schemas have been found -> [Help 1]

尝试将<plugins>标记<pluginManagement> tag.<pluginManagement> tag.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM