1

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. 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

niklassaers
  • 8,480
  • 20
  • 99
  • 146

2 Answers2

0

I suggest you use, when facing such a problem, one of the available maven search engines :

  • mvnbrowser
  • jarvana
  • mvnrepository

the two first having my preference. Here is what they say about your artifacts :

  • maven-jaxb-plugin is available at Apache
  • maven-jaxb2-plugin 0.7.5 is not known. The most up-to-date version, is 0.7.3 on mvnbrowser and 0.7.4 on jarvana. which may be the reason why your maven build is broken
  • jaxb-api 2.2 is available at both JavaNet and JBoss repositories

Well, wion't do all the job for you, as I guess you get the picture now.

Riduidel
  • 22,052
  • 14
  • 85
  • 185
  • mvnbrowser is my usual as well. You're right about the version, but it turned out that the pom I got contained a "301 Moved Permanently" HTMl error page, not the correct contents at all. So I've manually downloaded it and put it in its right place. That's not really a resolution, though, so I suspect I'm using the wrong repository, but I cannot find out what repository I *should* be using – niklassaers Dec 15 '10 at 08:41
  • @niklassaers It may be because you use a team proxy. First remove existing entries in your .m2/repository, then go check if your settings (both project and user ones ... at .m2/settings.xml) if a proxy is defined. If so, you'll havve to find a login on that site (Nexus, Archiva, Artifactory), and go check if proxied repositories are corrects. – Riduidel Dec 15 '10 at 09:00
0

You can find version 0.7.3 on the Java.net maven repository:

Alois Cochard
  • 9,812
  • 2
  • 29
  • 30