I get errors ('module-discoveryDocs.zip' doesn't exist) when setting project module dependencies in google endpoints version 2 - google-cloud-endpoints

I have errors when setting project module dependencies in google endpoints version 2. I tried endpointsServer project(path: ':module-one', configuration: 'endpoints')
In endpoints version 1.0 you can just do
deploy project(path: ':module-one', configuration: 'archives')
inside the dependencies.
Trying
dependencies {
endpointsServer project(path: ':module-one', configuration: 'endpoints')
endpointsServer project(path: ':module-two', configuration: 'endpoints')
endpointsServer project(path: ':module-three', configuration: 'endpoints')
compile "com.google.api-client:google-api-client:+"
}
Is giving errors when I try gradle build
The error looks like
Execution failed for task ':some-project:_extractServerDiscoveryDocs'.
> src 'project-path\prax-one-ui\build\distributions\module-one-discoveryDocs.zip' doesn't exist.
I got some explanation on using endpointsServer from here
https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/blob/master/ANDROID_README.md
I will really appreciate any help

Related

JFrog REST api client app fails to build with missing org.apache.commons.* packages

We have a Java app that was built using 2017 version of JFrog java services jar. Today I am trying to rebuild it using latest jfrog lib. I see that the new services jar doesn't have org.apache.* packages in it.
This is how I built jfrog services jar.
Downloaded 2.8.6 source zip and expanded it
Upgraded gradle to latest and ran "gradle clean build -x test -x javadoc"
Then copied services/build/lib/*services-2.8.6.jar ONLY to my project lib folder
When I try to build, I see so many compilation errors. The old lib was called something like artifactory-java-client-ning-services-1.2.0-all.jar.
How do I build one like it?
Update on 11/6/20 after Dror responses below:
I changed the build strategy to point to jcenter to download and create uber jar with all the dependencies with gradle file like below. I am still running into missing classes.
Below is one of those errors:
error: package org.jfrog.artifactory.client.ArtifactoryClient does not exist
import org.jfrog.artifactory.client.ArtifactoryClient.ProxyConfig;
In Netbeans IDE that I am using, I can expand each package in a jar and see the classes in it. I don't see anything under org.jfrog.artifactory.client package. That is strange.
My build.gradle:
group 'org.jftog.example'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.13
repositories {
jcenter()
}
dependencies {
compile 'org.apache.commons:commons-collections4:4.4'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
testImplementation group: 'junit', name: 'junit', version: '4.12'
implementation 'org.jfrog.artifactory.client:artifactory-java-client-services:+'
implementation 'org.jfrog.artifactory.client:artifactory-java-client-api:+'
}
jar {
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}
Update on Nov 10th 2020:
I found that the artifactory sdk changed and I was using stale classes. I fixed those references in my classes to use newer SDK counterparts and the issues were gone.
I ended up using following gradle file to build everything I needed:
group 'artifactory-client-sdk'
version ''
apply plugin: 'java'
sourceCompatibility = 1.8
buildDir="${rootDir}/../out/artifactory_client_sdk"
def signbridge_lib="${rootDir}/../libs"
jar.baseName = 'artifactory-client-sdk'
repositories {
jcenter()
}
dependencies {
implementation 'ch.qos.logback:logback-classic:1.2.3'
testImplementation group: 'junit', name: 'junit', version: '4.12'
implementation 'org.jfrog.artifactory.client:artifactory-java-client-services:+'
implementation 'org.jfrog.artifactory.client:artifactory-java-client-api:+'
}
jar {
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA','**/org/jfrog/example'
}
task copyJar(type: Copy) {
from jar // copies output of file produced from jar task
into "${signbridge_lib}"
}
build.finalizedBy copyJar
Thanks a lot to Dror for great pointers!
The sources of the Artifactory Java client can be found in the jfrog/artifactory-client-java GitHub repository.
The services module used to be built as an uber jar containing 3rd party dependencies. On Oct 2019 the build has changed to create a thin jar instead of an uber jar.
To solve you issue you can either:
Include the 3rd party dependencies of the service module when building you application
Revert the change in build.gradle and continue to build an uber jar
Instead of building from source, you can consume the artifact from jcenter where is it being published by JFrog. The artifacts are published together with Maven .pom files which contains all the required 3rd party dependencies (all of them are available in jcenter).
In addition, there is an example Github project which shows how to consume the client library using Maven or Gradle.

Flutter - Error after include cloud firestore dependency.[Resolved]

