I have migrated my Google App Engine end point App. There is one jar and war file available in my V1 libs folder. But after I migrated, there is war file only available in my V2 libs folder. Without jar file I cannot proceed my work. Is anything I missed in the migration process ?
I followed the below document.
https://cloud.google.com/endpoints/docs/frameworks/java/migrating-android
apply plugin: 'com.android.application'
// V2: Apply the new Endpoints Framework client plugin
apply plugin: 'com.google.cloud.tools.endpoints-framework-client'
buildscript {
repositories {
jcenter()
}
dependencies {
// V2: Add the new Endpoints Framework plugin dependencies
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.2'
}
}
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.chainsys.echain_extension_module"
minSdkVersion 19
targetSdkVersion 26
versionCode 14
versionName "1.0"
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// androidTestCompile compiles instrumentation tests written using Espresso
// used by Firebase Test Lab
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.google.code.findbugs:jsr305:2.0.1'
testCompile 'junit:junit:4.12'
// V2: Endpoints Framework v2 migration
endpointsServer project(path: ':eChain-Extension-backend-module', configuration: 'endpoints')
compile 'com.google.api-client:google-api-client:+'
compile 'com.google.http-client:google-http-client-android:1.22.0'
configurations {
compile.exclude group: "org.apache.httpcomponents", module: "httpclient"
}
}
// If you would like more information on the gradle-appengine-plugin please refer to the github pageStep 3: change my project backend / web.xml
// https://github.com/GoogleCloudPlatform/gradle-appengine-plugin
buildscript {
repositories {
jcenter()
}
dependencies {
// V2: Add the new App Engine and Endpoints Frameworks plugin dependencies
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.2'
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.3'
}
}
repositories {
jcenter();
}
apply plugin: 'java'
apply plugin: 'war'
// V2: Apply new App Engine and Endpoints Framework server plugins
apply plugin: 'com.google.cloud.tools.appengine'
apply plugin: 'com.google.cloud.tools.endpoints-framework-server'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
dependencies {
// V2: Endpoints Framework v2 migration
compile 'com.google.endpoints:endpoints-framework:2.0.9'
compile 'javax.inject:javax.inject:1'
compile 'javax.servlet:servlet-api:2.5'
}
// V2: Define deployment configuration using the new App Engine plugin
// with the appengine closure
appengine { // App Engine tasks configuration
deploy { // deploy configuration
// The following is used for acceptance tests and
// is not required for a migration.
project = findProperty("appengine.deploy.project")
version = findProperty("appengine.deploy.version")
def promoteProp = findProperty("appengine.deploy.promote")
if (promoteProp != null) {
promote = new Boolean(promoteProp)
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
<servlet>
<servlet-name>EndpointsServlet</servlet-name>
<servlet-class>com.google.api.server.spi.EndpointsServlet</servlet-class>
<init-param>
<param-name>services</param-name>
<param-value>com.chainsys.e_chain.backend.EndPointApi.MyEndpoint,com.chainsys.e_chain.backend.EndPointApi.DomainAuthenticationEndPoint,com.chainsys.e_chain.backend.EndPointApi.LocationTrackingEndPoint</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>EndpointsServlet</servlet-name>
<url-pattern>/_ah/spi/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>GAEJCronServlet</servlet-name>
<servlet-class>com.chainsys.e_chain.backend.GAEJCronServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GAEJCronServlet</servlet-name>
<url-pattern>/cron/gaejcronjob</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
// V2: Include this dependency when using Endpoints Framework v2
classpath 'com.google.guava:guava:19.0'
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Your build.gradle file contains line "apply plugin: 'war' ", while you expect a jar file. More details related to your statement above: "Without jar file, I cannot proceed my work." are needed. What prevents you from proceeding with your work and in which way, exactly? What would you expect, when you deploy your end point code? Have you rebuild your project? This step is dealt with in the "Rebuild project" sub-chapter.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/4adc24e4-8c68-4dac-a801-22c0016f1ac4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.