Skip to content

Commit e533792

Browse files
author
gm2552
committed
Initial commit.
1 parent 9fa966b commit e533792

23 files changed

Lines changed: 1447 additions & 0 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121

2222
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2323
hs_err_pid*
24+
/.classpath
25+
/.project

pom.xml

Lines changed: 326 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,326 @@
1+
<?xml version="1.0"?>
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/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.nhind</groupId>
5+
<artifactId>direct-smtp-mq-gateway</artifactId>
6+
<version>6.0-SNAPSHOT</version>
7+
<packaging>jar</packaging>
8+
<name>DirectProject Java RI Lightweight SMTP Server Gateway Standalone Spring Boot Micro-service Application</name>
9+
<description>DirectProject Java RI Lightweight SMTP Server Gateway Standalone Spring Boot Micro-service Application</description>
10+
<url>http://api.nhindirect.org/x/www/api.nhindirect.org/java/site/config/direct-smtp-mq-gateway/${project.version}</url>
11+
<scm>
12+
<url>scm:git:https://github.com/DirectProject/nhin-d.git</url>
13+
<connection>scm:git:https://github.com/DirectProject/nhin-d.git</connection>
14+
</scm>
15+
<prerequisites>
16+
<maven>3.0.0</maven>
17+
</prerequisites>
18+
<parent>
19+
<groupId>org.springframework.boot</groupId>
20+
<artifactId>spring-boot-starter-parent</artifactId>
21+
<version>2.1.0.M4</version>
22+
</parent>
23+
<developers>
24+
<developer>
25+
<name>Greg Meyer</name>
26+
<id>GM2552</id>
27+
<email>gm2552@cerner.com</email>
28+
<roles>
29+
<role>owner</role>
30+
</roles>
31+
</developer>
32+
</developers>
33+
34+
<licenses>
35+
<license>
36+
<name>New BSD License</name>
37+
<url>http://nhindirect.org/BSDLicense</url>
38+
</license>
39+
</licenses>
40+
<properties>
41+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
42+
</properties>
43+
<repositories>
44+
<!-- Temp repository for Spring Boot Milestone -->
45+
<repository>
46+
<id>spring-milestone</id>
47+
<name>Spring Milestone Releases</name>
48+
<url>https://repo.spring.io/milestone/</url>
49+
</repository>
50+
</repositories>
51+
<dependencyManagement>
52+
<dependencies>
53+
<dependency>
54+
<groupId>org.springframework.boot</groupId>
55+
<artifactId>spring-boot-dependencies</artifactId>
56+
<version>2.1.0.M4</version>
57+
<type>pom</type>
58+
<scope>import</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>io.pivotal.spring.cloud</groupId>
62+
<artifactId>spring-cloud-services-dependencies</artifactId>
63+
<version>2.0.1.RELEASE</version>
64+
<type>pom</type>
65+
<scope>import</scope>
66+
</dependency>
67+
<dependency>
68+
<groupId>org.springframework.cloud</groupId>
69+
<artifactId>spring-cloud-starter-parent</artifactId>
70+
<version>Greenwich.M1</version>
71+
<type>pom</type>
72+
<scope>import</scope>
73+
</dependency>
74+
</dependencies>
75+
</dependencyManagement>
76+
<dependencies>
77+
<dependency>
78+
<groupId>org.springframework.boot</groupId>
79+
<artifactId>spring-boot-starter</artifactId>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.springframework.boot</groupId>
83+
<artifactId>spring-boot-starter-actuator</artifactId>
84+
</dependency>
85+
<dependency>
86+
<groupId>org.springframework.cloud</groupId>
87+
<artifactId>spring-cloud-config-client</artifactId>
88+
</dependency>
89+
<dependency>
90+
<groupId>io.pivotal.spring.cloud</groupId>
91+
<artifactId>spring-cloud-services-starter-config-client</artifactId>
92+
<exclusions>
93+
<exclusion>
94+
<groupId>org.codehaus.jackson</groupId>
95+
<artifactId>jackson-mapper-asl</artifactId>
96+
</exclusion>
97+
</exclusions>
98+
</dependency>
99+
<dependency>
100+
<groupId>org.springframework.cloud</groupId>
101+
<artifactId>spring-cloud-starter-config</artifactId>
102+
<exclusions>
103+
<exclusion>
104+
<groupId>org.bouncycastle</groupId>
105+
<artifactId>bcpkix-jdk15on</artifactId>
106+
</exclusion>
107+
</exclusions>
108+
</dependency>
109+
<dependency>
110+
<groupId>org.springframework.cloud</groupId>
111+
<artifactId>spring-cloud-stream</artifactId>
112+
</dependency>
113+
<dependency>
114+
<groupId>org.springframework.cloud</groupId>
115+
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
116+
</dependency>
117+
<dependency>
118+
<groupId>org.springframework.boot</groupId>
119+
<artifactId>spring-boot-configuration-processor</artifactId>
120+
<optional>true</optional>
121+
</dependency>
122+
<dependency>
123+
<groupId>org.nhind</groupId>
124+
<artifactId>direct-common</artifactId>
125+
<version>6.0-SNAPSHOT</version>
126+
</dependency>
127+
<dependency>
128+
<groupId>org.subethamail</groupId>
129+
<artifactId>subethasmtp</artifactId>
130+
<version>3.1.7</version>
131+
<exclusions>
132+
<exclusion>
133+
<artifactId>mail</artifactId>
134+
<groupId>javax.mail</groupId>
135+
</exclusion>
136+
</exclusions>
137+
</dependency>
138+
<dependency>
139+
<groupId>org.apache.james</groupId>
140+
<artifactId>james</artifactId>
141+
<version>2.3.2</version>
142+
<exclusions>
143+
<exclusion>
144+
<artifactId>mail</artifactId>
145+
<groupId>javax.mail</groupId>
146+
</exclusion>
147+
</exclusions>
148+
</dependency>
149+
<dependency>
150+
<groupId>commons-net</groupId>
151+
<artifactId>commons-net</artifactId>
152+
<version>3.6</version>
153+
<scope>compile</scope>
154+
</dependency>
155+
<dependency>
156+
<groupId>org.springframework.cloud</groupId>
157+
<artifactId>spring-cloud-stream-test-support</artifactId>
158+
<scope>test</scope>
159+
</dependency>
160+
<dependency>
161+
<groupId>org.springframework.boot</groupId>
162+
<artifactId>spring-boot-starter-test</artifactId>
163+
<scope>test</scope>
164+
</dependency>
165+
</dependencies>
166+
<build>
167+
<plugins>
168+
<plugin>
169+
<groupId>org.apache.maven.plugins</groupId>
170+
<artifactId>maven-source-plugin</artifactId>
171+
<version>3.0.1</version>
172+
<executions>
173+
<execution>
174+
<goals>
175+
<goal>jar</goal>
176+
</goals>
177+
</execution>
178+
</executions>
179+
</plugin>
180+
<plugin>
181+
<groupId>org.apache.maven.plugins</groupId>
182+
<artifactId>maven-compiler-plugin</artifactId>
183+
<executions>
184+
<execution>
185+
<goals>
186+
<goal>testCompile</goal>
187+
</goals>
188+
<phase>compile</phase>
189+
</execution>
190+
</executions>
191+
<configuration>
192+
<fork>true</fork>
193+
<optimize>true</optimize>
194+
<showDeprecation>true</showDeprecation>
195+
<encoding>UTF-8</encoding>
196+
<source>1.8</source>
197+
<target>1.8</target>
198+
</configuration>
199+
</plugin>
200+
<plugin>
201+
<groupId>org.springframework.boot</groupId>
202+
<artifactId>spring-boot-maven-plugin</artifactId>
203+
</plugin>
204+
<!-- for releases only
205+
<plugin>
206+
<groupId>org.apache.maven.plugins</groupId>
207+
<artifactId>maven-javadoc-plugin</artifactId>
208+
<version>2.6.1</version>
209+
<configuration>
210+
<charset>UTF-8</charset>
211+
<docencoding>UTF-8</docencoding>
212+
<source>1.8</source>
213+
<show>public</show>
214+
</configuration>
215+
<executions>
216+
<execution>
217+
<phase>package</phase>
218+
<id>attach-javadocs</id>
219+
<goals>
220+
<goal>jar</goal>
221+
</goals>
222+
</execution>
223+
</executions>
224+
</plugin>
225+
<plugin>
226+
<groupId>org.apache.maven.plugins</groupId>
227+
<artifactId>maven-gpg-plugin</artifactId>
228+
<executions>
229+
<execution>
230+
<id>sign-artifacts</id>
231+
<phase>package</phase>
232+
<goals>
233+
<goal>sign</goal>
234+
</goals>
235+
</execution>
236+
</executions>
237+
</plugin>
238+
-->
239+
</plugins>
240+
</build>
241+
<reporting>
242+
<plugins>
243+
<plugin>
244+
<groupId>org.apache.maven.plugins</groupId>
245+
<artifactId>maven-project-info-reports-plugin</artifactId>
246+
<version>2.9</version>
247+
</plugin>
248+
<plugin>
249+
<groupId>org.apache.maven.plugins</groupId>
250+
<artifactId>maven-javadoc-plugin</artifactId>
251+
<version>3.0.1</version>
252+
<configuration>
253+
<charset>UTF-8</charset>
254+
<docencoding>UTF-8</docencoding>
255+
<docfilessubdirs>true</docfilessubdirs>
256+
<detectJavaApiLink>true</detectJavaApiLink>
257+
<detectLinks>true</detectLinks>
258+
<source>1.8</source>
259+
<show>protected</show>
260+
</configuration>
261+
</plugin>
262+
<plugin>
263+
<groupId>org.apache.maven.plugins</groupId>
264+
<artifactId>maven-pmd-plugin</artifactId>
265+
<configuration>
266+
<targetJdk>1.8</targetJdk>
267+
</configuration>
268+
</plugin>
269+
<plugin>
270+
<groupId>org.apache.maven.plugins</groupId>
271+
<artifactId>maven-surefire-report-plugin</artifactId>
272+
</plugin>
273+
<plugin>
274+
<groupId>org.apache.maven.plugins</groupId>
275+
<artifactId>maven-jxr-plugin</artifactId>
276+
</plugin>
277+
<plugin>
278+
<groupId>org.codehaus.mojo</groupId>
279+
<artifactId>findbugs-maven-plugin</artifactId>
280+
<version>1.2</version>
281+
<configuration>
282+
<effort>Max</effort>
283+
</configuration>
284+
</plugin>
285+
<plugin>
286+
<groupId>org.codehaus.mojo</groupId>
287+
<artifactId>taglist-maven-plugin</artifactId>
288+
<configuration>
289+
<tags>
290+
<tag>FIXME</tag>
291+
<tag>TODO</tag>
292+
<tag>WARN</tag>
293+
<tag>@deprecated</tag>
294+
</tags>
295+
</configuration>
296+
</plugin>
297+
<plugin>
298+
<groupId>com.atlassian.maven.plugins</groupId>
299+
<artifactId>maven-clover2-plugin</artifactId>
300+
<version>3.0.2</version>
301+
<configuration>
302+
<licenseLocation>${project.basedir}/../../licenses/clover.license</licenseLocation>
303+
</configuration>
304+
</plugin>
305+
</plugins>
306+
</reporting>
307+
<distributionManagement>
308+
<site>
309+
<id>nhind-site</id>
310+
<name>NHIN Direct API publication site</name>
311+
<url>sftp://api.nhindirect.org/x/www/api.nhindirect.org/java/site/config/direct-smtp-mq-gateway/${project.version}</url>
312+
</site>
313+
<snapshotRepository>
314+
<id>sonatype-snapshot</id>
315+
<name>Sonatype OSS Maven SNAPSHOT Repository</name>
316+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
317+
<uniqueVersion>false</uniqueVersion>
318+
</snapshotRepository>
319+
<repository>
320+
<id>sonatype-release</id>
321+
<name>Sonatype OSS Maven Release Repositor</name>
322+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
323+
<uniqueVersion>false</uniqueVersion>
324+
</repository>
325+
</distributionManagement>
326+
</project>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package org.nhindirect.smtpmq.gateway.boot;
2+
3+
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
4+
import org.springframework.beans.factory.annotation.Autowired;
5+
import org.springframework.boot.CommandLineRunner;
6+
import org.springframework.boot.WebApplicationType;
7+
import org.springframework.boot.autoconfigure.SpringBootApplication;
8+
import org.springframework.boot.builder.SpringApplicationBuilder;
9+
import org.springframework.context.annotation.ComponentScan;
10+
import org.subethamail.smtp.server.SMTPServer;
11+
12+
@ComponentScan({"org.nhindirect.smtpmq.gateway"})
13+
@SpringBootApplication
14+
public class SmtpGatewayApplication implements CommandLineRunner
15+
{
16+
@Autowired
17+
protected ConnectionFactory connectionFactory;
18+
19+
@Autowired
20+
protected SMTPServer smtpServer;
21+
22+
public static void main(String[] args)
23+
{
24+
new SpringApplicationBuilder(SmtpGatewayApplication.class)
25+
.web(WebApplicationType.NONE)
26+
.run(args);
27+
}
28+
29+
@Override
30+
public void run(String... args) throws Exception
31+
{
32+
smtpServer.start();
33+
}
34+
}

0 commit comments

Comments
 (0)