-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2586 from markheger/develop
mvn release test
- Loading branch information
Showing
8 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.PHONY: all clean | ||
|
||
TOPOLOGY_VERSION?=1.16.0 | ||
LIB_DIR=extlib | ||
BIN_LOC=classes | ||
DOWNLOAD_DIR=download | ||
JSI = $(STREAMS_INSTALL) | ||
|
||
|
||
all: runtopo | ||
|
||
javacompile: $(BIN_LOC) | ||
javac -g -classpath $(LIB_DIR)/streamsx.topology-$(TOPOLOGY_VERSION).jar:$(LIB_DIR)/gson-2.3.1.jar:$(JSI)/lib/com.ibm.streams.operator.samples.jar -d $(BIN_LOC) src/topo1/App.java | ||
${STREAMS_INSTALL}/bin/spl-make-toolkit -i . | ||
|
||
$(BIN_LOC): | ||
mkdir -p $(BIN_LOC) | ||
|
||
mvndownload: $(LIB_DIR) | ||
export TOPOLOGY_VERSION=$(TOPOLOGY_VERSION); mvn -f pom.xml --batch-mode dependency:copy-dependencies -DoutputDirectory=$(LIB_DIR) | ||
|
||
$(LIB_DIR): | ||
mkdir -p $(LIB_DIR) | ||
|
||
downloadlatest: $(DOWNLOAD_DIR) | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -Dartifact=com.ibm.streams:streamsx.topology:LATEST:jar | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -Dartifact=com.ibm.streams:streamsx.topology:LATEST:jar:sources | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -Dartifact=com.ibm.streams:streamsx.topology:LATEST:jar:javadoc | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -Dartifact=com.ibm.streams:streamsx.topology:LATEST:tgz:toolkit | ||
|
||
downloadstaging: $(DOWNLOAD_DIR) | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -DrepoUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -Dartifact=com.ibm.streams:streamsx.topology:$(TOPOLOGY_VERSION):jar | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -DrepoUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -Dartifact=com.ibm.streams:streamsx.topology:$(TOPOLOGY_VERSION):jar:sources | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -DrepoUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -Dartifact=com.ibm.streams:streamsx.topology:$(TOPOLOGY_VERSION):jar:javadoc | ||
mvn --batch-mode dependency:copy -DoutputDirectory=$(DOWNLOAD_DIR) -DrepoUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -Dartifact=com.ibm.streams:streamsx.topology:$(TOPOLOGY_VERSION):tgz:toolkit | ||
|
||
$(DOWNLOAD_DIR): | ||
mkdir -p $(DOWNLOAD_DIR) | ||
|
||
runtopo: mvndownload javacompile | ||
java -classpath $(BIN_LOC):$(LIB_DIR)/streamsx.topology-$(TOPOLOGY_VERSION).jar:$(LIB_DIR)/gson-2.3.1.jar:$(JSI)/lib/com.ibm.streams.operator.samples.jar topo1.App | ||
|
||
run: runtopo | ||
java -jar topo1.temperatureSensor.sab | ||
|
||
clean: | ||
rm -rf $(BIN_LOC) | ||
rm -rf $(LIB_DIR) | ||
rm -rf $(DOWNLOAD_DIR) | ||
rm -f topo1*.sab | ||
rm -f topo1*.json | ||
rm -rf output | ||
rm -rf toolkit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<info:toolkitInfoModel xmlns:common="http://www.ibm.com/xmlns/prod/streams/spl/common" | ||
xmlns:info="http://www.ibm.com/xmlns/prod/streams/spl/toolkitInfo"> | ||
<info:identity> | ||
<info:name>Sample Java Topology App</info:name> | ||
<info:description>Sample demonstrating how to build a JAVA Topology Application</info:description> | ||
<info:version>1.0.0</info:version> | ||
<info:requiredProductVersion>4.3.0</info:requiredProductVersion> | ||
</info:identity> | ||
<info:dependencies/> | ||
</info:toolkitInfoModel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>streamsx.java.topo.sample</groupId> | ||
<artifactId>streamsx.java.topo.sample</artifactId> | ||
<packaging>jar</packaging> | ||
<version>0.1.0</version> | ||
<name>streamsx.java.topo.sample</name> | ||
<repositories> | ||
<repository> | ||
<id>maven</id> | ||
<url>http://download.java.net/maven/2/</url> | ||
</repository> | ||
<!--repository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository--> | ||
</repositories> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.ibm.streams</groupId> | ||
<artifactId>streamsx.topology</artifactId> | ||
<version>${env.TOPOLOGY_VERSION}</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package topo1; | ||
|
||
import java.util.Random; | ||
import com.ibm.streamsx.topology.TStream; | ||
import com.ibm.streamsx.topology.Topology; | ||
import com.ibm.streamsx.topology.context.StreamsContextFactory; | ||
import com.ibm.streamsx.topology.function.Supplier; | ||
|
||
public class App { | ||
public static void main(String[] args) throws Exception{ | ||
|
||
Topology topology = new Topology("temperatureSensor"); | ||
Random random = new Random(); | ||
|
||
TStream<Double> readings = topology.endlessSource(new Supplier<Double>(){ | ||
@Override | ||
public Double get() { | ||
return random.nextGaussian(); | ||
} | ||
}); | ||
|
||
readings.print(); | ||
|
||
//StreamsContextFactory.getEmbedded().submit(topology); | ||
StreamsContextFactory.getStreamsContext("BUNDLE").submit(topology); | ||
|
||
} | ||
} |