I'd like a help to resolve this Issue. I cannot build my flutter application after insert the cloud firestore dependency at the pubspec.yaml
dependencies:
flutter:
sdk: flutter
firebase_core: ^0.4.3+2
cloud_firestore: ^0.13.0+1
Error description:
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve io.grpc:grpc-core:[1.21.0].
Required by:
project :app > io.grpc:grpc-okhttp:1.21.0
Failed to list versions for io.grpc:grpc-core.
Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml.
Could not HEAD 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'.
Connection reset
Failed to list versions for io.grpc:grpc-core.
Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml.
Could not HEAD 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'.
Connection reset
Failed to list versions for io.grpc:grpc-core.
Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml.
Could not HEAD 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'.
Connection reset
This seems to be an internet connection problem, so please check your network.
This is more looking as if some connection issues are present,but if not then
First of all checkout your .gradle version it should be greater than 5
If you have created your project recently or under one month then you may need to check this step.
Then go to android/build.gradle and check your dependencies It should look like
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
}
If you donot use kotlin support then no need to write that classpath.Its for those who has kotlin support enabled by default.
In android/gradle.properties
you should have
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
in app level build.gradle
defaultConfig {
minSdkVersion 23
}
and most importantly you should have downloaded your google-services.json file in your android project folder. For Firebase you also require sha1 or sometimes sha256 keys.
Now it should run properly.
May it helped you :)
`

Flutter firebase version conflict firebase messaging

I have a firebase flutter app, everything worked, but when I added firebase_messaging: ^5.1.4. The app gives this:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[18.0.
0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:18.0.0 -> com.google.firebase:firebase-iid#[18.0.0], but fire
base-iid version was 19.0.0.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'firebase_messaging' which depends onto com.google.firebase:firebase-messaging#18.0.
0
-- Project 'app' depends onto com.google.firebase:firebase-core#17.0.0
-- Project 'app' depends on project 'cloud_functions' which depends onto com.google.firebase:firebase-functions#17.0.0
-- Project 'app' depends on project 'firebase_core' which depends onto com.google.firebase:firebase-core#16.0.9
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
These are my other packages
firebase_auth: ^0.11.1+12
firebase_storage: ^3.0.4
cloud_firestore: ^0.12.7+1
cloud_functions: ^0.4.1+1
(they all work)
I have this in my build gradle: classpath 'com.google.gms:google-services:4.2.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
Is there a way of fixing this?
Thank you very much!
I'm currently trying this:
in the app level build.gradle I have this:
apply plugin: 'com.google.gms.google-services'
I'm adding this:
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
(after apply plugin: 'com.google.gms.google-services')
Include Firebase Core dependency in pub spec.yaml and not specifying the versions of firebase dependencies resolve most of the issues.
https://pub.dev/packages/firebase_core
run these two lines
rm Podfile.lock
pod install --repo-update
these will does the job. it took my two days to fix it

Could Not File: Corda Crash Shell during Gradle Build

We are using artifactory to connect through a firewall to the internet. When running ./gradlew clean build we get the following exception message:
Could not resolve all dependencies for configuration ':java-source:testCompileClasspath'.
> Could not find com.github.corda.crash:crash.shell:9d242da2a10e686f33a3aefc69e4768824ad0716.
Searched in the following locations:
http://code-artifacts.bankofamerica.com:18081/artifactory/virtual-java/com/github/corda/crash/crash.shell/9d242da2a10e686f33a3aefc69e4768824ad0716/crash.shell-9d242da2a10e686f33a3aefc69e4768824ad0716.pom
http://code-artifacts.bankofamerica.com:18081/artifactory/virtual-java/com/github/corda/crash/crash.shell/9d242da2a10e686f33a3aefc69e4768824ad0716/crash.shell-9d242da2a10e686f33a3aefc69e4768824ad0716.jar
Required by:
project :java-source > net.corda:corda-node-driver:1.0.0 > net.corda:corda-test-utils:1.0.0 > net.corda:corda-node:1.0.0
We are wondering if the version number of crash.shell is having an affect on jar lookup.
In Corda V1.0, net.corda:corda-node:1.0.0 lists com.github.corda.crash:crash.shell:9d242da2a10e686f33a3aefc69e4768824ad0716 as a compile dependency. This corresponds to https://github.com/corda/crash/tree/9d242da2a10e686f33a3aefc69e4768824ad0716/shell.
If you are behind a firewall and this dependency isn't present in your artifactory, the build will fail.
This is now in the R3 corda-dependencies repo so you just need to update your build.gradle:
repositories {
jcenter()
maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases' }
maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-dependencies' }
}

Springfuse - Failed to execute goal: generate

I try to generate an Eclipse Project with Springfuse code generator, based on a MySql database. I have filled up the form at http://www.springfuse.com/, and it generated following Maven command:
mvn -U archetype:generate -DarchetypeGroupId=com.springfuse.archetypes -DarchetypeArtifactId=quickstart -DarchetypeVersion=3.0.108 -DgroupId=com.company.demo -Dpackage=com.company.demo -DartifactId=myproject -Dversion=1.0.0 -DfrontEnd=jsf2Spring -Demail=peter.varga.sp#gmail.com -Dpassword=none -DjdbcGroupId=mysql -DjdbcArtifactId=mysql-connector-java -DjdbcVersion=5.1.25 -DjdbcDriver=com.mysql.jdbc.Driver -DjdbcUser=root -DjdbcPassword=qwe123 -DjdbcUrl=jdbc:mysql://localhost/test -DinteractiveMode=false -DarchetypeRepository=http://maven2.springfuse.com/
I opened a command window, copied the command as it is, and run it, but got following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.springfuse.archetypes:quickstart:3.0.108) -> [Help 1]
My environment details:
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: c:\Prog\Maven\Maven.3.2.1
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: c:\Program Files\Java\jdk1.7.0_51\jre
Default locale: en_US, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Does anybody has an idea, what the problem is?
Thanks.
Please check the settings of proxy / firewall springfuse. Also check the Apache Maven, because it needs to download the dependencies on the Internet. And if it fails, then its usually you need to tell him about the http proxy you need to use.

Resources