简体   繁体   中英

how to add dependencies to gradle / faas / visual studio code / java8

I don't know how much time I lost on it. I can't add to the simple faas function any jar.

faas-cli new --lang java8 test --prefix="domain"
faas-cli build -f tes.tyml

Great! - I have new simple and clean solution with java

then i opening build.gradle changes two lines: (adding one implementation and change repository to meaven)

plugins {
    id 'java-library'
}

dependencies {
     api 'org.apache.commons:commons-math3:3.6.1'
     implementation 'net.sf.jasperreports.jasperreports:6.10.0'
     implementation 'com.google.guava:guava:23.0'
     testImplementation 'junit:junit:4.12'
     compile project(':model')
}
repositories {
    mavenCentral {}
}

faas-cli build -f test.yml ./web-proxy/build.gradle

and then BOOM

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':function:compileJava'.
> Could not resolve all files for configuration ':function:compileClasspath'.
   > Could not find net.sf.jasperreports.jasperreports:6.10.0:.
     Required by:
         project :function

I can't add any jar to the faas java8 project for 4 hours! please help nowadays i'm development .net and here i was supposed to do a small quick function with jasper and that's all

You have a typo in the Jasper reports dependency (the separation character between the Maven group ID and the artifact ID should be a colon, but you have a dot). Try with this:

implementation 'net.sf.jasperreports:jasperreports:6.10.0'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM