On 05/20/2012 07:29 PM, Ofer Schreiber wrote:
I'm using the regular mvn install command, should I do some changes in the main
pom file?
I think that this is probably a bug in maven, but one that we are
triggering due to the fact that we assign different identifiers to the
repositories used for normal artifacts and the repositories used for
plugins. Can you try the attached patch and let me know if it fixes your
problem?
On 20 May 2012, at 18:54, Juan Hernandez<jhern...@redhat.com> wrote:
On 05/20/2012 04:39 PM, Ofer Schreiber wrote:
I'm trying to build ovirt-engine in Fedora 17, and getting the following error:
[INFO] oVirt Modules - manager ........................... FAILURE [1:05.421s]
....
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-checkstyle-plugin:2.6:check (default) on project
manager-modules: Execution default of goal
org.apache.maven.plugins:maven-checkstyle-plugin:2.6:check failed: Plugin
org.apache.maven.plugins:maven-checkstyle-plugin:2.6 or one of its dependencies
could not be resolved: The following artifacts could not be resolved:
checkstyle:checkstyle:jar:5.0, antlr:antlr:jar:2.7.6,
commons-beanutils:commons-beanutils-core:jar:1.7.0,
com.google.collections:google-collections:jar:0.9: Could not find artifact
checkstyle:checkstyle:jar:5.0 -> [Help 1]
Any idea how can I resolve it?
Are you building with regular "mvn" or with "mvn-rpmbuild"?
If you are using the later you will have to update to checkstyle 5.5 and to
maven-checkstyle-plugin 2.9.1, as those are what are available in Fedora 17. In
addition the gid:aid of checkstyle changed from checkstyle:checkstyle to
com.puppycrawl.tools:checkstyle somewhere between 5.0 and 5.5.
--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
>From 8e961043f8f9d8a7f60882c98e995197584bd572 Mon Sep 17 00:00:00 2001
From: Juan Hernandez <juan.hernan...@redhat.com>
Date: Sun, 20 May 2012 21:11:19 +0200
Subject: [PATCH] core: Use same ids for artifacts and plugins
Currently we use different identifiers for the repositories used
for normal artifacts and the repositories used for plugins. This
may be triggering a bug in maven.
Apparently maven 3 doesn't consider artifacts downloaded from
different repositores to be the same, even if they use the same
gid:aid. Maven creates a _maven.repositories where it stores the
origin of the artifact like this:
checkstyle-5.0.jar>id_of_the_repository=
checkstyle-5.0.pom>id_of_the_repository=
For example, when the checkstyle artifact is downloaded from the
repository with id "maven1.central" the file will contain the
following:
checkstyle-5.0.jar>maven1.repo=
checkstyle-5.0.pom>maven1.repo=
Later when the maven-checkstyle-plugin is downloaded it comes from
the repository with id "central" and apparently it looks for the
checkstyle artifact from repository "central" as well, and it
fails.
This patch changes the root POM to use the same "centra"l"
identifier for both artifacts and plugins.
Change-Id: I5b0236f1dd0a1a18e226a22ed3563c462af90444
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ae8fbf3..8d86479 100644
--- a/pom.xml
+++ b/pom.xml
@@ -247,7 +247,7 @@
</dependencies>
<repositories>
<repository>
- <id>maven.repo1</id>
+ <id>central</id>
<name>maven repo1</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
--
1.7.10.2
_______________________________________________
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel