I am trying to register my local spring cloud task jar file into spring cloud task data flow graphical interface. While registering the application local path is not getting identified and Register button is not getting enabled. My jar file location is C:\STS-WORK_SPACE\SPRING-BATCH\SCDFBatch\target\SCDFBatch-0.0.1-SNAPSHOT.jar and path I provided in the Dashboard is file:///C:/STS-WORK_SPACE/SPRING-BATCH/SCDFBatch/target/SCDFBatch-0.0.1-SNAPSHOT.jar. Please correct me if I am wrong here. I need someones help here.
2 Answers
Please have a look at the spring data flow documentation related to your question.
docs.spring.io/spring-cloud-dataflow/docs/current/reference/html/getting-started-deploying-spring-cloud-dataflow.html#getting-started-maven-configuration
As per the spring documentation, the maven localRepository is set to ${user.home}/.m2/repository/ by default.
Hence dont specify complete path of your artifact in the dashboard, rather specify maven resource details in the following format maven://group:artifact:version. Then spring dataflow server automatically picks it from your local maven repo.
- 156
- 1
- 8
This question is a bit old, but here's how you can do that with SCDF 2.4.0:
- Get the docker-compose from here: https://dataflow.spring.io/docs/installation/local/docker/
- Customize it to mount your local .m2 folder, as described here: https://dataflow.spring.io/docs/installation/local/docker-customize/ in the section
Maven Local Repository Mounting - Start Docker Compose
Then when SCDF is up, you need to register your artifact, e.g.
If you have a Maven project, do a mvn clean install for it, and in your .m2 folder you should have the artifacts (jar and pom). So verify that it's there first, before registering it.
- 1,494
- 1
- 24
- 44
-
there is no such section. `Maven Local Repository Mounting` – RamPrakash Aug 13 '21 at 18:05
