Skip to content

Commit cbdcf3b

Browse files
committed
Initial check in.
0 parents  commit cbdcf3b

File tree

4 files changed

+418
-0
lines changed

4 files changed

+418
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/.idea
2+
/scala
3+
*.swp
4+
*.iml
5+
build
6+
dependency-reduced-pom.xml
7+
.DS_Store
8+
target/
9+

pom.xml

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
<project xmlns="http://maven.apache.org/POM/4.0.0"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22+
<modelVersion>4.0.0</modelVersion>
23+
24+
<groupId>com.amazonaws</groupId>
25+
<artifactId>scala-getting-started</artifactId>
26+
<version>1.0</version>
27+
<packaging>jar</packaging>
28+
29+
<properties>
30+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
31+
<java.version>1.8</java.version>
32+
<flink.version>1.6.2</flink.version>
33+
<scala.binary.version>2.11</scala.binary.version>
34+
<scala.version>2.11.12</scala.version>
35+
<kda.version>1.0.1</kda.version>
36+
</properties>
37+
38+
<dependencies>
39+
<dependency>
40+
<groupId>com.amazonaws</groupId>
41+
<artifactId>aws-kinesisanalytics-runtime</artifactId>
42+
<version>${kda.version}</version>
43+
</dependency>
44+
45+
<dependency>
46+
<groupId>org.apache.flink</groupId>
47+
<artifactId>flink-connector-kinesis_${scala.binary.version}</artifactId>
48+
<version>${flink.version}</version>
49+
</dependency>
50+
51+
<!-- Apache Flink dependencies -->
52+
<!-- These dependencies are provided, because they should not be packaged into the JAR file. -->
53+
<dependency>
54+
<groupId>org.apache.flink</groupId>
55+
<artifactId>flink-scala_${scala.binary.version}</artifactId>
56+
<version>${flink.version}</version>
57+
<scope>provided</scope>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.apache.flink</groupId>
61+
<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
62+
<version>${flink.version}</version>
63+
<scope>provided</scope>
64+
</dependency>
65+
66+
<!-- Scala Library, provided by Flink as well. -->
67+
<dependency>
68+
<groupId>org.scala-lang</groupId>
69+
<artifactId>scala-library</artifactId>
70+
<version>${scala.version}</version>
71+
<scope>provided</scope>
72+
</dependency>
73+
74+
<!-- Add connector dependencies here. They must be in the default scope (compile). -->
75+
76+
<!-- Example:
77+
78+
<dependency>
79+
<groupId>org.apache.flink</groupId>
80+
<artifactId>flink-connector-kafka-0.10_${scala.binary.version}</artifactId>
81+
<version>${flink.version}</version>
82+
</dependency>
83+
-->
84+
85+
<!-- Add logging framework, to produce console output when running in the IDE. -->
86+
<!-- These dependencies are excluded from the application JAR by default. -->
87+
<dependency>
88+
<groupId>org.slf4j</groupId>
89+
<artifactId>slf4j-log4j12</artifactId>
90+
<version>1.7.7</version>
91+
<scope>runtime</scope>
92+
</dependency>
93+
<dependency>
94+
<groupId>log4j</groupId>
95+
<artifactId>log4j</artifactId>
96+
<version>1.2.17</version>
97+
<scope>runtime</scope>
98+
</dependency>
99+
</dependencies>
100+
101+
<build>
102+
<plugins>
103+
<!-- We use the maven-shade plugin to create a fat jar that contains all necessary dependencies. -->
104+
<!-- Change the value of <mainClass>...</mainClass> if your program entry point changes. -->
105+
<plugin>
106+
<groupId>org.apache.maven.plugins</groupId>
107+
<artifactId>maven-shade-plugin</artifactId>
108+
<version>3.0.0</version>
109+
<executions>
110+
<!-- Run shade goal on package phase -->
111+
<execution>
112+
<phase>package</phase>
113+
<goals>
114+
<goal>shade</goal>
115+
</goals>
116+
<configuration>
117+
<artifactSet>
118+
<excludes>
119+
<exclude>org.apache.flink:force-shading</exclude>
120+
<exclude>com.google.code.findbugs:jsr305</exclude>
121+
<exclude>org.slf4j:*</exclude>
122+
<exclude>log4j:*</exclude>
123+
</excludes>
124+
</artifactSet>
125+
<filters>
126+
<filter>
127+
<!-- Do not copy the signatures in the META-INF folder.
128+
Otherwise, this might cause SecurityExceptions when using the JAR. -->
129+
<artifact>*:*</artifact>
130+
<excludes>
131+
<exclude>META-INF/*.SF</exclude>
132+
<exclude>META-INF/*.DSA</exclude>
133+
<exclude>META-INF/*.RSA</exclude>
134+
</excludes>
135+
</filter>
136+
</filters>
137+
<transformers>
138+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
139+
<mainClass>com.amazonaws.services.kinesisanalytics.StreamingJob</mainClass>
140+
</transformer>
141+
</transformers>
142+
</configuration>
143+
</execution>
144+
</executions>
145+
</plugin>
146+
147+
<!-- Java Compiler -->
148+
<plugin>
149+
<groupId>org.apache.maven.plugins</groupId>
150+
<artifactId>maven-compiler-plugin</artifactId>
151+
<version>3.1</version>
152+
<configuration>
153+
<source>1.8</source>
154+
<target>1.8</target>
155+
</configuration>
156+
</plugin>
157+
158+
<!-- Scala Compiler -->
159+
<plugin>
160+
<groupId>net.alchim31.maven</groupId>
161+
<artifactId>scala-maven-plugin</artifactId>
162+
<version>3.2.2</version>
163+
<executions>
164+
<execution>
165+
<goals>
166+
<goal>compile</goal>
167+
<goal>testCompile</goal>
168+
</goals>
169+
</execution>
170+
</executions>
171+
</plugin>
172+
173+
<!-- Eclipse Scala Integration -->
174+
<plugin>
175+
<groupId>org.apache.maven.plugins</groupId>
176+
<artifactId>maven-eclipse-plugin</artifactId>
177+
<version>2.8</version>
178+
<configuration>
179+
<downloadSources>true</downloadSources>
180+
<projectnatures>
181+
<projectnature>org.scala-ide.sdt.core.scalanature</projectnature>
182+
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
183+
</projectnatures>
184+
<buildcommands>
185+
<buildcommand>org.scala-ide.sdt.core.scalabuilder</buildcommand>
186+
</buildcommands>
187+
<classpathContainers>
188+
<classpathContainer>org.scala-ide.sdt.launching.SCALA_CONTAINER</classpathContainer>
189+
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
190+
</classpathContainers>
191+
<excludes>
192+
<exclude>org.scala-lang:scala-library</exclude>
193+
<exclude>org.scala-lang:scala-compiler</exclude>
194+
</excludes>
195+
<sourceIncludes>
196+
<sourceInclude>**/*.scala</sourceInclude>
197+
<sourceInclude>**/*.java</sourceInclude>
198+
</sourceIncludes>
199+
</configuration>
200+
</plugin>
201+
<plugin>
202+
<groupId>org.codehaus.mojo</groupId>
203+
<artifactId>build-helper-maven-plugin</artifactId>
204+
<version>1.7</version>
205+
<executions>
206+
<!-- Add src/main/scala to eclipse build path -->
207+
<execution>
208+
<id>add-source</id>
209+
<phase>generate-sources</phase>
210+
<goals>
211+
<goal>add-source</goal>
212+
</goals>
213+
<configuration>
214+
<sources>
215+
<source>src/main/scala</source>
216+
</sources>
217+
</configuration>
218+
</execution>
219+
<!-- Add src/test/scala to eclipse build path -->
220+
<execution>
221+
<id>add-test-source</id>
222+
<phase>generate-test-sources</phase>
223+
<goals>
224+
<goal>add-test-source</goal>
225+
</goals>
226+
<configuration>
227+
<sources>
228+
<source>src/test/scala</source>
229+
</sources>
230+
</configuration>
231+
</execution>
232+
</executions>
233+
</plugin>
234+
</plugins>
235+
</build>
236+
237+
<!-- This profile helps to make things run out of the box in IntelliJ -->
238+
<!-- Its adds Flink's core classes to the runtime class path. -->
239+
<!-- Otherwise they are missing in IntelliJ, because the dependency is 'provided' -->
240+
<profiles>
241+
<profile>
242+
<id>add-dependencies-for-IDEA</id>
243+
244+
<activation>
245+
<property>
246+
<name>idea.version</name>
247+
</property>
248+
</activation>
249+
250+
<dependencies>
251+
<dependency>
252+
<groupId>org.apache.flink</groupId>
253+
<artifactId>flink-scala_${scala.binary.version}</artifactId>
254+
<version>${flink.version}</version>
255+
<scope>compile</scope>
256+
</dependency>
257+
<dependency>
258+
<groupId>org.apache.flink</groupId>
259+
<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
260+
<version>${flink.version}</version>
261+
<scope>compile</scope>
262+
</dependency>
263+
<dependency>
264+
<groupId>org.scala-lang</groupId>
265+
<artifactId>scala-library</artifactId>
266+
<version>${scala.version}</version>
267+
<scope>compile</scope>
268+
</dependency>
269+
</dependencies>
270+
</profile>
271+
</profiles>
272+
273+
</project>

src/main/resources/log4j.properties

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
19+
log4j.rootLogger=INFO, console
20+
21+
log4j.appender.console=org.apache.log4j.ConsoleAppender
22+
log4j.appender.console.layout=org.apache.log4j.PatternLayout
23+
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n

0 commit comments

Comments
 (0)