Skip to content

Commit 9f3f769

Browse files
author
Anil Nair
committed
Source Code Added
1 parent c3e9395 commit 9f3f769

11 files changed

Lines changed: 521 additions & 0 deletions

File tree

Procfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
web: java -Ddw.server.applicationConnectors[0].port=$PORT -Ddw.server.adminConnectors[0].port=14599 -jar target/SmsTransaction-1.0.jar server config.yml
2+
3+
4+

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SmsTransaction
2+
3+
How to start the SmsTransaction application
4+
---
5+
6+
1. Run `mvn clean install` to build your application
7+
1. Start application with `java -jar target/SmsTransaction-1.0.jar server config.yml`
8+
1. To check that your application is running enter url `http://localhost:<app-portnumber>`
9+
10+
Health Check
11+
---
12+
13+
To see your applications health enter url `http://localhost:<admin-portnumber>/healthcheck`
14+
15+
Deploy
16+
---
17+
18+
To be Added.

config.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
server:
2+
applicationConnectors:
3+
- type: http
4+
port: 9199
5+
adminConnectors:
6+
- type: http
7+
port: 9191
8+
allowedMethods:
9+
- GET
10+
logging:
11+
level: INFO
12+
appenders:
13+
- type: file
14+
currentLogFilename: <logfilename>
15+
threshold: ALL
16+
archive: true
17+
archivedLogFilenamePattern: <logfilename>-%d.log
18+
archivedFileCount: 5
19+
api_url: <url>
20+
api_key: <key>
21+
api_method: GET
22+
api_test: <test-url>

