users@jaxb.java.net

Re: Maven2 plugins from the repo

From: William Simons <William.Simons_at_childrens.harvard.edu>
Date: Tue, 29 Aug 2006 10:11:45 -0400

This still doesn't work for me either. I get the following error:


Downloading:
https://maven-repository.dev.java.net/nonav/repository/com.sun.tools.xjc.mav
en2/poms/maven-jaxb-plugin-1.0-SNAPSHOT.pom
Downloading:
https://maven-repository.dev.java.net/nonav/repository/com.sun.tools.xjc.mav
en2/maven-plugins/maven-jaxb-plugin-1.0-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check
that the goal name is correct: Unable to locate resource in repository

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=com.sun.tools.xjc.maven2
-DartifactId=maven-jaxb-plugin \
        -Dversion=1.0-SNAPSHOT -Dpackaging=maven-plugin -Dfile=/path/to/file


  com.sun.tools.xjc.maven2:maven-jaxb-plugin:maven-plugin:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  maven2-repository.dev.java.net
(https://maven2-repository.dev.java.net/nonav/repository),
  maven-repository.dev.java.net
(https://maven-repository.dev.java.net/nonav/repository)

  com.sun.tools.xjc.maven2:maven-jaxb-plugin:maven-plugin:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  maven2-repository.dev.java.net
(https://maven2-repository.dev.java.net/nonav/repository),
  maven-repository.dev.java.net
(https://maven-repository.dev.java.net/nonav/repository)

https://maven-repository.dev.java.net/nonav/repository/com.sun.tools.xjc.mav
en2/maven-plugins/maven-jaxb-plugin-1.0-SNAPSHOT.jar




Not sure why its looking for the 1.0-SNAPSHOT version of the jar as its not
specified anywhere in my pom (below).




This is my "effective-pom":

<?xml version="1.0"?><project>
  <parent>
    <artifactId>ping-model</artifactId>
    <groupId>org.chip.ping</groupId>
    <version>3.0-beta-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.chip.ping</groupId>
  <artifactId>ping-model-core</artifactId>
  <name>PING Model - Core</name>
  <version>3.0-beta-SNAPSHOT</version>
  <url>http://ping.chip.org/ping-model/ping-model-core</url>
  <scm>
    
<connection>scm:svn:https://cvs.chip.org/svn/repos/ping/trunk/ping-model/pin
g-model-core</connection>
    
<developerConnection>scm:svn:https://cvs.chip.org/svn/repos/ping/trunk/ping-
model/ping-model-core</developerConnection>
  </scm>
  <build>
    
<sourceDirectory>/Users/bsimons/projects/svn/ping/model/core/src/main/java</
sourceDirectory>
    <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
    
<testSourceDirectory>/Users/bsimons/projects/svn/ping/model/core/src/test/ja
va</testSourceDirectory>
    
<outputDirectory>/Users/bsimons/projects/svn/ping/model/core/target/classes<
/outputDirectory>
    
<testOutputDirectory>/Users/bsimons/projects/svn/ping/model/core/target/test
-classes</testOutputDirectory>
    <resources>
      <resource>
        
<directory>/Users/bsimons/projects/svn/ping/model/core/src/main/resources</d
irectory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        
<directory>/Users/bsimons/projects/svn/ping/model/core/src/test/resources</d
irectory>
      </testResource>
    </testResources>
    
<directory>/Users/bsimons/projects/svn/ping/model/core/target</directory>
    <finalName>ping-model-core-3.0-beta-SNAPSHOT</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <includes>
            <include>org/chip/ping/xml/**</include>
          </includes>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagBase>https://cvs.chip.org/svn/repos/ping/tags</tagBase>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            
<descriptor>src/main/assembly/assembly-multi-module.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <includes>
            <include>org/chip/ping/xml/**</include>
          </includes>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.sun.tools.xjc.maven2</groupId>
        <artifactId>maven-jaxb-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <catalog>src/main/resources/catalog.cat</catalog>
          <extension>true</extension>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-help-plugin</artifactId>
        <version>2.0.1</version>
      </plugin>
    </plugins>
  </build>
  <repositories>
    <repository>
      <id>chip.org</id>
      <name>CHIP Maven Repository</name>
      <url>http://ping.chip.org/maven</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Repository Switchboard</name>
      <url>http://repo1.maven.org/maven2</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>maven2-repository.dev.java.net</id>
      <url>https://maven2-repository.dev.java.net/nonav/repository</url>
    </pluginRepository>
    <pluginRepository>
      <id>maven-repository.dev.java.net</id>
      <url>https://maven-repository.dev.java.net/nonav/repository</url>
      <layout>legacy</layout>
    </pluginRepository>
    <pluginRepository>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Plugin Repository</name>
      <url>http://repo1.maven.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>
  <dependencies>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.0.2</version>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.0</version>
    </dependency>
  </dependencies>
  <reporting>
    <outputDirectory>target/site</outputDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <configuration>
          <rulesets>
            <ruleset>/rulesets/basic.xml</ruleset>
          </rulesets>
          <format>xml</format>
          <linkXref>true</linkXref>
          <sourceEncoding>utf-8</sourceEncoding>
          <minimumTokens>100</minimumTokens>
          <targetJdk>1.5</targetJdk>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
</project>


On 8/28/06 6:50 AM, "Aleksei Valikov" <valikov_at_gmx.net> wrote:

> Hi.
>>> That's what I have in the pom.xml of the project:
>>>
>>> ....
>>> <repositories>
>>> <repository>
>>> <id>maven2-repository.dev.java.net</id>
>>>
>>> <url>https://maven2-repository.dev.java.net/nonav/repository/</url>
>>> </repository>
>>> <repository>
>>> <id>maven-repository.dev.java.net</id>
>>>
>>> <url>https://maven-repository.dev.java.net/nonav/repository/</url>
>>> <layout>legacy</layout>
>>> </repository>
>>> </repositories>
>>> <build>
>>> <defaultGoal>install</defaultGoal>
>>> </build>
>>> </project>
>>
>>
>> I just tried mine and it works ok (my pom.xml have not the final slash):
>> <url>https://maven2-repository.dev.java.net/nonav/repository</url>
>>
>> I hope you are not behind a proxy ?
>> The "https" may not work if you are.
>
> I've found out, what it was. The problem is that I needed to specify
> pluginRepositories/pluginRepository in the pom.xml:
> <pluginRepositories>
> <pluginRepository>
> <id>maven2-repository.dev.java.net</id>
> <url>https://maven2-repository.dev.java.net/nonav/repository</url>
> </pluginRepository>
> <pluginRepository>
> <id>maven-repository.dev.java.net</id>
> <url>https://maven-repository.dev.java.net/nonav/repository</url>
> <layout>legacy</layout>
> </pluginRepository>
> </pluginRepositories>
>
> Bye.
> /lexi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>