Re: Maven build fails because of empty maven-metadata-central.xml under hudson
Hi, To whom it may concern I would like to update that I seem to be able to work around this issue: In the super pom for all of our projects I've defined the following: ... com.amazonaws aws-java-sdk 1.1.0 commons-httpclient commons-httpclient 3.1 commons-logging commons-logging 1.1 ... This causes maven to pick version 1.1 of commons-logging even without consulting the metadata file :). I would like to mention that this is a hack to get this thing to work but I would obviously like to work for a proper solution on this problem. Thanks, Maxim. On Thu, Dec 2, 2010 at 8:29 PM, Maxim Veksler wrote: > Hi, > > // This email is cross posted to maven-users & hudson-users, Maven seems to > be the issue, but it only reproduces under Hudson environment. > > > First, a quick description of the problem before I drill down into the > details: Our maven projects that depend on > com.amazonaws:aws-java-sdk:jar:1.1.0 fail to build on our linux based Hudson > installation (server is sitting on EC2) because of unsatisfied range > dependency coming from aws-java-sdk -> commons-logging [1.1,2.0). This > happens only on the build server, and reproduces after > several successful builds. On the develop machines this does not happen. > > > The full behavior, and debugging steps are as following. > > We have a super pom that defines: > > > > > > com.amazonaws > aws-java-sdk > 1.1.0 > > > > > > > Then projects (that define the super pom as their parent) define the > dependency on aws-java-sdk in their own pom: > > > > > com.amazonaws > aws-java-sdk > > > > This setup works great and compiles on the development Ubuntu machines. > > On Hudson OTOH the same setup yields different results, once in a while the > build fails with the following error: > > $ mvn install > [INFO] Scanning for projects... > [INFO] > > [INFO] Building mad service online updater > [INFO]task-segment: [install] > > > [INFO] > > > > [INFO] [resources:resources {execution: default-resources}] > > > [INFO] Using 'UTF-8' encoding to copy filtered resources. > > > [INFO] Copying 6 resources > > > [INFO] > > > > [ERROR] BUILD ERROR > > > [INFO] > > > > [INFO] Failed to resolve artifact. > > > > > > No versions are present in the repository for the artifact with a range > [1.1,2.0) > > commons-logging:commons-logging:jar:null > > > > > > from the specified remote repositories: > > > Everything (http://artifactory.eyeviewdigital.com/artifactory/repo), > > > central (http://repo1.maven.org/maven2) > > > > > > Path to dependency: > > > 1) com.eyeview:mad-updater:jar:1.0.0-SNAPSHOT > > > 2) com.amazonaws:aws-java-sdk:jar:1.1.0 > > > After debugging this I came to the conclusion that the reason it fails on > the production build server is because the maven-metadata > for commons-logging get's "emptied" on the build server. > > Here is how the file looks on the build server (I've download it to my > local PC, and was able to successfully reproduce the bug using the .m2 > coming from Hudson): > > ma...@maxim-desktop:~/workspace$ cat > ~/.m2/repository/commons-logging/commons-logging/maven-metadata-Everything.xml > > > commons-logging > commons-logging > > > Here is how it looks on my machine (I've renamed my local .m2 to a > .m2-mine) > ma...@maxim-desktop:~/workspace$ cat > ~/.m2-mine/repository/commons-logging/commons-logging/maven-metadata-Everything.xml > > > > > > > > commons-logging > > > commons-logging > > > 1.1.1 > > > > > > 1.1.1 > > > > > > 1.0 > 1.0.1 > 1.0.2 > 1.0.3 > 1.0.4 > 1.1 > 1.1.1 > > 20071128191817 > > > > You can see that the metadata file is empty, which causes maven to fail to > find a correct match for the dependency version range. > > > The question is:
Re: BUILD ERROR required class is missing: org/apache/maven/shared/model/fileset/FileSet
On Sun, Mar 21, 2010 at 7:22 PM, Wayne Fay wrote: >> Maven is running on Windows7 64bit, installed in C:\Program Files >> (x86)\apache-maven-2.2.1\, and the PATH of the machine includes C:\Program >> Files (x86)\apache-maven-2.2.1\bin > > I can't tell you why exactly FileSet can't be found... but you should > probably redo your install to avoid future issues. Put it in > c:\dev\maven or something without spaces in the directory names. > > Every now and then there's an odd error that pops up on this list like > "unknown protocol: and" due to the and in "C:\Documents and Settings" > etc. Ideally you might also define your local repo cache to be in a > similar no-spaces path via settings.xml. > > Try "mvn -U clean" to force an update of plugins and see if that fixes > your error. > > Wayne Hi Wayne, thanks for helping. Deleting my repository completely and letting maven re-download the whole thing solved the problem. Strange, it's a fresh install of maven... perhaps the tool should add chksum verification for broken jars ? -- Cheers, Maxim Veksler "Free as in Freedom" - Do u GNU ? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
BUILD ERROR required class is missing: org/apache/maven/shared/model/fileset/FileSet
Hello, I'm just starting with Maven. Maven is running on Windows7 64bit, installed in C:\Program Files (x86)\apache-maven-2.2.1\, and the PATH of the machine includes C:\Program Files (x86)\apache-maven-2.2.1\bin I've created a new Maven project from eclipse using m2eclipse. The archetype of the newly created project is maven-archetype-webapp. This is the POM: http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 Test Test war 0.0.1-SNAPSHOT Test Maven Webapp http://maven.apache.org junit junit 3.8.1 test Test Trying to run a simple mvn clean, either from Eclipse or from command line gives the following error: C:\Users\User\test\Test>mvn clean [INFO] Scanning for projects... [INFO] [INFO] Building Test Maven Webapp [INFO]task-segment: [clean] [INFO] - this realm = app0.child-container[org.apache.maven.plugins:maven-clean-plugin:2. 2] urls[0] = file:/C:/Users/User/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar urls[1] = file:/C:/Users/User/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar urls[2] = file:/C:/Users/User/.m2/repository/org/apache/maven/shared/file-management/1.2/file-management-1.2.jar urls[3] = file:/C:/Users/User/.m2/repository/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar Number of imports: 10 import: org.codehaus.classworlds.en...@a6c57a42 import: org.codehaus.classworlds.en...@12f43f3b import: org.codehaus.classworlds.en...@20025374 import: org.codehaus.classworlds.en...@f8e44ca4 import: org.codehaus.classworlds.en...@92758522 import: org.codehaus.classworlds.en...@ebf2705b import: org.codehaus.classworlds.en...@bb25e54 import: org.codehaus.classworlds.en...@bece5185 import: org.codehaus.classworlds.en...@3fee8e37 import: org.codehaus.classworlds.en...@3fee19d8 this realm = plexus.core urls[0] = file:/C:/Program Files (x86)/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar Number of imports: 10 import: org.codehaus.classworlds.en...@a6c57a42 import: org.codehaus.classworlds.en...@12f43f3b import: org.codehaus.classworlds.en...@20025374 import: org.codehaus.classworlds.en...@f8e44ca4 import: org.codehaus.classworlds.en...@92758522 import: org.codehaus.classworlds.en...@ebf2705b import: org.codehaus.classworlds.en...@bb25e54 import: org.codehaus.classworlds.en...@bece5185 import: org.codehaus.classworlds.en...@3fee8e37 import: org.codehaus.classworlds.en...@3fee19d8 - [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-clean-plugin:2.2:clean': Unable to load the mojo 'org.apache.maven.plugins:mavenclean-plugin:2.2:clean' in the plugin 'org.apache.maven.plugins:maven-clean-plugin'. A required class is missing: org/apache/maven/shared/model/fileset/FileSet [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: < 1 second [INFO] Finished at: Sun Mar 21 19:05:24 IST 2010 [INFO] Final Memory: 2M/5M [INFO] ---- What could be the problem? Thank you, Maxim. -- Cheers, Maxim Veksler "Free as in Freedom" - Do u GNU ?