-
Maven 2 et JDiff
Bonjour,
Je souhaite faire appel au plugin JDiff dans le pom.xml de mon projet avec Maven 2.0.6. Toutefois à chaque fois que je lance la compilation , il ne toruve pas le plugin. Je pense que le problème vient du repository mais je ne vois pas pourquoi car celui utilisée est selui de org.codehaus.mojo comme préconisé par Mojo.
Voiçi mon erreur lors d'un clean du projet sous Maven 2:
C:\tests\sources_merge\ch6b\proficio-0.9\proficio-api>mvn clean
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Proficio API
[INFO] task-segment: [clean]
[INFO] -------------------------------------------------------------------------
---
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: org.codehaus.mojo
ArtifactId: jdiff-maven-plugin
Version: 0.1-SNAPSHOT
Reason: Unable to download the artifact from any repository
org.codehaus.mojo:jdiff-maven-plugin:pom:0.1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Apr 23 17:30:23 CEST 2007
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------
et voiçi le source pom.xml de mon projet: (c'est l'exemple du chapitre 6 proficio de Better Build with Maven 2) :
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>proficio-api</artifactId>
<packaging>jar</packaging>
<name>Proficio API</name>
<scm>
<connection>scm:local|C:/tests/sources_merge/ch6b/proficio-0.9|proficio-api</connection>
<developerConnection>scm:local|C:/tests/sources_merge/ch6b/proficio-0.9|proficio-api</developerConnection>
<url> scm:local|C:/tests/sources_merge/ch6b/proficio-0.9|proficio-api </url>
</scm>
<dependencies>
<dependency>
<groupId>com.mergere.mvnbook.proficio</groupId>
<artifactId>proficio-model</artifactId>
</dependency>
<dependency>
<groupId>jdiff-maven-plugin</groupId>
<artifactId>jdiff-maven-plugin</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdiff-maven-plugin</artifactId>
<version>0.1-SNAPSHOT</version>
<configuration>
<packages>org.apache.maven</packages>
<oldTag>0.8</oldTag>
<newTag>CURRENT</newTag>
</configuration>
</plugin>
</plugins>
</reporting>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdiff-maven-plugin</artifactId>
<version>0.1-SNAPSHOT</version>
<configuration>
<packages>org.apache.maven</packages>
<oldTag>0.8</oldTag>
<newTag>CURRENT</newTag>
</configuration>
</plugin>
</plugins>
</build>
</project>
Merci d'avance!!
-
Tu dois utiliser le SNAPSHOT repository du projet mojo : http://mojo.codehaus.org/using-sandbox-plugins.html
-
Bonjour,
Merci de votre réponse, mais en vérifiant les plugins de ce repository j'ai remarqué que JDiff n'y figuerait pas... J'ai l'impression que ce plugin n'est plus disponible pour Maven 2. En effet, même en utilisant un fichie de profile profiles.xml indiquant les repositories à utiliser, le plugin jdiff-maven-plugin-1.0-SNAPSHOT ne semble pas présent, à moin qu'il y est vraiment quelque chose qui m'échappe...
voiçi la trace au cas où:
C:\tests\sources_merge\ch6b\proficio-0.9\proficio-api>mvn clean -Pprofiles
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Proficio API
[INFO] task-segment: [clean]
[INFO] -------------------------------------------------------------------------
---
[INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for update
s from Codehaus Snapshots
Downloading: http://snapshots.repository.codehaus...s/mojo/jdiff-m
aven-plugin/0.1-SNAPSHOT/jdiff-maven-plugin-0.1-SNAPSHOT.pom
Downloading: http://snapshots.repository.codehaus...s/mojo/jdiff-m
aven-plugin/0.1-SNAPSHOT/jdiff-maven-plugin-0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: org.codehaus.mojo
ArtifactId: jdiff-maven-plugin
Version: 0.1-SNAPSHOT
Reason: Unable to download the artifact from any repository
org.codehaus.mojo:jdiff-maven-plugin:pom:0.1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
Codehaus Snapshots (http://snapshots.repository.codehaus.org/)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Tue Apr 24 08:46:31 CEST 2007
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------
Encore merci!
-
Je viens de déployer une snapshot
-
Merci beaucoup ca marche impec;)
Bonne continuation!