I am using the sbt assembly plugin. I've added screenshot for reference:

[image: Inline image 1]

To give better view of the things:
The java directory inside the src is DT Application
The Scala directory is the Random Kafka Generator.

And on doing the sbt assembly, only AlertDeterminer-assembly-1.0.jar is
created inside the target/scala-2.11/ directory.

To give more information, following are the contents of build.sbt:

name := "AlertDeterminer"

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")

Also, are you sure I need to used the sbt-maven-plugin? The reason I am
asking is it is required for working other way round. i.e. pom to build.sbt.

Meanwhile, I am looking for the 2nd option.

Thanks
Ankit.


On Mon, Jul 11, 2016 at 2:56 PM, hsy...@gmail.com <hsy...@gmail.com> wrote:

> I've never used SBT to build Apex application. But I guess you can try 2
> things here
> Use the sbt maven plugin
> https://github.com/shivawu/sbt-maven-plugin
> or use sbt assembly plugin
> https://github.com/sbt/sbt-assembly
>
> In the 2nd way, you need to translate the plugin configuration part in
> pom.xml to sbt scripts.
> The configuration usually look like this
>
> I wish this helps
>
> <plugin>
>   <artifactId>maven-assembly-plugin</artifactId>
>   <executions>
>     <execution>
>       <id>app-package-assembly</id>
>       <phase>package</phase>
>       <goals>
>         <goal>single</goal>
>       </goals>
>       <configuration>
>         
> <finalName>${project.artifactId}-${project.version}-apexapp</finalName>
>         <appendAssemblyId>false</appendAssemblyId>
>         <descriptors>
>           <descriptor>src/assemble/appPackage.xml</descriptor>
>         </descriptors>
>         <archiverConfig>
>           <defaultDirectoryMode>0755</defaultDirectoryMode>
>         </archiverConfig>
>         <archive>
>           <manifestEntries>
>             <Class-Path>${apex.apppackage.classpath}</Class-Path>
>             <DT-Engine-Version>${apex.core.version}</DT-Engine-Version>
>             
> <DT-App-Package-Group-Id>${apex.apppackage.groupid}</DT-App-Package-Group-Id>
>             <DT-App-Package-Name>${project.artifactId}</DT-App-Package-Name>
>             
> <DT-App-Package-Version>${project.version}</DT-App-Package-Version>
>             
> <DT-App-Package-Display-Name>${project.name}</DT-App-Package-Display-Name>
>             
> <DT-App-Package-Description>${project.description}</DT-App-Package-Description>
>           </manifestEntries>
>         </archive>
>       </configuration>
>     </execution>
>   </executions>
> </plugin>
>
>
> On Mon, Jul 11, 2016 at 2:01 PM, Ankit Sarraf <ankit.sar...@cloudwick.com>
> wrote:
>
>> I am using SBT to create a DataTorrent Application. The project comprises
>> of 2 parts. Part 1 is a Random Kafka Generator built using Scala. Part 2 is
>> the DataTorrent Application (Java) to ingest data, process it, and write to
>> HDFS.
>>
>> There are no errors while doing sbt assembly.
>>
>> Although, Uber JAR is created successfully, .apa file is not created. So
>> does DataTorrent work with SBT?
>>
>> Thanks
>> Ankit.
>>
>
>

Reply via email to