Maven 2 maven jaxb2插件-我可以避免jwsdp依赖项吗

Maven 2 maven jaxb2插件-我可以避免jwsdp依赖项吗,maven-2,jaxb,jaxb2,maven-jaxb2-plugin,Maven 2,Jaxb,Jaxb2,Maven Jaxb2 Plugin,我有一个maven构建,它自动生成一组JAXB java源文件。基本配置是 <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.7.5</version> <executions> <exe

我有一个maven构建,它自动生成一组JAXB java源文件。基本配置是

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.7.5</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <includeSchemas>
            <includeSchema>*.xsd</includeSchema>
        </includeSchemas>
        <excludeSchemas>
            <excludeSchema>test*.xsd</excludeSchema>
        </excludeSchemas>
        <includeBindings>
            <includeBinding>*.xjb</includeBinding>
        </includeBindings>
        <strict>false</strict>
        <verbose>true</verbose>
        <debug>true</debug>
        <extension>true</extension>
        <!-- http://stackoverflow.com/questions/1999163/how-to-use-jaxb-commons-plugins-from-maven -->
        <args>
            <arg>-Xinheritance</arg>
        </args>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics</artifactId>
            <version>0.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <version>0.6.1</version>
        </dependency>
    </dependencies>
</plugin>

我不明白这些
jwsdp:jaxb-libs
依赖项是从哪里来的。你是怎么想到你需要它们的?也许其中一个可以帮助你开始。你的项目通常都有

    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>${jaxb.version}</version>
    </dependency>

com.sun.xml.bind
与您正在使用的
maven-jaxb2-plugin
无关


最后,我建议将JAXB插件添加为
configuration/plugins
,而不是依赖项。请参阅。

谢谢。maven命令“cleancipile”似乎在正确执行生成阶段后将jwsdp作为依赖项拖入。我没有明确地将jwsdp包含在pom.xml中,我必须检查运行mvn进程的类路径,看看是否存在一些问题。
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>${jaxb.version}</version>
    </dependency>
    <dependency>
        <groupId>org.jvnet.jaxb2_commons</groupId>
        <artifactId>jaxb2-basics-runtime</artifactId>
        <version>${project.version}</version>
    </dependency>