Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using built-from-source version in another project on windows system #2777

Closed
eleven-dimension opened this issue Sep 12, 2023 · 6 comments
Closed

Comments

@eleven-dimension
Copy link

I am following the steps here to use the latest version of djl.

You also need to change directory to djl/bom. Then build and publish it to maven local same as what was done in djl.

Since gradlew is not executable in bom folder, I run the command: ..\gradlew build but get:

PS D:\Project\DJL\djl\bom> ..\gradlew build
Found D:\Project\DJL\djl\\gradle\wrapper\gradle-wrapper.jar

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Project\DJL\djl\bom\build.gradle' line: 14

* What went wrong:
A problem occurred evaluating root project 'bom'.
> Could not get unknown property 'djl_version' for root project 'bom' of type org.gradle.api.Project.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 813ms

Is there anything wrong with my operation? Thank you very much and any help would be much appreciated!

@frankfliu
Copy link
Contributor

Windows is a bit tricky. It doesn't support symbolic link.

First of all, you run the build at top level, you don't need manually build in bom folder, the following command build publish everything to mavenLocal:

cd djl
gradlew pTML

If you want to build individaul project, you can do the following:

cd djl
gradlew :bom:pTML

@eleven-dimension
Copy link
Author

But bom is not listed in projects list and I get Cannot locate tasks that match ':bom:pTML' as project 'bom' not found in root project 'djl'.

@eleven-dimension
Copy link
Author

eleven-dimension commented Sep 13, 2023

def javaProjects() {
    return subprojects.findAll { new File(it.projectDir, "src/main").exists() }
}

It seems only directory whose subdirectory's path contains src/main is identified as a project?

@eleven-dimension
Copy link
Author

@frankfliu In folder \.m2\repository\ai\djl\bom\0.24.0-SNAPSHOT, the bom-0.24.0-SNAPSHOT.pom file cannot be generated, do I miss somthing? Thank you in advance!

@frankfliu
Copy link
Contributor

You are right, bom is not included the root project.

A few things you can try:

cd djl
gradlew -p bom pTML

If above doesn't work, you can copy gradlew.bat, gradle.properties and gradle folder into bom folder. The issue is caused by symbolic link on Widnows.

@eleven-dimension
Copy link
Author

Thank you very much for your help! Finally I can use djl in my university project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants