Maven command line throwing ArrayIndexOutOfBoundsException on adding Avro dependency - maven

I'm new to Maven and installed 3.5.0 in Windows 64 bit machine. I have added Avro dependency in pom.xml as specified in https://avro.apache.org/docs/1.8.2/gettingstartedjava.html. I am facing Build failure and getting ArrayIndexOutOfBoundsException when doing mvn clean compile from the command line:
[DEBUG] =======================================================================
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.147 s
[INFO] Finished at: 2017-06-29T10:56:16-05:00
[INFO] Final Memory: 6M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] 53090
java.lang.ArrayIndexOutOfBoundsException: 53090
at org.codehaus.plexus.util.xml.pull.MXParser.parsePI(MXParser.java:2502
)
at org.codehaus.plexus.util.xml.pull.MXParser.parseEpilog(MXParser.java:
1604)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:143
4)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.j
ava:3856)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.j
ava:595)
at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.
java:109)
at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.
java:82)
at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultMod
elProcessor.java:81)
at org.apache.maven.model.building.DefaultModelBuilder.readModel(Default
ModelBuilder.java:535)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExterna
lly(DefaultModelBuilder.java:1097)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(Defaul
tModelBuilder.java:829)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultMode
lBuilder.java:331)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:321)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
readArtifactDescriptor(DefaultArtifactDescriptorReader.java:199)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCa
chedArtifactDescriptor(DefaultDependencyCollector.java:544)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifa
ctDescriptorResult(DefaultDependencyCollector.java:528)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
pendency(DefaultDependencyCollector.java:418)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
pendency(DefaultDependencyCollector.java:372)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(D
efaultDependencyCollector.java:360)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.doRecurse
(DefaultDependencyCollector.java:513)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
pendency(DefaultDependencyCollector.java:467)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
pendency(DefaultDependencyCollector.java:372)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(D
efaultDependencyCollector.java:360)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDe
pendencies(DefaultDependencyCollector.java:263)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDepen
dencies(DefaultRepositorySystem.java:325)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:169)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:195)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
veProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAr
eResolved(MojoExecutor.java:246)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
[ERROR]
Below is the pom.xml file which I am using:
<project xmlns="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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Test</groupId>
<artifactId>Trail</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
</project>

See https://issues.apache.org/jira/browse/MNG-6216 for all the details.
In short: while downloading the pom, the file got corrupt. For some reason extra content is added after the closing tag, making it not a valid xml file. Maven 3.3.9 and before ignored all data afterwards, 3.5.0 is more strict. There are 2 simple solutions: remove your local repository or use maven 3.3.9
Where's still looking for the cause of this issue. It is probably there for a long time but it was never an issue.
You could check the pom of avro, because that one is causing the issue or one of its dependencies.

Related

OpenLiberty features repository-resolver install-map

I am getting below error for both install-map and repository-resolver. Could you please provide any pointers to resolve this.
[DEBUG] Could not find metadata io.openliberty.features:install-map/maven-metadata.xml in local
[DEBUG] Skipped remote request for io.openliberty.features:install-map/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find override bundle io.openliberty.features:install-map for the current Open Liberty version 21.0.0.5
io.openliberty.tools.common.plugins.util.PluginExecutionException: org.apache.maven.plugin.MojoExecutionException: Could not get the highest version from the range: [21.0.0.5, 21.0.0.6)
at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact(InstallFeatureSupport.java:86)
at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.downloadOverrideJar(InstallFeatureUtil.java:622)
at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.loadInstallJarFile(InstallFeatureUtil.java:108)
at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init>(InstallFeatureUtil.java:91)
at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init>(InstallFeatureSupport.java:48)
at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil(InstallFeatureSupport.java:165)
at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures(InstallFeatureMojo.java:56)
at io.openliberty.tools.maven.server.InstallFeatureMojo.doExecute(InstallFeatureMojo.java:48)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:122)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:119)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo(StartDebugMojoSupport.java:227)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoInstallFeature(StartDebugMojoSupport.java:221)
at io.openliberty.tools.maven.server.DevMojo.doExecute(DevMojo.java:705)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:122)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not get the highest version from the range: [21.0.0.5, 21.0.0.6)
at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact(AbstractLibertySupport.java:234)
at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact(AbstractLibertySupport.java:158)
at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact(AbstractLibertySupport.java:209)
at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact(InstallFeatureSupport.java:84)
... 36 more
Caused by: org.eclipse.aether.resolution.VersionRangeResolutionException: Unable to resolve version range fram io.openliberty.features:install-map:jar:[21.0.0.5, 21.0.0.6)
at io.openliberty.tools.maven.AbstractLibertySupport.resolveVersionRange(AbstractLibertySupport.java:335)
at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact(AbstractLibertySupport.java:232)
... 39 more
[DEBUG] io.openliberty.features:features:21.0.0.5 is resolved from project repositories.
At the end I am getting the below error
Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.2.4:dev (default-cli) on project wagematchservices: An invocation of the springBootUtility command failed. The command is not available on the targeted Liberty runtime. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.2.4:dev (default-cli) on project wagematchservices: An invocation of the springBootUtility command
Below is my pom
<project xmlns="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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<relativePath />
<!-- lookup parent from repository -->
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<groupId></groupId>
<artifactId></artifactId>
<version>0.0.1-SNAPSHOT</version>
<name></name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>install-map</artifactId>
<version>18.0.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.6.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<appsDirectory>apps</appsDirectory>
<installAppPackages>spring-boot-project</installAppPackages>
</configuration>
</plugin>
</plugins>
</build>
</project>
The install-map and repository-resolver debug messages can be safely ignored and there is no need to include the install-map dependency in pom.xml. Those artifacts are only needed if using an old version of Open Liberty (specifically, 18.0.0.2). The following issue will address removing/improving those messages: https://github.com/OpenLiberty/ci.maven/issues/1142
To use Liberty dev mode with a Spring Boot application, see the steps provided in https://github.com/OpenLiberty/ci.maven/issues/1143#issuecomment-845241015 which will be added to the documentation.

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

I am new to Selenium Testing. While I am trying to build my project, I am getting the below error. I tried searching through the stack overflow questions multiple times, but not able to figure out an actual solution to my issue.
Sharing my pom.xml below:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>WebDriverTest</groupId>
<artifactId>WebDriverTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.20</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
</dependency>
</dependencies>
<!-- <build> <plugins> <plugin> <groupId>org.apache.maven.plugin</groupId>
<artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version>
</plugin> </plugins> </build> -->
</project>
The exception trace I am receiving is shown below
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project WebDriverTest: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project WebDriverTest: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.close(ForkClient.java:257)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:301)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:116)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:740)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAllProviders(AbstractSurefireMojo.java:682)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:648)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:586)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
I suspect another reason for my build failure was that one of my jars was corrupt.
I was getting an exception "invalid LOC header (bad signature)" for org.testng.testng jar inside .m2 folder.
I deleted the jar, and ran the maven build again. And the project became success.
A part of build trace is given below:
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # WebDriverTest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # WebDriverTest ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # WebDriverTest ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Users\celin\eclipse-workspace\WebDriverTest\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # WebDriverTest ---
[INFO] Surefire report directory: C:\Users\celin\eclipse-workspace\WebDriverTest\target\surefire-reports

Build fails periodically after upgrading to latest selenium version

