atlassian plugin sdk: maven dependency not resolved for apache commons - java

We have been working on JIRA plugin development and using apache-commons library for file upload purpose as follows:
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.2</version>
<scope>provided</scope>
</dependency>
Generated plugin is working fine on atlas development environment but while uploading the generated Jar on JIRA, following error is being displayed in logs.
2017-12-11 09:49:53,841 UpmAsynchronousTaskManager:thread-3
ERROR jira.admin 357x1243x1 1ycla6b 14.102.4.74,13.58.31.162 /rest/plugins/1.0/
[c.a.p.osgi.factory.OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.atlassian.tutorial.myPlugin' :
Unresolved constraint in bundle com.atlassian.tutorial.myPlugin [237]: Unable to resolve 237.0: missing requirement [237.0]
osgi.wiring.package; (osgi.wiring.package=org.apache.commons.fileupload).
This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints,
or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN
After going through various threads to resolve this issue we have tried the following.
Tried used different versions of Apache-Common 1.3.2 OR 1.3 OR 1.2.x etc...
Instead of using the maven we have directly uploaded the .jar file inside the lib folder and updated dependency section as well.
None of above worked so far.
Here is the POM.XML file:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.atlassian.tutorial</groupId>
<artifactId>myPlugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<organization>
<name>Atlassian SDK Tutorial</name>
<url>http://developer.atlassian.com/</url>
</organization>
<name>myPlugin</name>
<description>This is the com.atlassian.tutorial:myPlugin plugin for Atlassian JIRA.</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
<!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->
<!--
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>1.2.3</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
</dependency>-->
<!--<dependency>
<groupId>info.bliki.wiki</groupId>
<artifactId>bliki-core</artifactId>
<version>3.0.19</version>
</dependency>-->
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
<!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
<!--
<dependency>
<groupId>com.atlassian.jira.tests</groupId>
<artifactId>jira-testkit-client</artifactId>
<version>${testkit.version}</version>
<scope>test</scope>
</dependency>
-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<!--<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.2</version>
<scope>provided</scope>
</dependency>-->
<dependency>
<artifactId>commons-fileupload</artifactId>
<groupId>commons-fileupload</groupId>
<version>1.3.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/commons-fileupload-1.3.2.jar</systemPath>
<extractDependencies>false</extractDependencies>
</dependency>
<dependency>
<groupId>com.atlassian.templaterenderer</groupId>
<artifactId>atlassian-template-renderer-api</artifactId>
<version>1.3.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<!-- Uncomment to install TestKit backdoor in JIRA. -->
<!--
<pluginArtifacts>
<pluginArtifact>
<groupId>com.atlassian.jira.tests</groupId>
<artifactId>jira-testkit-plugin</artifactId>
<version>${testkit.version}</version>
</pluginArtifact>
</pluginArtifacts>
-->
<enableQuickReload>true</enableQuickReload>
<enableFastdev>false</enableFastdev>
<!-- See here for an explanation of default instructions: -->
<!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
<instructions>
<!-- <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>-->
<!-- Add package to export here -->
<Export-Package><com class="atlassian tut"></com>orial.myPlugin.api,</Export-Package>
<!-- Add package import here -->
<Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package>
<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.8.0_151\bin\javac</executable>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<jira.version>7.5.0</jira.version>
<amps.version>6.3.6</amps.version>
<jdkLevel>1.8</jdkLevel>
<plugin.testrunner.version>1.2.3</plugin.testrunner.version>
<atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
<!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<!-- TestKit version 6.x for JIRA 6.x -->
<testkit.version>6.3.11</testkit.version>
<template.renderer.version>1.3.1</template.renderer.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
We need guidance for troubleshooting/resolving above explained issue.

This looks like a 3rd party library. So you need to change your scope from provided to compile -
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.2</version>
<scope>compile</scope>
</dependency>
By specifying <scope>compile</scope>, you tell the SDK that the commons-fileupload library is needed at compile time and runtime. The SDK will bundle the commons-fileupload library into your plugin, and the plugin system will make it available in the plugin classloader when the plugin is started.
More details - https://developer.atlassian.com/docs/getting-started/working-with-the-pom/managing-dependencies

Related

Maven App Engine Configuration problem Java 8 (Eclipse)

I'm having some issues with Eclipse, Maven, Java 8 and App Engine Standard Environment project.
After creating another project that requires Java 11, it seems that Eclipse or Maven is struggling to work correctly.
The main error I get in markers Eclipse tab that is impeding me to deploy or launch a local environment is:
App Engine Java Standard Environment JRE8 requires Dynamic Web Module with version matching expression "[2.5-3.1]"
Eclipse Project Facets are correctly configured. Dynamic Web Module version 2.5, App Engine Standar using Java 1.8
Project build path points to jdk1.8.0_211. Compiler too.
Nothing changed in the project recently. Error appeared after doing Maven -> Update project.
I tried every change suggested in Google but nothing seems to change.
I tried creating another workspace which worked (even reinstalling Eclipse) for 24 hours. After that, sudenly the error appeared again.
What should I try next? This problem is stopping me from working...
Edit:
Maven commands work fine, clean, install, package.
Also deploying (appengine:deploy) works but throws many errors of missing classes.
I cannot deploy the application through Google Cloud Tools extension in Eclipse because of Maven configuration errors.
Local server (Eclipse launching) throws many exceptions of missing classes.
Local server (Maven launching) fails to run with this error:
File exists
Maven Update project and install package outputs different compiled classes at target directory, don't know why
PD: Replaced some project naming with placeholders.
pom.xml
<?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>
<packaging>war</packaging>
<artifactId>artifact-module</artifactId>
<name>name-module</name>
<parent>
<groupId>parent</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
</parent>
<properties>
<appengine.maven.plugin.version>2.4.0</appengine.maven.plugin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<endpoints.project.id>projectid</endpoints.project.id>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
</properties>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>20.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.google.endpoints/endpoints-management-control-appengine -->
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-management-control-appengine</artifactId>
<version>1.0.14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.endpoints/endpoints-framework -->
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.88</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-admin-directory -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-admin-directory</artifactId>
<version>directory_v1-rev110-1.25.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-calendar -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-calendar</artifactId>
<version>v3-rev20191117-1.30.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-people -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-people</artifactId>
<version>v1-rev20190910-1.30.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-drive -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-drive</artifactId>
<version>v3-rev20191108-1.30.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-gmail -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-gmail</artifactId>
<version>v1-rev20190602-1.30.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.gdata/core -->
<dependency>
<groupId>com.google.gdata</groupId>
<artifactId>core</artifactId>
<version>1.47.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.nimbusds/nimbus-jose-jwt -->
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>5.14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.endpoints/endpoints-framework-auth -->
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework-auth</artifactId>
<version>1.0.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.11.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>6.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.7.2</version>
</dependency>
<dependency>
<groupId>com.mailjet</groupId>
<artifactId>mailjet-client</artifactId>
<version>4.5.0</version>
</dependency>
</dependencies>
<build>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.2</version>
<configuration>
<hostname>${endpoints.project.id}.appspot.com</hostname>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<!-- deploy configuration -->
<version>1</version>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-plugin-updates</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>
</project>

java.lang.NoSuchMethodError: com.google.api.client.http.HttpTransport.isMtls()Z

I have an application I deploy on appengine using java8.
Lately when I tried deploying I get this error on run time:
Uncaught exception from servlet
java.lang.NoSuchMethodError: com.google.api.client.http.HttpTransport.isMtls()Z
at com.google.api.services.storage.Storage$Builder.chooseEndpoint(Storage.java:11151)
at com.google.api.services.storage.Storage$Builder.<init>(Storage.java:11184)
at com.google.cloud.storage.spi.DefaultStorageRpc.<init>(DefaultStorageRpc.java:105)
at com.google.cloud.storage.StorageOptions$DefaultStorageRpcFactory.create(StorageOptions.java:49)
at com.google.cloud.storage.StorageOptions$DefaultStorageRpcFactory.create(StorageOptions.java:43)
at com.google.cloud.ServiceOptions.getRpc(ServiceOptions.java:482)
at com.google.cloud.storage.StorageImpl.<init>(StorageImpl.java:93)
at com.google.cloud.storage.StorageOptions$DefaultStorageFactory.create(StorageOptions.java:39)
at com.google.cloud.storage.StorageOptions$DefaultStorageFactory.create(StorageOptions.java:33)
at com.google.cloud.ServiceOptions.getService(ServiceOptions.java:469)
here is my pom.xml:
<?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>
<packaging>war</packaging>
<version>1.1-SNAPSHOT</version>
<groupId>my.com.myapp</groupId>
<artifactId>myapp</artifactId>
<repositories>
<repository>
<id>local-maven-repo</id>
<url>file:///${project.basedir}/local-maven-repo</url>
</repository>
</repositories>
<!-- [START set_versions] -->
<properties>
<appengine.sdk.version>1.9.46</appengine.sdk.version>
<google-api-client.version>1.21.0</google-api-client.version>
<objectify.version>5.1.5</objectify.version>
<guava.version>18.0</guava.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<prerequisites>
<maven>3.1.0</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.sdk.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<type>jar</type>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.appengine.tools</groupId>
<artifactId>appengine-gcs-client</artifactId>
<version>RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-storage -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-storage</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-pubsub</artifactId>
<version>RELEASE</version>
</dependency>
<!-- slf4j API frontend binding with JUL backend -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>0.8.3-alpha</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>0.8.3-beta</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>0.8.3-beta</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
</dependency>
<!-- for comparing jsons check if soppurted on appengine for tests only-->
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core for the integration reading from WEB-INF-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.6</version>
<!-- <scope>integration</scope> -->
</dependency>
<!--added for pdf...-->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging-api -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging-adapters -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-adapters</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
<version>1.8.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>1.8.0-SNAPSHOT</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/fluent-hc -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>4.5.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.3</version>
</dependency>
<dependency>
<groupId>com.github.wnameless</groupId>
<artifactId>json-flattener-java7</artifactId>
<version>0.4.0</version>
</dependency>
</dependencies>
<build>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<projectId>my-project-id</projectId>
<version>my-version</version>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.7.v20160115</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.3</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!--integration-test-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I'll note that deploy works well when deploying on pc that has done deploy in the past, but whe deploying first time on new pc I get above error on run time
I assume I need to change the version on
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-storage</artifactId>
<version>RELEASE</version>
</dependency>
what version should it be?
In general, such exception happens when you have two versions of the same class in the classpath. Some of the reasons that may happen are:
Your dependencies include two version of google-api-client. I
don't see any direct dependency so It could be a transitive
dependency. You can run mvn dependency:tree and look for
google-api-client dependencies and exclude one of the jars
You are packing a provided
dependency. It could be that app engine already include such jar
with HttpTransport, if you also include this HttpTransport class
into your artefact it will create problems. To fix this identify
which dependency contains HttpTransport class and in your pom.xml
add provided to it
This class is included in the classpath from some old jar in some generated repository. If this is the case all you have to do is reset your environment. Clone the repository again and re-init app engine
In my case, I updated to
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>1.127.10</version>
</dependency>
which seems to have too old transitive dependencies for google-http-client and google-api-client, so I added those and had it fixed:
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>1.39.1</version>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.31.2</version>
</dependency>
rebuild with ./gradlew command and restart.
In addition to what #Samuel's answer adding the below dependency has worked for me.
compile ('com.google.cloud:google-cloud-storage:1.17.0')
Reference: https://www.baeldung.com/java-google-cloud-storage
using RELEASE uses google-api-services-storage-v1-rev20201112-1.31.0.jar which has the above issue
I updated the dependency in pom.xml to the following,
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-storage</artifactId>
<version>v1-rev20190129-1.26.0</version>
</dependency>
then ran
mvn clean package
and now deploy is ok

Upgrading to Java 11 JavaFX headache

today I installed JDK 11 and all my JavaFX stuff went haywire.
Fair enough, Oracle can do what they want. I'm trying to get my project back to a runnable state and this is the first time i've come across this modular stuff so no idea really what's going on.
I've managed to import the libraries as dependencies in Maven (although it couldn't find version 11 in maven of some of the libraries and I end up using 11-ea+19 for javafx-controls etc. - whatever..), so my code compiles fine with these dependencies:
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11-ea+25</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>11-ea+19</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11-ea+19</version>
</dependency>
Yeah I need them all.
So now I hope to run the program but no! We get an error at runtime:
Error: JavaFX runtime components are missing, and are required to run this application
Ok people have this problem all the time it seems, because they haven't added the "modules". The only problem is the people who are posting about this are not using maven and have downloaded a JavaFX SDK stored somewhere on their PC. Does Maven download these in a clever way or do I have to do the same thing and download a separate SDK? Then add the modules from there?! This looks a bit shoddy to me...
Really what I want to know is what I should put as my --module-path in order that I can --add-modules=javafx.controls,javafx.fxml,javafx.media,javafx.swing
Apologies for my frustrated tone. One of those days.
EDIT:
Here is my entire pom.xml
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cricket</groupId>
<artifactId>CricketFX</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11-ea+25</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>11-ea+19</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.0</version>
</dependency>
<!-- for timezones -->
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.2.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hsqldb/hsqldb -->
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.4.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20171018</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>4.1.3</version>
</dependency>
<dependency>
<groupId>io.reactivex</groupId>
<artifactId>rxjava</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>com.netflix.rxjava</groupId>
<artifactId>rxjava-apache-http</artifactId>
<version>0.20.7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.madgag/animated-gif-lib -->
<dependency>
<groupId>com.madgag</groupId>
<artifactId>animated-gif-lib</artifactId>
<version>1.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jcodec/jcodec -->
<dependency>
<groupId>org.jcodec</groupId>
<artifactId>jcodec</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>org.jcodec</groupId>
<artifactId>jcodec-javase</artifactId>
<version>0.2.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>application.gui.AppStarter</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
The exec-maven-plugin is not finding version 1.6.0, but I can clearly see it there in central repo on maven website. What the hell..same problem trying to get version 11 of the javafx libs.
EDIT: SOLVED: Something clearly wrong with my Maven setup, now using maven-exec-plugin version 1.4.0 and the thing works.
Please first remove all 11-ea+19 and put 11
I do not know why you can not find this version. See here for example: https://mvnrepository.com/artifact/org.openjfx/javafx-controls/11
Please add this plugin to maven pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>HelloFX</mainClass>
</configuration>
</plugin>
</plugins>
And after that execute:
mvn compile exec:java
This in eclipse is right button on the project -> Run As -> Maven build ...
and for the goals add:
compile exec:java
You also can see the example: https://openjfx.io/openjfx-docs/#maven
Hope I help. By the way this only will start you application in eclipse. I still do not know how to create executable jar and also jar which is backward compatible.
Happy coding!

