streamsets/tutorials

Build Fails, missing dependency

Closed this issue · 3 comments

When trying to follow the sampleprocessor tutorial, when maven is downloading dependencies from this:
mvn clean package -DskipTests
This line is returned:
[WARNING] The POM for com.streamsets:streamsets-datacollector-api:jar:1.3.0.0-SNAPSHOT is missing, no dependency information available
This then causes the build to fail.

What did you specify as archetypeVersion when you created the template? You should be using something like 3.1.0.0 - the current version.

Its the same issue that seemed to be fixed in this Jira ticket https://issues.streamsets.com/browse/SDC-4237
I totally get you can manually change it, but it needs to be changed in two places in the file, whereas surely it should be inherited from the first time you change it. So rather than being this:

<properties>
    <streamsets.version>3.1.0.0</streamsets.version>
    <slf4j.version>1.7.7</slf4j.version>
    <junit.version>4.12</junit.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <!-- Core StreamSets Dependencies for Stage Libraries -->
    <!-- Need to be without snapshot at any the point of the release -->
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-api</artifactId>
      <version>1.3.0.0-SNAPSHOT</version>
      <scope>provided</scope>
    </dependency>

it should be this:

<properties>
    <streamsets.version>3.1.0.0</streamsets.version>
    <slf4j.version>1.7.7</slf4j.version>
    <junit.version>4.12</junit.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <!-- Core StreamSets Dependencies for Stage Libraries -->
    <!-- Need to be without snapshot at any the point of the release -->
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-api</artifactId>
      <version>${streamsets.version}</version>
      <scope>provided</scope>
    </dependency>

Just took a while to get up and going, and most of that is my super limited java/maven experience, but it was super confusing that the old dependency is relied upon. If I should post this in the main DC issue tracker let me know

It's more subtle than that, because the Data Collector version number can be ahead of the API version. I think the fix is to put something like <streamsets.api.version>3.1.0.0</streamsets.api.version> at the top and use ${streamsets.version} in the API dependency.

Created SDC-8589 - Custom Stage Archetype should define API version as a property.

Thanks!