Working on sync-with-meilisearch java-17 template and on deploying the function, I get buildJar fail error. Using self-hosted appwrite v1.4.3. Err: ```
Task :compileJava Note: /usr/local/server/src/main/java/io/openruntimes/java/Server.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /usr/local/server/src/main/java/io/openruntimes/java/Server.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Task :processResources Task :classes Task :buildJar FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':buildJar'.
Entry module-info.class is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.```
What dependencies did you add to your deps.gradle?
implementation 'io.appwrite:sdk-for-kotlin:4.0.0'
implementation 'com.meilisearch.sdk:meilisearch-java:0.11.2'
}```
What's in your folder that's being uploaded?
src/Main.java, static/index.html, deps.gradle, .env, Readme.md, and .gitignore
maybe you can try:
dependencies {
implementation 'io.appwrite:sdk-for-kotlin:4.0.0'
implementation 'com.meilisearch.sdk:meilisearch-java:0.11.2'
}
tasks.withType(Jar) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
I got it to build by doing this...i don't really know java to know more about this, though
worked thanks
[SOLVED] BuildJar failed on deploying function
Recommended threads
- Scheduled works locking the entire Maria...
I have a scheduled function and apparently that or something is locking the entire MariaDB database and Appwrite is giving MariaDB errors. This error persists e...
- Python Function not working
I am getting this issue as well. Doesnt look like there was a solution as you guys were not able to replicate. Below is my code as well as the error. I started...
- I can't share code between functions
Operating System: MacOS Appwrite Version: self-hosted 1.8.1 Appwrite CLI Version: 13.2.1 I want to split code up to share it between my functions. At the momen...