Recently we upgraded to the latest selenium version 3.4.0. Though after POM update everything worked fine, but after a few successful build, build errors started cropping up without any apparent change in our code or the POM.
Here's how my POM looks like:
<project xmlns="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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ssssss.fffff.xxxxxx</groupId>
<artifactId>xxxxxx-xxxxxx-portal</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>machine-learning-selenium</artifactId>
<description>Automated Web Testing</description>
<packaging>jar</packaging>
<name>Automated Selenium Test</name>
<properties>
<selenium.version>3.4.0</selenium.version>
</properties>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
<version>2.0.0-m19</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>2.0.0-m19</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.16.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.10.Final</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
<version>9.4.5.v20170502</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>3.4.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
</plugin>
</plugins>
</build>
When I do a clean install, here's what it throws in the console:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.411 s
[INFO] Finished at: 2017-06-23T14:28:46+05:30
[INFO] Final Memory: 38M/439M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project automated-selenium: Could not resolve dependencies for project com.xxxxx.yyyy.zzzzz:automated-selenium:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.seleniumhq.selenium:selenium-server:jar:3.4.0 -> org.seleniumhq.selenium:selenium-java:jar:3.4.0 -> org.seleniumhq.selenium:htmlunit-driver:jar:2.26 -> org.seleniumhq.selenium:selenium-api:jar:[3.3.1,4.0.0): No versions available for org.seleniumhq.selenium:selenium-api:jar:[3.3.1,4.0.0) within specified range -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project automated-selenium: Could not resolve dependencies for project com.xxxxx.yyyy.zzzzz:automated-selenium:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.seleniumhq.selenium:selenium-server:jar:3.4.0 -> org.seleniumhq.selenium:selenium-java:jar:3.4.0 -> org.seleniumhq.selenium:htmlunit-driver:jar:2.26 -> org.seleniumhq.selenium:selenium-api:jar:[3.3.1,4.0.0)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.xxxxx.yyyy.zzzzz:automated-selenium:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.seleniumhq.selenium:selenium-server:jar:3.4.0 -> org.seleniumhq.selenium:selenium-java:jar:3.4.0 -> org.seleniumhq.selenium:htmlunit-driver:jar:2.26 -> org.seleniumhq.selenium:selenium-api:jar:[3.3.1,4.0.0)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:180)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 23 more
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.seleniumhq.selenium:selenium-server:jar:3.4.0 -> org.seleniumhq.selenium:selenium-java:jar:3.4.0 -> org.seleniumhq.selenium:htmlunit-driver:jar:2.26 -> org.seleniumhq.selenium:selenium-api:jar:[3.3.1,4.0.0)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:291)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
... 24 more
Caused by: org.eclipse.aether.resolution.VersionRangeResolutionException: No versions available for org.seleniumhq.selenium:selenium-api:jar:[3.3.1,4.0.0) within specified range
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.filterVersions(DefaultDependencyCollector.java:648)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:394)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.doRecurse(DefaultDependencyCollector.java:504)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:458)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.doRecurse(DefaultDependencyCollector.java:504)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:458)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.doRecurse(DefaultDependencyCollector.java:504)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:458)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
... 26 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
The same issue happens when I run it via jenkins.
I have tried doing the following:
Removed the .m2 repository and rebuilt
Freshly build the project after re-exporting in eclipse (though the problem is not with eclipse)
Forced update while build
Performed a maven update on the project
None worked!
I think in your pom artifactId is selenium-api it should be selenium-java.
Refer below:
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
Here is the Answer to your Question:
The error says it all :
Failed to collect dependencies at org.seleniumhq.selenium:selenium-server:jar:3.4.0 -> org.seleniumhq.selenium:selenium-java:jar:3.4.0 -> org.seleniumhq.selenium:selenium-api:jar:[3.3.1,4.0.0)
As you are using the selenium-server dependency in your pom.xml as follows:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.4.0</version>
</dependency>
The Selenium Documentation here clearly mentions that
The selenium-server artifact has a dependency to the servlet-api-3.1.0 artifact, which you should exclude, if your project will be run inside a web application container.
Adding the servlet-api-3.1.0 artifact will solve your issue.
Let me know if this Answers your Question.

Hudson 3.1.0 + Maven 2.2.1 + sonar 3.7.3 [ERROR] loader constraint violation: when resolving field "VISIBLE"

