3

Have been working on DataTorrent/ Apex for a while. Can SBT can be used to create DataTorrent (Java) Applications? While performing sbt clean assembly in the root directory of the DataTorrent Application encountered Build Success. But only the .jar file was created and no .apa file was created.

Following is the build.sbt

name := "MyApp"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies ++= Seq(
  "org.apache.kafka" % "kafka_2.11" % "0.9.0.1" % "provided",
  "org.apache.apex" % "malhar-library" % "3.4.0" % "provided",
  "org.apache.apex" % "malhar-contrib" % "3.4.0" % "provided"
)

resolvers += Resolver.sonatypeRepo("public")

And the plugin.sbt:

logLevel := Level.Warn
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.12.0")

Is that a bug in DT or am I missing out on something? The same thing works fine with Maven. Came across this when I saw the following post: SBTWithDT

New Coder
  • 499
  • 4
  • 22

1 Answers1

0

If you look into pom.xml generated by apex archetype, you can see following lines:

<execution>
    <phase>package</phase>
    <configuration>
        <target>
            <move file="${project.build.directory}/${project.artifactId}-${project.version}-apexapp.jar"
                  tofile="${project.build.directory}/${project.artifactId}-${project.version}.apa"/>
        </target>
    </configuration>
    <goals>
        <goal>run</goal>
    </goals>
</execution>

So, the .apa file is basically a renamed .jar.

Krever
  • 1,371
  • 1
  • 13
  • 32