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
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- HTTP POST to function returning "No Appw...
Hi everyone, I’m running into an issue with my self-hosted Appwrite instance. I’ve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...
- Can't add dart 3.5 runtime
Modified the `.env` to enable dart 3.5 runtime on my self-hosted instance but still can't find the runtime when creating a new function. I manually pulled the i...