My project is using the following tools:
Hudson 3.1.0
Maven 2.2.1
sonar 3.7.3
I'm trying to build my project with Hudson, but I'm stuck with whats appear to be a Sonar issue:
When I ask for Hudson to build my project, I receive the following error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Wed Nov 13 15:39:46 BRST 2013
[INFO] Final Memory: 30M/347M
[INFO] ------------------------------------------------------------------------
channel stopped
[WARNINGS] Parsing warnings in console log with parser Java Compiler (Eclipse)
[workspace] $ /usr/share/maven2/bin/mvn -f /home/hudson/hudson-opt/jobs/TutorialSpring/workspace/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=org.postgresql.Driver -Dsonar.jdbc.url=jdbc:postgresql://localhost/sonar ******** ******** -Dsonar.host.url=http://xxxxxxx:9000 ******** ********
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] Ignoring available plugin update: 2.1 as it requires Maven version 3.0
[INFO] Ignoring available plugin update: 2.0 as it requires Maven version 3.0
[INFO] Ignoring available plugin update: 2.0-beta-2 as it requires Maven version 3.0
[INFO] Ignoring available plugin update: 2.0-beta-1 as it requires Maven version 3.0
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - org.springframework.samples.service.service:MYPROJECT:war:0.0.1-SNAPSHOT
[INFO] task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar {execution: default-cli}]
[INFO] Sonar host: http://xxxxxx:9000
[INFO] Sonar version: 3.7.3
[INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:3.7.3:sonar
Downloading: http://repo1.maven.org/maven2/org/codehaus/sonar/sonar-maven-plugin/3.7.3/sonar-maven-plugin-3.7.3.pom
1K downloaded (sonar-maven-plugin-3.7.3.pom)
Downloading: http://repo1.maven.org/maven2/org/codehaus/sonar/sonar/3.7.3/sonar-3.7.3.pom
47K downloaded (sonar-3.7.3.pom)
Downloading: http://repo1.maven.org/maven2/org/codehaus/sonar/sonar-maven-plugin/3.7.3/sonar-maven-plugin-3.7.3.jar
7K downloaded (sonar-maven-plugin-3.7.3.jar)
Downloading: http://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.pom
2K downloaded (junit-4.10.pom)
Downloading: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.pom
481b downloaded (hamcrest-core-1.1.pom)
Downloading: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-parent/1.1/hamcrest-parent-1.1.pom
5K downloaded (hamcrest-parent-1.1.pom)
[INFO] [sonar:sonar {execution: default-sonar}]
INFO: Default locale: "pt_BR", source code encoding: "UTF-8"
INFO: Work directory: /home/hudson/hudson-opt/jobs/TutorialSpring/workspace/target/sonar
INFO: SonarQube Server 3.7.3
[INFO] [15:39:50.891] Load batch settings
[INFO] [15:39:51.007] User cache: /usr/share/tomcat7/.sonar/cache
[INFO] [15:39:51.010] Install plugins
[INFO] [15:39:51.018] Download sonar-findbugs-plugin-1.3.jar
[INFO] [15:39:51.370] Download sonar-jacoco-plugin-1.3.jar
[INFO] [15:39:51.405] Download sonar-l10n-en-plugin-3.7.3.jar
[INFO] [15:39:51.410] Download sonar-maven-batch-plugin-3.7.3.jar
[INFO] [15:39:51.414] Download sonar-surefire-plugin-1.3.jar
[INFO] [15:39:51.419] Download sonar-cpd-plugin-3.7.3.jar
[INFO] [15:39:51.425] Download sonar-checkstyle-plugin-1.3.jar
[INFO] [15:39:51.500] Download sonar-pmd-plugin-1.3.jar
[INFO] [15:39:51.598] Download sonar-java-plugin-1.3.jar
[INFO] [15:39:51.606] Download sonar-core-plugin-3.7.3.jar
[INFO] [15:39:51.621] Download sonar-dbcleaner-plugin-3.7.3.jar
[INFO] [15:39:51.626] Download sonar-squid-java-plugin-1.3.jar
[INFO] [15:39:51.687] Download sonar-email-notifications-plugin-3.7.3.jar
[INFO] [15:39:51.724] Download sonar-design-plugin-3.7.3.jar
[INFO] [15:39:51.848] Install JDBC driver
[INFO] [15:39:51.867] Create JDBC datasource for jdbc:postgresql://localhost/sonar
[INFO] [15:39:52.947] Initializing Hibernate
[INFO] [15:39:55.446] Load project settings
[INFO] [15:39:55.484] Apply project exclusions
[INFO] [15:39:55.671] ------------- Scan Unnamed - org.springframework.samples.service.service:MYPROJECT:war:0.0.1-SNAPSHOT
[INFO] [15:39:55.675] Load module settings
[ERROR] loader constraint violation: when resolving field "VISIBLE" the class loader (instance of org/sonar/runner/impl/IsolatedClassloader) of the referring class, org/apache/commons/io/filefilter/HiddenFileFilter, and the class loader (instance of org/codehaus/classworlds/RealmClassLoader) for the field's resolved type, r, have different Class objects for that type
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar
Embedded error: loader constraint violation: when resolving field "VISIBLE" the class loader (instance of org/sonar/runner/impl/IsolatedClassloader) of the referring class, org/apache/commons/io/filefilter/HiddenFileFilter, and the class loader (instance of org/codehaus/classworlds/RealmClassLoader) for the field's resolved type, r, have different Class objects for that type
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.plugin.MojoExecutionException: loader constraint violation: when resolving field "VISIBLE" the class loader (instance of org/sonar/runner/impl/IsolatedClassloader) of the referring class, org/apache/commons/io/filefilter/HiddenFileFilter, and the class loader (instance of org/codehaus/classworlds/RealmClassLoader) for the field's resolved type, r, have different Class objects for that type
at org.sonar.maven.ExceptionHandling.handle(ExceptionHandling.java:37)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:175)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
... 21 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving field "VISIBLE" the class loader (instance of org/sonar/runner/impl/IsolatedClassloader) of the referring class, org/apache/commons/io/filefilter/HiddenFileFilter, and the class loader (instance of org/codehaus/classworlds/RealmClassLoader) for the field's resolved type, r, have different Class objects for that type
at org.sonar.batch.scan.filesystem.DefaultModuleFileSystem.<clinit>(DefaultModuleFileSystem.java:51)
at org.sonar.batch.scan.filesystem.ModuleFileSystemProvider.provide(ModuleFileSystemProvider.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1033)
at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1025)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:187)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:182)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:175)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:156)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:144)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
... 23 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Wed Nov 13 15:39:55 BRST 2013
[INFO] Final Memory: 37M/350M
[INFO] ------------------------------------------------------------------------
Sonar analysis completed: FAILURE
Below you can find my Pom.xml of my project:
<project xmlns="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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.samples.service.service</groupId>
<artifactId>MYPROJECT</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<!-- Generic properties -->
<java.version>1.6</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Web -->
<jsp.version>2.2</jsp.version>
<jstl.version>1.2</jstl.version>
<servlet.version>2.5</servlet.version>
<!-- Spring -->
<spring-framework.version>3.2.3.RELEASE</spring-framework.version>
<!-- Hibernate / JPA -->
<hibernate.version>4.2.2.Final</hibernate.version>
<!-- Logging -->
<logback.version>1.0.13</logback.version>
<slf4j.version>1.7.5</slf4j.version>
<!-- Test -->
<junit.version>4.11</junit.version>
</properties>
<dependencies>
<!-- Spring MVC -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<!-- Other Web dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>${jsp.version}</version>
<scope>provided</scope>
</dependency>
<!-- Spring and Transactions -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<!-- Logging with SLF4J & LogBack -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.0.1.Final</version>
</dependency>
<!-- Test Artifacts -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring-framework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<!-- Other Artifacts -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
I saw at the codehaus a similiar a issue from 2011 with the same problem, but it seems the solutions didnt worky (link for the issue):
What I did:
I lookup for the lib commons-io:
$find . -name commons-io* 2> /dev/null
./usr/share/java/commons-io-1.4.jar
./usr/share/java/commons-io.jar
./usr/share/tomcat7/.sonar/cache/7f97854dc04c119d461fed14f5d8bb96/commons-io-2.4.jar
./usr/share/maven-repo/commons-io
./usr/share/maven-repo/commons-io/commons-io
./usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.jar
./usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.pom
./usr/share/maven-repo/commons-io/commons-io/debian/commons-io-debian.jar
./usr/share/maven-repo/commons-io/commons-io/debian/commons-io-debian.pom
./home/sonar/lib/commons-io-2.4.jar
./home/sonar/war/sonar-server/WEB-INF/lib/commons-io-2.4.jar
./home/sonar-3.7.3/sonar-3.7.3/lib/commons-io-2.4.jar
./home/sonar-3.7.3/sonar-3.7.3/war/sonar-server/WEB-INF/lib/commons-io-2.4.jar
./home/hudson/hudson-opt/plugins/maven-plugin/WEB-INF/lib/commons-io-2.0.1.jar
./home/hudson/hudson-opt/plugins/artifactory/WEB-INF/lib/commons-io-2.0.1.jar
./home/hudson/hudson-opt/plugins/warnings/WEB-INF/lib/commons-io-2.2.jar
./home/hudson/public_html_back/WEB-INF/lib/commons-io-2.0.1.jar
./home/hudson/public_html/WEB-INF/lib/commons-io-2.0.1.jar
make a backup of:
$cp ./home/sonar/lib/commons-io-2.4.jar ./home/sonar/lib/commons-io-2.4.jar_back
$cp ./home/sonar/war/sonar-server/WEB-INF/lib/commons-io-2.4.jar ./home/sonar/war/sonar-server/WEB-INF/lib/commons-io-2.4.jar
them I put a old version of commons-io lib at the sonar lib folder:
$cp ./home/hudson/hudson-opt/plugins/artifactory/WEB-INF/lib/commons-io-2.0.1.jar ./home/sonar/lib/
$sudo /etc/init.d/sonar restart
When I saw that this dindt work I repeat those steps for the librarys: commons-io-2.2.jar and commons-io-1.4.jar
No luck until now :(
The following thread should help: http://sonarqube.15.x6.nabble.com/SonarQube-3-7-3-failing-to-process-java-projects-td5018320.html

Maven build issue - Connection to repository refused

I wish to import, change, rebuild, test and push/check-in my changes to the code available in this Github repository
Currently, I do not wish to use any IDE or plug-ins for this purpose.
I installed Maven on my Windows machine and as proceeded as per the installation instructions as shown below :
C:\Documents and Settings\298790\My Documents\Downloads\seismichadoop-master>mvn
-X package
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:
28+0530)
Maven home: D:\Omkar\Development\Softwares\Tools\apache-maven-3.0.5
Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_20\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from D:\Omkar\Development\Softwares\Tools\apache
-maven-3.0.5\conf\settings.xml
[DEBUG] Reading user settings from C:\Documents and Settings\298790\.m2\settings
.xml
[DEBUG] Using local repository at C:\Documents and Settings\298790\.m2\repositor
y
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Doc
uments and Settings\298790\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.cloudera.seismic:seismic:jar:0.1.0: (no
ne)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.co
re, parent: null]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.cloudera.seismic:seismic:jar:0.1.0
[DEBUG] Tasks: [package]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building seismic 0.1.0
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-so
urces, generate-resources, process-resources, compile, process-classes, generate
-test-sources, process-test-sources, generate-test-resources, process-test-resou
rces, test-compile, process-test-classes, test, prepare-package, package, pre-in
tegration-test, integration-test, post-integration-test, verify, install, deploy
]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo
.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
resources-plugin/2.5/maven-resources-plugin-2.5.pom
[DEBUG] Writing resolution tracking file C:\Documents and Settings\298790\.m2\re
pository\org\apache\maven\plugins\maven-resources-plugin\2.5\maven-resources-plu
gin-2.5.pom.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.573s
[INFO] Finished at: Fri May 24 12:05:55 IST 2013
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its
dependencies could not be resolved: Failed to read artifact descriptor for org.
apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact
org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http:/
/repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refus
ed: Connection timed out: connect -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugi
ns:maven-resources-plugin:2.5 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-
plugin:jar:2.5
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginD
escriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDes
criptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(D
efaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
ulator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
ulator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
ulator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:116)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
ulator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(Bu
ilderCommon.java:92)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to
read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:ja
r:2.5
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:296)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifac
tDescriptor(DefaultRepositorySystem.java:279)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:115)
... 25 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not
transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/
to central (http://repo.maven.apache.org/maven2): Connection to http://repo.mave
n.apache.org refused
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
aultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
facts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
fact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:281)
... 28 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not tra
nsfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to c
entral (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.ap
ache.org refused
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
agonRepositoryConnector.java:951)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
agonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.
run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(Run
nableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.maven.wagon.TransferFailedException: Connection to http://
repo.maven.apache.org refused
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInput
Data(AbstractHttpClientWagon.java:892)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:11
6)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.
run(WagonRepositoryConnector.java:601)
... 4 more
Caused by: org.apache.maven.wagon.providers.http.httpclient.conn.HttpHostConnect
Exception: Connection to http://repo.maven.apache.org refused
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultCli
entConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedCli
entConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultR
equestDirector.tryConnect(DefaultRequestDirector.java:645)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultR
equestDirector.execute(DefaultRequestDirector.java:480)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.Abstract
HttpClient.execute(AbstractHttpClient.java:906)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.Abstract
HttpClient.execute(AbstractHttpClient.java:805)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(A
bstractHttpClientWagon.java:746)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInput
Data(AbstractHttpClientWagon.java:886)
... 8 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.maven.wagon.providers.http.httpclient.conn.scheme.PlainSoc
ketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultCli
entConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
... 15 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
I tried to access the URL for which I'm getting the connection refused error :
http://repo.maven.apache.org
Browsing for this directory has been disabled.
View this directory's contents on http://search.maven.org instead.
The pom.xml is as follows :
<project xmlns="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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cloudera.seismic</groupId>
<artifactId>seismic</artifactId>
<version>0.1.0</version>
<packaging>jar</packaging>
<name>seismic</name>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.0.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.crunch</groupId>
<artifactId>crunch</artifactId>
<version>0.4.0-incubating</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven-hadoop</id>
<name>Hadoop Releases</name>
<url>https://repository.cloudera.com/content/repositories/releases/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/hadoop-job.xml</descriptor>
</descriptors>
<archive>
<manifest>
<mainClass>com.cloudera.seismic.segy.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Most probably you are behind proxy.
Try to do a telnet repo.maven.apache.org 80 and probably you will find it failed to connect.
In your settings.xml, add corresponding proxy settings to tell Maven to go through the proxy to download the artifacts
<settings>
.......
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>your_proxy_host</host>
<port>your_proxy_port</port>
<!--
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>*.yourdomain.com|*.yourOtherDomain.com</nonProxyHosts>
-->
</proxy>
</proxies>
</settings>

Resources