Jersey 2 Client java.lang.NoSuchMethodError: org.glassfish.jersey.CommonProperties.getValue - guava

I'm trying to setup a very simple Jersey client example. So I started with a pom.xml like this:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>simple-service-webapp</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>simple-service-webapp</name>
<build>
<finalName>simple-service-webapp</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
</dependency>
</dependencies>
<properties>
<jersey.version>2.23</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
And code like this:
Client client = ClientBuilder.newClient();
WebTarget webTarget = client.target("http://api.openweathermap.org/data/2.5/weather?q=berlin");
Invocation.Builder request = webTarget.request(MediaType.APPLICATION_JSON);
Response response = request.get();
System.out.println(response.getStatus());
String x = response.readEntity(String.class);
System.out.println(x);
Which resulted in the exception:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Predicate
at org.glassfish.jersey.client.ClientConfig$State.<init>(ClientConfig.java:144)
at org.glassfish.jersey.client.ClientConfig.<init>(ClientConfig.java:423)
at org.glassfish.jersey.client.JerseyClientBuilder.<init>(JerseyClientBuilder.java:72)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:116)
at javax.ws.rs.client.FactoryFinder.find(FactoryFinder.java:206)
at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:86)
at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:114)
at client.ApiService.main(ApiService.java:22)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Predicate
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more
So I tried to fix this by adding the following to my pom.xml:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
But then I get this error message and cannot really understand why:
Exception in thread "main" java.lang.NoSuchMethodError: org.glassfish.jersey.CommonProperties.getValue(Ljava/util/Map;Ljavax/ws/rs/RuntimeType;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
at org.glassfish.jersey.moxy.json.MoxyJsonFeature.configure(MoxyJsonFeature.java:69)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:617)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:558)
at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:363)
at org.glassfish.jersey.client.ClientConfig$State.access$000(ClientConfig.java:85)
at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:117)
at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:114)
at org.glassfish.jersey.internal.util.collection.Values$LazyValue.get(Values.java:311)
at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:669)
at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:213)
at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:124)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:97)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:90)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:387)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:291)
mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:resolve-plugins gives me this:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Djava.util.Arrays.useLegacyMergeSort=true -Dstringchararrayaccessor.disabled=true
[INFO] Scanning for projects...
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/plugins/maven-dependency-plugin/2.9/maven-dependency-plugin-2.9.pom
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/plugins/maven-dependency-plugin/2.9/maven-dependency-plugin-2.9.pom (13 KB at 54.7 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/plugins/maven-dependency-plugin/2.9/maven-dependency-plugin-2.9.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/plugins/maven-dependency-plugin/2.9/maven-dependency-plugin-2.9.jar (154 KB at 1826.2 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simple-service-webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.9:resolve-plugins (default-cli) # simple-service-webapp ---
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/reporting/maven-reporting-impl/2.2/maven-reporting-impl-2.2.pom
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/reporting/maven-reporting-impl/2.2/maven-reporting-impl-2.2.pom (5 KB at 75.7 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-archiver/2.4.4/plexus-archiver-2.4.4.pom
Downloaded: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-archiver/2.4.4/plexus-archiver-2.4.4.pom (4 KB at 53.9 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-io/2.0.10/plexus-io-2.0.10.pom
Downloaded: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-io/2.0.10/plexus-io-2.0.10.pom (3 KB at 44.1 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-io/2.0.9/plexus-io-2.0.9.pom
Downloaded: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-io/2.0.9/plexus-io-2.0.9.pom (3 KB at 46.0 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-analyzer/1.5/maven-dependency-analyzer-1.5.pom
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-analyzer/1.5/maven-dependency-analyzer-1.5.pom (6 KB at 89.2 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-shared-components/20/maven-shared-components-20.pom
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-shared-components/20/maven-shared-components-20.pom (5 KB at 92.3 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/ow2/asm/asm/5.0.2/asm-5.0.2.pom
Downloaded: https://repo.xy.de/repoproxy/org/ow2/asm/asm/5.0.2/asm-5.0.2.pom (2 KB at 19.1 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/ow2/asm/asm-parent/5.0.2/asm-parent-5.0.2.pom
Downloaded: https://repo.xy.de/repoproxy/org/ow2/asm/asm-parent/5.0.2/asm-parent-5.0.2.pom (6 KB at 71.5 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.pom
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.pom (8 KB at 104.3 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/reporting/maven-reporting-impl/2.2/maven-reporting-impl-2.2.jar
Downloading: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-archiver/2.4.4/plexus-archiver-2.4.4.jar
Downloading: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-io/2.0.9/plexus-io-2.0.9.jar
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-analyzer/1.5/maven-dependency-analyzer-1.5.jar
Downloading: https://repo.xy.de/repoproxy/org/ow2/asm/asm/5.0.2/asm-5.0.2.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-analyzer/1.5/maven-dependency-analyzer-1.5.jar (31 KB at 471.6 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/reporting/maven-reporting-impl/2.2/maven-reporting-impl-2.2.jar (17 KB at 228.7 KB/sec)
Downloaded: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-io/2.0.9/plexus-io-2.0.9.jar (58 KB at 797.9 KB/sec)
Downloaded: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-archiver/2.4.4/plexus-archiver-2.4.4.jar (161 KB at 1929.1 KB/sec)
Downloaded: https://repo.xy.de/repoproxy/org/ow2/asm/asm/5.0.2/asm-5.0.2.jar (52 KB at 597.5 KB/sec)
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar (63 KB at 535.1 KB/sec)
[INFO] Plugin Resolved: maven-install-plugin-2.4.jar
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.jar (13 KB at 199.3 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.jar (114 KB at 1745.5 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.jar (85 KB at 1222.7 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.jar (56 KB at 849.0 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.jar (86 KB at 1254.6 KB/sec)
[INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-artifact-manager-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO] Plugin Dependency Resolved: plexus-utils-3.0.5.jar
[INFO] Plugin Dependency Resolved: plexus-digest-1.0.jar
[INFO] Plugin Resolved: maven-deploy-plugin-2.7.jar
[INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO] Plugin Dependency Resolved: plexus-utils-1.5.6.jar
[INFO] Plugin Resolved: maven-war-plugin-2.2.jar
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.jar (149 KB at 2145.8 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.jar (48 KB at 726.5 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.jar (11 KB at 166.7 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar
Downloaded: https://repo.xy.de/repoproxy/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar (190 KB at 2284.7 KB/sec)
[INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-core-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-settings-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-monitor-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-archiver-2.5.jar
[INFO] Plugin Dependency Resolved: plexus-io-2.0.2.jar
[INFO] Plugin Dependency Resolved: plexus-archiver-2.1.jar
[INFO] Plugin Dependency Resolved: plexus-interpolation-1.15.jar
[INFO] Plugin Dependency Resolved: plexus-container-default-1.0-alpha-9-stable-1.jar
[INFO] Plugin Dependency Resolved: xstream-1.3.1.jar
[INFO] Plugin Dependency Resolved: plexus-utils-3.0.jar
[INFO] Plugin Dependency Resolved: maven-filtering-1.0-beta-2.jar
[INFO] Plugin Resolved: maven-surefire-plugin-2.12.4.jar
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-plugin-api/2.0.9/maven-plugin-api-2.0.9.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-plugin-api/2.0.9/maven-plugin-api-2.0.9.jar (13 KB at 217.1 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-artifact/2.0.9/maven-artifact-2.0.9.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-artifact/2.0.9/maven-artifact-2.0.9.jar (87 KB at 1423.4 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-project/2.0.9/maven-project-2.0.9.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-project/2.0.9/maven-project-2.0.9.jar (119 KB at 1698.9 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-core/2.0.9/maven-core-2.0.9.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-core/2.0.9/maven-core-2.0.9.jar (156 KB at 2435.8 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-toolchain/2.0.9/maven-toolchain-2.0.9.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-toolchain/2.0.9/maven-toolchain-2.0.9.jar (38 KB at 628.5 KB/sec)
[INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.9.jar
[INFO] Plugin Dependency Resolved: surefire-booter-2.12.4.jar
[INFO] Plugin Dependency Resolved: maven-surefire-common-2.12.4.jar
[INFO] Plugin Dependency Resolved: plexus-utils-3.0.8.jar
[INFO] Plugin Dependency Resolved: maven-artifact-2.0.9.jar
[INFO] Plugin Dependency Resolved: maven-project-2.0.9.jar
[INFO] Plugin Dependency Resolved: maven-core-2.0.9.jar
[INFO] Plugin Dependency Resolved: maven-toolchain-2.0.9.jar
[INFO] Plugin Dependency Resolved: maven-plugin-annotations-3.1.jar
[INFO] Plugin Resolved: maven-site-plugin-3.3.jar
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-core/3.0/maven-core-3.0.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-core/3.0/maven-core-3.0.jar (515 KB at 7148.4 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-model/3.0/maven-model-3.0.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-model/3.0/maven-model-3.0.jar (161 KB at 2144.3 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-plugin-api/3.0/maven-plugin-api-3.0.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-plugin-api/3.0/maven-plugin-api-3.0.jar (48 KB at 702.6 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-settings/3.0/maven-settings-3.0.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-settings/3.0/maven-settings-3.0.jar (46 KB at 843.9 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-settings-builder/3.0/maven-settings-builder-3.0.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-settings-builder/3.0/maven-settings-builder-3.0.jar (37 KB at 576.5 KB/sec)
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/wagon/wagon-provider-api/1.0/wagon-provider-api-1.0.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/wagon/wagon-provider-api/1.0/wagon-provider-api-1.0.jar (52 KB at 787.0 KB/sec)
[INFO] Plugin Dependency Resolved: maven-reporting-exec-1.1.jar
[INFO] Plugin Dependency Resolved: maven-core-3.0.jar
[INFO] Plugin Dependency Resolved: maven-model-3.0.jar
[INFO] Plugin Dependency Resolved: maven-plugin-api-3.0.jar
[INFO] Plugin Dependency Resolved: maven-settings-3.0.jar
[INFO] Plugin Dependency Resolved: maven-settings-builder-3.0.jar
[INFO] Plugin Dependency Resolved: maven-archiver-2.4.2.jar
[INFO] Plugin Dependency Resolved: doxia-sink-api-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-logging-api-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-core-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-module-xhtml-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-module-apt-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-module-xdoc-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-module-fml-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-module-markdown-1.4.jar
[INFO] Plugin Dependency Resolved: servlet-api-2.5.jar
[INFO] Plugin Dependency Resolved: doxia-decoration-model-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-site-renderer-1.4.jar
[INFO] Plugin Dependency Resolved: doxia-integration-tools-1.5.jar
[INFO] Plugin Dependency Resolved: wagon-provider-api-1.0.jar
[INFO] Plugin Dependency Resolved: plexus-archiver-1.0.jar
[INFO] Plugin Dependency Resolved: plexus-i18n-1.0-beta-7.jar
[INFO] Plugin Dependency Resolved: velocity-1.5.jar
[INFO] Plugin Dependency Resolved: plexus-velocity-1.1.8.jar
[INFO] Plugin Dependency Resolved: plexus-utils-1.5.10.jar
[INFO] Plugin Dependency Resolved: jetty-6.1.25.jar
[INFO] Plugin Dependency Resolved: jetty-util-6.1.25.jar
[INFO] Plugin Dependency Resolved: commons-lang-2.5.jar
[INFO] Plugin Dependency Resolved: commons-io-1.4.jar
[INFO] Plugin Resolved: maven-clean-plugin-2.5.jar
[INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO] Plugin Dependency Resolved: plexus-utils-3.0.jar
[INFO] Plugin Resolved: maven-resources-plugin-2.6.jar
[INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-core-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-settings-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO] Plugin Dependency Resolved: maven-monitor-2.0.6.jar
[INFO] Plugin Dependency Resolved: plexus-container-default-1.0-alpha-9-stable-1.jar
[INFO] Plugin Dependency Resolved: plexus-utils-2.0.5.jar
[INFO] Plugin Dependency Resolved: maven-filtering-1.1.jar
[INFO] Plugin Dependency Resolved: plexus-interpolation-1.13.jar
[INFO] Plugin Resolved: maven-compiler-plugin-2.5.1.jar
Downloading: https://repo.xy.de/repoproxy/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar
Downloaded: https://repo.xy.de/repoproxy/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar (33 KB at 563.9 KB/sec)
[INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.9.jar
[INFO] Plugin Dependency Resolved: maven-artifact-2.0.9.jar
[INFO] Plugin Dependency Resolved: maven-core-2.0.9.jar
[INFO] Plugin Dependency Resolved: maven-toolchain-1.0.jar
[INFO] Plugin Dependency Resolved: plexus-utils-3.0.jar
[INFO] Plugin Dependency Resolved: plexus-compiler-api-1.9.1.jar
[INFO] Plugin Dependency Resolved: plexus-compiler-manager-1.9.1.jar
[INFO] Plugin Dependency Resolved: plexus-compiler-javac-1.9.1.jar
[INFO] Plugin Dependency Resolved: plexus-container-default-1.0-alpha-9-stable-1.jar

You did not provide imports for your sample java but it looks like you have different version of org.glassfish.jersey.client.ClientConfig in your classpath - in jersey-client-2.23 (which is a dependency for jersey-server, which is a dependency for jersey-container-servlet-core). Predicate (and any Guava stuff) in Jersey should refer to jersey.repackaged.com.google.common.*, not to com.google.common.* - check where ClientConfig comes from.

Related

GWT - Error constructing Java AST

What could possibly be causing this error during compilation?
I have generated project from this archetype https://github.com/ArcBees/Arcbees-Archetypes and I have changed only thing - update GWT to 2.8.0 and GWTP to 1.5.3.
[INFO] [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:3099)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:352)
[INFO] at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.traverse(AllocationExpression.java:670)
[INFO] at org.eclipse.jdt.internal.compiler.ast.Assignment.traverse(Assignment.java:260)
[INFO] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:347)
[INFO] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1379)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3058)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:141)
[INFO] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:384)
[INFO] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
[INFO] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:985)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:339)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
[INFO] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:206)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:158)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:127)
[INFO] Caused by: java.lang.NullPointerException
[INFO] at com.google.gwt.dev.jjs.impl.ReferenceMapper.get(ReferenceMapper.java:99)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.pushNewExpression(GwtAstBuilder.java:2642)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:350)
[INFO] ... 23 more
[INFO] [ERROR] at AbstractStringBuilder.java(137): new String(buffer)
[INFO] org.eclipse.jdt.internal.compiler.ast.AllocationExpression
[INFO] Shutting down PersistentUnitCache thread
The pom.xml generated GWTP archetype has an implicit dependency to gwt-dev-2.7.0, resulting in a version mismatch. Try adding an explicit dependency to 2.8.0:
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>2.8.0</version>
<scope>provided</scope>
</dependency>
A few years late, but I just ran into the same issue.
Got the same exception when trying to run GWT in Super Dev mode after adding Tomcat runtime to another project in my Eclipse workspace.
Adding a Tomcat Server to one of the projects will likely add it to other projects (Eclipse Bug) and this may cause dependency issues.
To resolve it:
Remove Tomcat dependency from all related projects build path, clean and rebuild.

Eclipse maven jboss project - what do I need to add to the pom.xml so maven can compile?

I managed to set up my Jboss WTP project in maven. Right click on the project > Run as > Run on server (Jboss 7) works fine. But if I go ahead and delete the target directory and then try to execute compile goal it fails with missing dependencies:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.\
singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PROJECT 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # PROJECT ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\path\\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # PROJECT ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to C:\path\\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/path/to/file/Controller.java:[14,21] package javax.servlet does not exist
#..... NOTICE THIS COMES FROM A CUSTOM JAR
[ERROR] /C:/path/to/file/DataServlet.java:[3,30] package gr.uoa.di.java.helpers does not exist
#.....
[ERROR] /C:/path/to/file/DataServlet.java:[26,32] package javax.servlet.annotation does not exist
[ERROR] /C:/path/to/file/DataServlet.java:[28,26] package javax.servlet.http does not exist
#.....
[INFO] 49 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
If I clean the project so the target directory is populated with classes then try to compile the project all fine:
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # DataCollectionServlet ---
[INFO] Nothing to compile - all classes are up to date
I have 1 question:
What exactly should I add to the pom.xml to reproduce the compilation environment of the Run on Server eclipse command ? EDIT: For instance adding:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
to the pom solved the "servlet API not found" issue - but is it the way to go ? Or should I add something like:
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-spec-api</artifactId>
<version>7.1.1.Final</version>
</dependency>
(see here). NB: adding the dependencies suggested by m2e plugin would result in a huge pom - moreover I am not sure all of it would be needed (it's a plain servlet/jsp project):
I am on Eclipse Luna Java EE pack, maven 3.1 (the one that comes with eclipse) and using Jboss 7.1.1.Final
I ended up just adding:
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
</dependency>
This transitively added the servlet-api:
Still don't know if adding this is the right way to add jstl 1.2.1 - notice it adds the jstl 1.2 api (EDIT: it isn't: Standard way of adding JSLT 1.2.1 in a Maven Project?)
I also still have problems with my homebrew jar (Can maven treat WEB-INF\lib the way eclipse (and m2e) does?) but closing this for now.

Installing vaadin-addons with spring roo fails with a maven compile

I am using Spring Source Tool Suite version 2.8, Maven version 3.0.3 and my Maven-Eclipse plugin is all up to date. I have a Vaadin project and i am trying to install custom add-ons using Spring ROO's command line and everything works perfect until i run the command:
My pom.xml file shows no errors and i have included my custom widgetset to web.xml file?
Vaadin Widgetset create
The ROO shell is able to update my pom.xml file to add the necessary files. The first ROO command: Failed
Vaadin widgetset update
[CODE]roo> vaadin widgetset update
[INFO] Scanning for projects...
Downloading: http://maven.springframework.org/release/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/milestone/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/release/org/codehaus/mojo/maven-metadata.xml
Downloading: http://spring-roo-repository.springsource.org/release/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/milestone/org/codehaus/mojo/maven-metadata.xml
Downloading: http://spring-roo-repository.springsource.org/release/org/codehaus/mojo/maven-metadata.xml
Downloading: http://maven.springframework.org/release/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://spring-roo-repository.springsource.org/release/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/milestone/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/release/org/codehaus/mojo/maven-metadata.xml
Downloading: http://maven.springframework.org/milestone/org/codehaus/mojo/maven-metadata.xml
Downloading: http://spring-roo-repository.springsource.org/release/org/codehaus/mojo/maven-metadata.xml
4 KB
5 KB
9 KB
11 KB
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (11 KB at 13.0 KB/sec)
4 KB
8 KB
12 KB
13 KB
17 KB
19 KB
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (19 KB at 25.7 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.154s
[INFO] Finished at: Thu Jan 05 13:42:24 CST 2012
[INFO] Final Memory: 6M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'vaadin' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/warz07/.m2/repository), spring-maven-release (http://maven.springframework.org/release), spring-maven-milestone (http://maven.springframework.org/milestone), spring-roo-repository (http://spring-roo-repository.springsource.org/release), central (http://repo1.maven.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/NoPluginFoundForPrefixException[/CODE]
I then ran this command : [CODE]vaadin widgetset create[/CODE]
vaadin widgetset create
Updated SRC_MAIN_WEBAPP/WEB-INF/web.xml
[INFO] Scanning for projects...
Downloading: http://spring-roo-repository.springsource.org/release/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/release/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/milestone/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://maven.springframework.org/release/org/codehaus/mojo/maven-metadata.xml
Downloading: http://maven.springframework.org/milestone/org/codehaus/mojo/maven-metadata.xml
4 KB
5 KB
9 KB
11 KB
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (11 KB at 18.5 KB/sec)
Downloading: http://spring-roo-repository.springsource.org/release/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
4 KB
8 KB
9 KB
13 KB
17 KB
18 KB
19 KB
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (19 KB at 21.2 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.509s
[INFO] Finished at: Thu Jan 05 13:45:01 CST 2012
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'vaadin' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/warz07/.m2/repository), spring-maven-release (http://maven.springframework.org/release), spring-maven-milestone (http://maven.springframework.org/milestone), spring-roo-repository (http://spring-roo-repository.springsource.org/release), central (http://repo1.maven.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/NoPluginFoundForPrefixException
Updated ROOT/pom.xml [added dependencies com.google.gwt:gwt-user:2.3.0, javax.validation:validation-api:1.0.0.GA:sources; added plugin gwt-maven-plugin; added plugin vaadin-maven-plugin]
Created SRC_MAIN_JAVA/org/bixin/dugsi/client/managed/request
Created SRC_MAIN_JAVA/org/bixin/dugsi/client/managed/request/ApplicationRequestFactory.java
Created SRC_MAIN_JAVA/org/bixin/dugsi/client/scaffold/gae
Created SRC_MAIN_JAVA/org/bixin/dugsi/client/scaffold/gae/GaeHelper.java
Updated ROOT/pom.xml [removed plugin gwt-maven-plugin; added plugin gwt-maven-plugin; added dependency com.google.appengine:appengine-api-1.0-sdk:1.5.1][/CODE]
Is there any other way with or without using the roo shell to install vaadin add-ons using maven?

Maven Build - Eclipse project meta-data error

I'm trying to create the meta-data for a eclipse project in maven, but my parter and I keep running into the following error, on both our machines. Ive looked around the forum and have tried related advice such as defining a path in the eclipse.ini file and so on, but this hasn't worked. Has anyone else ran into this error before or can see what I am doing incorrectly? Any help would be greatly appreciated.
C:\Users\jheerman\workspace\release\admin-portal>mvn eclipse:clean eclipse:eclip
se -DdownloadSources=true
[INFO] Scanning for projects...
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CTP Admin Portal Services 0.4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[WARNING] The POM for org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1 is missi
ng, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codeaus.mojo:rpm-maven-pl
ugin:2.1-alpha-1: Plugin org.codeaus.mojo:rpm-maven-plugin:2.1-alpha-1 or one of
its dependencies could not be resolved: Failed to read artifact descriptor for
org.codeaus.mojo:rpm-maven-plugin:jar:2.1-alpha-1
[INFO]
[INFO] --- maven-eclipse-plugin:2.8:clean (default-cli) # ctp-admin-portal ---
[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules
[INFO] Deleting file: .component
[INFO] Deleting file: org.eclipse.wst.common.component
[INFO] Deleting file: org.eclipse.wst.common.project.facet.core.xml
[INFO] Deleting file: org.eclipse.jdt.core.prefs
[INFO] Deleting file: org.eclipse.ajdt.ui.prefs
[INFO]
[INFO] >>> maven-eclipse-plugin:2.8:eclipse (default-cli) # ctp-admin-portal >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.8:eclipse (default-cli) # ctp-admin-portal <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.8:eclipse (default-cli) # ctp-admin-portal ---
[INFO] Using Eclipse Workspace: C:\Users\jheerman\workspace
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN
ER
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.003s
[INFO] Finished at: Thu Jun 23 09:42:31 GMT-08:00 2011
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.8
:eclipse (default-cli) on project ctp-admin-portal: Cant canonicalize system pat
h: {0}: The filename, directory name, or volume label syntax is incorrect -> [He
lp 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoExecutionE
xception

How to set where maven installs plugins?

I've tried building a project with maven 2.2.1 and received the following error
Notice the "directory cannot be created" - the reason I believe is that D: is a drive that was encrypted by TrueCrypt and is now actually H: (D: remains as a physical drive not accessible through Windows)
How do I make maven try to install the plugin on H: instead of on D:?
C:\dev\some-project>mvn -f uberPom.xml install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Declarations
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2)
Downloading: http://repo.marketcetera.org/maven/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' in repository internal (http://repo.marketcetera.org/maven)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: D:\.m2\repository\org\apache\
maven\plugins\maven-site-plugin\2.0-beta-7
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: D:\.m2\repository\org\apache\
maven\plugins\maven-site-plugin\2.0-beta-7
Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' in repository java.net (http://download.java.net/maven/2)
Downloading: http://repo.marketcetera.org/maven/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7' in repository internal (http://repo.marketcetera.org/maven)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-site-plugin
Reason: POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository
org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
java.net (http://download.java.net/maven/2),
internal (http://repo.marketcetera.org/maven),
maven2-repository.dev.java.net (http://download.java.net/maven/2)
for project org.apache.maven.plugins:maven-site-plugin
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Sat May 21 14:45:51 IDT 2011
[INFO] Final Memory: 2M/46M
[INFO] ------------------------------------------------------------------------
You can set the location of your local repository to a different folder by modifying the global settings file (located in \conf\settings.xml). Any plugins and artifacts would then be installed/downloaded to that location.
The following snippet would set the local repository to h:\Maven\repository for example:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>h:\Maven\repository</localRepository>
...