1

When I am trying to give the below command in shell I am getting the below error. Can you please let me know why I am getting this error. I am trying to execute the below link program

Maven Repository local: C:\maven

https://www.javainuse.com/spring/cloud-data-flow

Error :

    dataflow:>app register --name source-app --type source --uri maven://com.spring.cloud:soruce:jar:0.0.1-SNAPSHOT
    dataflow:>app register --name processor-app --type processor --uri maven://com.spring.cloud:processor:jar:0.0.1-SNAPSHOT
    dataflow:>app register --name sink-app --type sink --uri maven://com.spring.cloud:sink:jar:0.0.1-SNAPSHOT
    stream create --name log-data --definition 'source-app | processor-app | sink-app'

 dataflow:>stream deploy --name log-data
        Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: Failed to resolve MavenResource: com.javainuse:sink:jar:0.0.1-SNAPSHOT. Configured remote repository: : [springRepo]

springcloud data flow local Server:

java.lang.IllegalStateException: Failed to resolve MavenResource: com.javainuse:processor:jar:0.0.1-SNAPSHOT. Configured remote repository: : [springRepo]
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.javainuse:processor:jar:0.0.1-SNAPSHOT in springRepo (https://repo.spring.io/libs-snapshot)

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.spring.clouddata</groupId>
  <artifactId>sourceapp</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>sourceapp</name>
  <url>http://maven.apache.org</url>


    <parent>
        <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-parent</artifactId>
  <version>1.5.9.RELEASE</version>
 </parent>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Brixton.SR7</spring-cloud.version>
    </properties>


    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>       

    </dependencies>
<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>



    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>      

    </build>
</project>

1 Answer 1

2

You need to make sure that the apps you register via app register are indeed in the corresponding maven repository. It looks like you don't have them pushed. In case if you have your apps in custom maven repositories, then configure the maven repository.

Also, the app that SCDF server complains is different from what you registered above.

Sign up to request clarification or add additional context in comments.

4 Comments

I am connecting to my local repository only.Please let me know how to connect to my local maven repository.
The property --maven.localRepository points to your local maven repository. By default, it points to <UserHome>/.m2/repository.
Hi Gopinath, Can you please explain me what is the "the app that SCDF server complains is different from what you registered above." spring-cloud-dataflow-server-local-1.3.0.M1 spring-cloud-dataflow-shell-1.3.0.M1 spring cloud version:Brixton.SR7 Spring boot version:1.5.9.RELEASE
You get the exception: Could not find artifact com.javainuse:processor:jar:0.0.1-SNAPSHOT while you only registered the app maven://com.spring.cloud:processor:jar:0.0.1-SNAPSHOT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.