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
- I can't UNPAUSE my project with the free...
I received an email notifying me that my project had been paused due to inactivity, and the email included a link to "Restore project." However, that button red...
- Error trying to deploy functions from CL...
✗ Error • on-auth-create (6a00b2ab000c9ce2949b) • Server Error ✗ Error: No functions were pushed. Prject ID: 69ffe0270033a4ac420a
- Intermittent Deploy and Execution Errors...
Project: project-fra-658e2f5f4ba30df91177 Function ID: 69bde006001c56757f49 **Several execution errors with:** Timed out waiting for runtime.\nError Code: 400...