views:

27

answers:

1

I have added a bunch of artifacts to my local Nexus Maven repository.
When I build my project I get the following error:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building pronto-web Java EE 6 Webapp
[INFO] task-segment: [verify]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO] [compiler:compile {execution: default-compile}]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Source\Pronto\pronto\pronto-web\target\classes
[INFO] [antrun:run {execution: remove-javax}]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] [gwt:compile {execution: default}]
[INFO] using GWT jars from project dependencies : 20100714-SNAPSHOT
[WARNING] You should not declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
Downloading: http ://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] artifact not found - 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.google.gwt -DartifactId=gwt-dev -Dversion=20100714-20100715.053026-1 -Dclassifier=windows -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.gwt -DartifactId=gwt-dev >-Dversion=20100714-20100715.053026-1 -Dclassifier=windows -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

com.google.gwt:gwt-dev:jar:20100714-20100715.053026-1

from the specified remote repositories:
releases (http://mercury:8980/nexus/content/groups/public),
all (http://mercury:8980/nexus/content/groups/all),
snapshots (http://mercury:8980/nexus/content/groups/public-snapshots)

http ://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Thu Jul 15 08:57:29 CEST 2010
[INFO] Final Memory: 50M/614M
[INFO] ------------------------------------------------------------------------

Has anyone an idea why maven thinks there should be '-windows' added to the artifact name? (Downloading: http ://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar)

If I browse the repository it contains the artifact but without the '-windows' suffix.

Older versions of this artifact were platform dependent and had 'windows' or 'linux' or 'mac' as classifier but recent versions are platform independent and I don't have any such classifier in my poms.

PS: I added a space in each URL between the protocol and the colon because I didn't yet receive enough reputation to post links.

+2  A: 

The following dependency must be declared somewhere, very likely as a transitive dependency:

<dependency>
  <groupId>com.google.gwt</groupId>
  <artifactId>gwt-dev</artifactId>
  <version>20100714-SNAPSHOT</version>
  <classifier>windows</classifier>
<dependency>

I suspect a bad pom if artifacts are not platform dependent anymore.

Is there any more recent snapshot you can use?

Pascal Thivent
Thank you Pascal and Lexicore for your quick responses. I am sure there never was such classifiere element anywhere in the artifacts I deployed to the repository nor in my projects pom (only in some older versions in public repositories). I deleted the com/google subdirectory in my local .m2 directory just in case and now the problem vanished.Maybe I should just have renamed it to have it available for further investigation but didn't expect that this really solves the problem.
After some maven configuration changes, artifact updates and switch to Maven 3 I had this error again. Cleaning the .m2 directory did not work this time.It seems, that the gwt-maven-plugin caused this error.I updated it from 1.2 to 1.3-SNAPSHOT and now the error is gone again.
@devde: Comparing the poms of both versions of the plugin would be interesting. But it's weird anyway. And maybe you should post this comment as answer and accept it.
Pascal Thivent