dependency-reduced-pom.xml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.vrsoft.sms</groupId>
5+
<artifactId>SmsTransaction</artifactId>
6+
<name>SmsTransaction</name>
7+
<version>1.0</version>
8+
<prerequisites>
9+
<maven>3.0.0</maven>
10+
</prerequisites>
11+
<build>
12+
<plugins>
13+
<plugin>
14+
<artifactId>maven-shade-plugin</artifactId>
15+
<version>2.4.1</version>
16+
<executions>
17+
<execution>
18+
<phase>package</phase>
19+
<goals>
20+
<goal>shade</goal>
21+
</goals>
22+
</execution>
23+
</executions>
24+
<configuration>
25+
<createDependencyReducedPom>true</createDependencyReducedPom>
26+
<transformers>
27+
<transformer />
28+
<transformer>
29+
<mainClass>${mainClass}</mainClass>
30+
</transformer>
31+
</transformers>
32+
<filters>
33+
<filter>
34+
<artifact>*:*</artifact>
35+
<excludes>
36+
<exclude>META-INF/*.SF</exclude>
37+
<exclude>META-INF/*.DSA</exclude>
38+
<exclude>META-INF/*.RSA</exclude>
39+
</excludes>
40+
</filter>
41+
</filters>
42+
</configuration>
43+
</plugin>
44+
<plugin>
45+
<artifactId>maven-jar-plugin</artifactId>
46+
<version>2.6</version>
47+
<configuration>
48+
<archive>
49+
<manifest>
50+
<addClasspath>true</addClasspath>
51+
<mainClass>${mainClass}</mainClass>
52+
</manifest>
53+
</archive>
54+
</configuration>
55+
</plugin>
56+
<plugin>
57+
<artifactId>maven-compiler-plugin</artifactId>
58+
<version>3.3</version>
59+
<configuration>
60+
<source>1.8</source>
61+
<target>1.8</target>
62+
</configuration>
63+
</plugin>
64+
<plugin>
65+
<artifactId>maven-source-plugin</artifactId>
66+
<version>2.4</version>
67+
<executions>
68+
<execution>
69+
<id>attach-sources</id>
70+
<goals>
71+
<goal>jar</goal>
72+
</goals>
73+
</execution>
74+
</executions>
75+
</plugin>
76+
<plugin>
77+
<artifactId>maven-javadoc-plugin</artifactId>
78+
<version>2.10.3</version>
79+
<executions>
80+
<execution>
81+
<id>attach-javadocs</id>
82+
<goals>
83+
<goal>jar</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
</plugins>
89+
</build>
90+
<reporting>
91+
<plugins>
92+
<plugin>
93+
<artifactId>maven-project-info-reports-plugin</artifactId>
94+
<version>2.8.1</version>
95+
<configuration>
96+
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
97+
<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
98+
</configuration>
99+
</plugin>
100+
<plugin>
101+
<artifactId>maven-javadoc-plugin</artifactId>
102+
<version>2.10.3</version>
103+
</plugin>
104+
</plugins>
105+
</reporting>
106+
<dependencyManagement>
107+
<dependencies>
108+
<dependency>
109+
<groupId>io.dropwizard</groupId>
110+
<artifactId>dropwizard-bom</artifactId>
111+
<version>${dropwizard.version}</version>
112+
<type>pom</type>
113+
<scope>import</scope>
114+
</dependency>
115+
</dependencies>
116+
</dependencyManagement>
117+
<properties>
118+
<dropwizard.version>1.0.4</dropwizard.version>
119+
<mainClass>com.vrsoft.sms.SmsTransactionApplication</mainClass>
120+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
121+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
122+
</properties>
123+
</project>
124+

pom.xml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
6+
7+
<modelVersion>4.0.0</modelVersion>
8+
<prerequisites>
9+
<maven>3.0.0</maven>
10+
</prerequisites>
11+
12+
<groupId>com.vrsoft.sms</groupId>
13+
<artifactId>SmsTransaction</artifactId>
14+
<version>1.0</version>
15+
<packaging>jar</packaging>
16+
<name>SmsTransaction</name>
17+
18+
<properties>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
21+
<dropwizard.version>1.0.0</dropwizard.version>
22+
<mainClass>com.vrsoft.sms.SmsTransactionApplication</mainClass>
23+
<dropwizard.version>1.0.4</dropwizard.version>
24+
</properties>
25+
26+
<dependencyManagement>
27+
<dependencies>
28+
<dependency>
29+
<groupId>io.dropwizard</groupId>
30+
<artifactId>dropwizard-bom</artifactId>
31+
<version>${dropwizard.version}</version>
32+
<type>pom</type>
33+
<scope>import</scope>
34+
</dependency>
35+
</dependencies>
36+
</dependencyManagement>
37+
38+
<dependencies>
39+
<dependency>
40+
<groupId>io.dropwizard</groupId>
41+
<artifactId>dropwizard-core</artifactId>
42+
</dependency>
43+
<dependency>
44+
<groupId>com.mashape.unirest</groupId>
45+
<artifactId>unirest-java</artifactId>
46+
<version>1.4.9</version>
47+
</dependency>
48+
</dependencies>
49+
50+
<build>
51+
<plugins>
52+
<plugin>
53+
<artifactId>maven-shade-plugin</artifactId>
54+
<version>2.4.1</version>
55+
<configuration>
56+
<createDependencyReducedPom>true</createDependencyReducedPom>
57+
<transformers>
58+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
59+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
60+
<mainClass>${mainClass}</mainClass>
61+
</transformer>
62+
</transformers>
63+
<!-- exclude signed Manifests -->
64+
<filters>
65+
<filter>
66+
<artifact>*:*</artifact>
67+
<excludes>
68+
<exclude>META-INF/*.SF</exclude>
69+
<exclude>META-INF/*.DSA</exclude>
70+
<exclude>META-INF/*.RSA</exclude>
71+
</excludes>
72+
</filter>
73+
</filters>
74+
</configuration>
75+
<executions>
76+
<execution>
77+
<phase>package</phase>
78+
<goals>
79+
<goal>shade</goal>
80+
</goals>
81+
</execution>
82+
</executions>
83+
</plugin>
84+
<plugin>
85+
<artifactId>maven-jar-plugin</artifactId>
86+
<version>2.6</version>
87+
<configuration>
88+
<archive>
89+
<manifest>
90+
<addClasspath>true</addClasspath>
91+
<mainClass>${mainClass}</mainClass>
92+
</manifest>
93+
</archive>
94+
</configuration>
95+
</plugin>
96+
<plugin>
97+
<artifactId>maven-compiler-plugin</artifactId>
98+
<version>3.3</version>
99+
<configuration>
100+
<source>1.8</source>
101+
<target>1.8</target>
102+
</configuration>
103+
</plugin>
104+
<plugin>
105+
<artifactId>maven-source-plugin</artifactId>
106+
<version>2.4</version>
107+
<executions>
108+
<execution>
109+
<id>attach-sources</id>
110+
<goals>
111+
<goal>jar</goal>
112+
</goals>
113+
</execution>
114+
</executions>
115+
</plugin>
116+
<plugin>
117+
<artifactId>maven-javadoc-plugin</artifactId>
118+
<version>2.10.3</version>
119+
<executions>
120+
<execution>
121+
<id>attach-javadocs</id>
122+
<goals>
123+
<goal>jar</goal>
124+
</goals>
125+
</execution>
126+
</executions>
127+
</plugin>
128+
</plugins>
129+
</build>
130+
131+
<reporting>
132+
<plugins>
133+
<plugin>
134+
<artifactId>maven-project-info-reports-plugin</artifactId>
135+
<version>2.8.1</version>
136+
<configuration>
137+
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
138+
<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
139+
</configuration>
140+
</plugin>
141+
<plugin>
142+
<artifactId>maven-javadoc-plugin</artifactId>
143+
<version>2.10.3</version>
144+
</plugin>
145+
</plugins>
146+
</reporting>
147+
</project>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.vrsoft.sms;
2+
3+
import com.vrsoft.sms.resources.Sms;
4+
5+
import io.dropwizard.Application;
6+
import io.dropwizard.setup.Bootstrap;
7+
import io.dropwizard.setup.Environment;
8+
9+
public class SmsTransactionApplication extends Application<SmsTransactionConfiguration> {
10+
11+
public static void main(final String[] args) throws Exception {
12+
new SmsTransactionApplication().run(args);
13+
}
14+
15+
@Override
16+
public String getName() {
17+
return "SmsTransaction";
18+
}
19+
20+
@Override
21+
public void initialize(final Bootstrap<SmsTransactionConfiguration> bootstrap) {
22+
23+
}
24+
25+
@Override
26+
public void run(final SmsTransactionConfiguration configuration,
27+
final Environment environment) {
28+
final Sms sms = new Sms(configuration);
29+
environment.jersey().register(sms);
30+
}
31+
32+
}

0 commit comments

Comments
 (0)