Maven not building with server's servlet-api

Scenario
I am trying to add server's servlet-api into my existing Dynamic Web Application after reading BalusC's answer on this post.
So from start in am using maven dependency for my project
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>
After reading the BalusC's answer I removed the javax.servlet dependency from pom.xml and I added *Target Runtime into my project.
*
Problem
After this all the errors (in eclipse's window) have gone. But when I try to maven clean install it gives [ERROR] COMPILATION ERROR : package javax.servlet does not exist.
But again if I added the javax.servlet's dependency in pom.xml then it works fine.
pom.xml
<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>IncidentManagement</groupId>
<artifactId>IncidentManagement</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<sourceDirectory>src.main.java</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<java.version>1.8</java.version>
<junit.version>4.12</junit.version>
<servlet.version>3.1.0</servlet.version>
<mojarra.version>2.2.12</mojarra.version>
<primefaces.version>5.3</primefaces.version>
<maven.compiler.plugin.version>3.3</maven.compiler.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>JBoss repository</id>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<!-- ORACLE database driver -->
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.3.Final</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<!-- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency> -->
<!-- Mojarra JSF -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>${mojarra.version}</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>${mojarra.version}</version>
</dependency>
<!-- PrimeFaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>${primefaces.version}</version>
</dependency>
<!-- Excel and CSV -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.10-FINAL</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
<type>jar</type>
</dependency>
<!-- PDF -->
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
<!-- JSON -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<!-- Primefaces Theme -->
<!-- https://mvnrepository.com/artifact/org.primefaces.extensions/all-themes -->
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.8</version>
</dependency>
</dependencies>
</project>
P.S: I am using Java 8, Apache tomcat 8 and maven 3.
It's quite correct in stating it can't find the class as you don't have it in your pom file...
Having the dependency there as "provided" is correct. At compile time it'll use stubs downloaded from a repository, at runtime it will use the actual classes installed into and provided by the servlet container.
Balus's answer isn't relevant to maven projects, only native Eclipse projects that aren't built externally to Eclipse.
#Junaid, I had the same problem at my workplace. Later I realized that servlet-api.jar file was not the repository provided by workplace. I guess, we are behind the proxy and that downloads the file from local repository than maven. I had to use the j2ee.jar file for the purpose.

Java 6 preventing deployment to appengine

When I try and deploy my app to Google Appenginge, I get the following response:
Caused by: java.io.IOException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=kittysplit&version=1&
400 Bad Request
Java 6 applications are prevented from being deployed to Google App Engine from any version of the SDK, including older ones. If you need to continue to deploy Java 6 applications for compatibility reasons, you can request that your application be whitelisted for Java 6 deployment by visiting http://goo.gl/ycffXq.
I have set the project SDK to Java 1.7. My suspision is that a dependency in my POM.xml (included below) is causing this problem. Any ideas?
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- The Basics -->
<groupId>com.kittysplit</groupId>
<artifactId>kittysplit</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>kittysplit</name>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.42.0</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-remote-api</artifactId>
<version>1.7.7.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.5</version>
</dependency>
<!-- Google App Engine meta-package -->
<dependency>
<groupId>net.kindleit</groupId>
<artifactId>gae-runtime</artifactId>
<version>${gae.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>${datanucleus.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<!--
J2EE Servlet API. We need it to compile IndexServlet class. You can
probably remove it, if you don't explicitly use Servlets
-->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.5_spec</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<!--
Make use of JSP tags. Remove, if you don't use JSPs
-->
<dependency>
<artifactId>standard</artifactId>
<groupId>taglibs</groupId>
<version>1.1.2</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
<!-- These dependencies are here just for enabling logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.24</version>
</dependency>
<!-- Test scope -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.3-eb</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<filtering>true</filtering>
<includes>
<include>**/appengine-web.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
</plugin>
<!--
The actual maven-gae-plugin. Type "mvn gae:run" to run project, "mvn
gae:deploy" to upload to GAE.
-->
<plugin>
<groupId>net.kindleit</groupId>
<artifactId>maven-gae-plugin</artifactId>
<version>0.9.2</version>
<configuration>
<splitJars>true</splitJars>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.1.2</version>
</dependency>
</dependencies>
</plugin>
<!--
Upload application to the appspot automatically, during
release:perform
-->
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<goals>gae:deploy</goals>
</configuration>
</plugin>
<!-- Java compiler version -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- Specify hard-coded project properties here -->
<properties>
<!-- Sets the project's default encoding.
http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!--
This is just for "eclipse:eclipse" goal to always attempt downloading
sources
-->
<downloadSources>true</downloadSources>
<!--
Specify AppEngine version for your project. It should match SDK
version pointed to by ${gae.home} property (Typically, one used by
your Eclipse plug-in)
-->
<gae.version>1.7.7</gae.version>
<!--
Upload to http://test.latest.<applicationName>.appspot.com by default
-->
<gae.application.version>test</gae.application.version>
<datanucleus.version>1.1.5</datanucleus.version>
</properties>
<profiles>
<!--
We can configure our integration server to activate this profile and
perform gae:deploy, thus uploading latest snapshot to the
http://1.latest.<applicationName>.appspot.com automatically
-->
<profile>
<id>integration-build</id>
<properties>
<gae.application.version>stage</gae.application.version>
</properties>
</profile>
<!--
This profile will activate automatically during release and upload
application to the http://2.latest.<applicationName>.appspot.com (We
might want to set the 2nd version as our applications Default version
to be accessible at http://<applicationName>.appspot.com)
-->
<profile>
<id>release-build</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<properties>
<!--
During release, set application version in appengine-web.xml to 2
-->
<gae.application.version>release</gae.application.version>
</properties>
</profile>
</profiles>
</project>
Why are you using an incredible old version of GAE? Have you tried upgrade the version to 1.9.6?
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-remote-api</artifactId>
<version>**1.9.6**</version>
</dependency>

Categories

Resources