简体   繁体   English

maven-jaxb-plugin有哪些依赖关系/存储库?

[英]What dependency/repository for maven-jaxb-plugin?

in my pom.xml I've configured maven-jaxb-plugin but I'm getting a "A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository" because of it. 在我的pom.xml中,我已经配置了maven-jaxb-plugin,但是却收到一个“找不到所需的插件:找不到插件-检查目标名称是否正确:无法从任何存储库下载工件“ 因为它。 My config is like this: 我的配置是这样的:

<plugin>
    <groupId>com.sun.tools.xjc.maven2</groupId>
    <artifactId>maven-jaxb-plugin</artifactId>
    <version>1.1</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <generate-package>tld.mycompany.myproject.data.ws-schema</generate-package>
        <schemaDirectory>src/main/resources/ws/xsd</schemaDirectory>
    </configuration>
</plugin>

In dependencies, I have added the following. 在依赖项中,我添加了以下内容。

<dependency>
    <groupId>maven-plugins</groupId>
    <artifactId>maven-jaxb-plugin</artifactId>
    <version>1.1.0</version>
</dependency>
<dependency>
  <groupId>org.jvnet.jaxb2.maven2</groupId>
  <artifactId>maven-jaxb2-plugin</artifactId>
  <version>0.7.5</version>
</dependency>
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.2</version>
</dependency>
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-xjc</artifactId>
    <version>2.2</version>
</dependency>
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.2</version>
</dependency>

What am I missing? 我想念什么? Why can't it find the correct artifacts? 为什么找不到正确的工件?

Cheers 干杯

Nik 尼克

I suggest you use, when facing such a problem, one of the available maven search engines : 我建议您在遇到此类问题时使用一种可用的maven搜索引擎:

  • mvnbrowser 多媒体浏览器
  • jarvana 贾瓦纳
  • mvnrepository mvn存储库

the two first having my preference. 两者先有我的偏爱。 Here is what they say about your artifacts : 这是他们对您的文物的评价:

  • maven-jaxb-plugin is available at Apache maven-jaxb-plugin可从Apache获得
  • maven-jaxb2-plugin 0.7.5 is not known. maven-jaxb2-plugin 0.7.5未知。 The most up-to-date version, is 0.7.3 on mvnbrowser and 0.7.4 on jarvana. 最新版本是mvnbrowser上的0.7.3和jarvana上的0.7.4。 which may be the reason why your maven build is broken 这可能是您的Maven构建被破坏的原因
  • jaxb-api 2.2 is available at both JavaNet and JBoss repositories jaxb-api 2.2在JavaNet和JBoss存储库中均可用

Well, wion't do all the job for you, as I guess you get the picture now. 好吧,我不会为您做所有工作,因为我想您现在就知道了。

You can find version 0.7.3 on the Java.net maven repository: 您可以在Java.net Maven存储库中找到版本0.7.3:

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

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