Skip to content

Commit a18f268

Browse files
author
Greg Meyer
authored
Merge pull request #4 from DirectProjectJavaRI/develop
Releasing 8.0.0
2 parents d07484b + dc6b787 commit a18f268

File tree

15 files changed

+148
-255
lines changed

15 files changed

+148
-255
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
hs_err_pid*
2424
/.classpath
2525
/.project
26+
/target/

pom.xml

Lines changed: 44 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>org.nhind</groupId>
77
<artifactId>xdmail</artifactId>
8-
<version>6.0</version>
8+
<version>8.0.0</version>
99
<name>NHIN Direct XD* Mail Gateway</name>
1010
<description>NHIN Direct XD* Mail Gateway</description>
1111
<url>https://github.com/DirectProjectJavaRI/xdmail</url>
@@ -29,14 +29,18 @@
2929
<url>http://nhindirect.org/BSDLicense</url>
3030
</license>
3131
</licenses>
32-
<prerequisites>
33-
<maven>3.0.0</maven>
34-
</prerequisites>
35-
<parent>
32+
<properties>
33+
<apache-james.version>3.2.0</apache-james.version>
34+
</properties>
35+
<prerequisites>
36+
<maven>3.5.0</maven>
37+
</prerequisites>
38+
<parent>
3639
<groupId>org.springframework.boot</groupId>
3740
<artifactId>spring-boot-dependencies</artifactId>
38-
<version>2.1.2.RELEASE</version>
39-
</parent>
41+
<version>2.5.2</version>
42+
<relativePath />
43+
</parent>
4044
<scm>
4145
<url>https://github.com/DirectProjectJavaRI/xdmail.git</url>
4246
<connection>scm:hg:https://github.com/DirectProjectJavaRI/xdmail.git</connection>
@@ -46,14 +50,14 @@
4650
<dependency>
4751
<groupId>org.springframework.boot</groupId>
4852
<artifactId>spring-boot-dependencies</artifactId>
49-
<version>2.1.2.RELEASE</version>
53+
<version>2.5.2</version>
5054
<type>pom</type>
5155
<scope>import</scope>
5256
</dependency>
5357
<dependency>
5458
<groupId>org.springframework.cloud</groupId>
5559
<artifactId>spring-cloud-starter-parent</artifactId>
56-
<version>Greenwich.RELEASE</version>
60+
<version>2020.0.3</version>
5761
<type>pom</type>
5862
<scope>import</scope>
5963
</dependency>
@@ -68,78 +72,65 @@
6872
<groupId>org.springframework.cloud</groupId>
6973
<artifactId>spring-cloud-stream</artifactId>
7074
</dependency>
71-
<dependency>
72-
<groupId>org.springframework</groupId>
73-
<artifactId>spring-test</artifactId>
74-
<scope>test</scope>
75-
</dependency>
76-
<dependency>
77-
<groupId>org.springframework.boot</groupId>
78-
<artifactId>spring-boot-starter-test</artifactId>
79-
<scope>test</scope>
80-
</dependency>
81-
<dependency>
82-
<groupId>org.springframework.cloud</groupId>
83-
<artifactId>spring-cloud-stream-test-support</artifactId>
84-
<scope>test</scope>
85-
</dependency>
86-
<dependency>
87-
<groupId>junit</groupId>
88-
<artifactId>junit</artifactId>
89-
<scope>test</scope>
90-
</dependency>
9175
<dependency>
9276
<groupId>org.apache.james</groupId>
9377
<artifactId>apache-mailet-base</artifactId>
94-
<version>3.1.0</version>
78+
<version>${apache-james.version}</version>
9579
</dependency>
9680
<dependency>
9781
<groupId>org.apache.james</groupId>
9882
<artifactId>apache-mailet-api</artifactId>
99-
<version>3.1.0</version>
83+
<version>${apache-james.version}</version>
10084
</dependency>
10185
<dependency>
10286
<groupId>org.apache.james</groupId>
10387
<artifactId>james-server-mailets</artifactId>
104-
<version>3.1.0</version>
88+
<version>${apache-james.version}</version>
10589
</dependency>
10690
<dependency>
10791
<groupId>org.apache.commons</groupId>
10892
<artifactId>commons-lang3</artifactId>
10993
</dependency>
110-
<dependency>
111-
<groupId>org.jmock</groupId>
112-
<artifactId>jmock-junit3</artifactId>
113-
<version>2.5.1</version>
114-
</dependency>
115-
<dependency>
116-
<groupId>org.jmock</groupId>
117-
<artifactId>jmock-legacy</artifactId>
118-
<version>2.5.1</version>
119-
</dependency>
12094
<dependency>
12195
<groupId>org.nhind</groupId>
12296
<artifactId>xd-common</artifactId>
123-
<version>6.0</version>
97+
<version>8.0.0</version>
12498
<scope>compile</scope>
12599
</dependency>
126100
<dependency>
127101
<groupId>org.nhind</groupId>
128102
<artifactId>agent</artifactId>
129-
<version>6.0</version>
103+
<version>8.0.0</version>
130104
<scope>compile</scope>
131105
</dependency>
132106
<dependency>
133107
<groupId>org.nhind</groupId>
134108
<artifactId>gateway</artifactId>
135-
<version>6.0</version>
109+
<version>8.0.0</version>
136110
<scope>compile</scope>
137111
</dependency>
138112
<dependency>
139-
<groupId>com.h2database</groupId>
140-
<artifactId>h2</artifactId>
113+
<groupId>org.springframework</groupId>
114+
<artifactId>spring-test</artifactId>
115+
<scope>test</scope>
116+
</dependency>
117+
<dependency>
118+
<groupId>org.springframework.boot</groupId>
119+
<artifactId>spring-boot-starter-test</artifactId>
141120
<scope>test</scope>
142-
</dependency>
121+
</dependency>
122+
<dependency>
123+
<groupId>org.springframework.cloud</groupId>
124+
<artifactId>spring-cloud-stream</artifactId>
125+
<type>test-jar</type>
126+
<scope>test</scope>
127+
<classifier>test-binder</classifier>
128+
</dependency>
129+
<dependency>
130+
<groupId>org.springframework.cloud</groupId>
131+
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
132+
<scope>test</scope>
133+
</dependency>
143134
</dependencies>
144135

145136
<build>
@@ -165,17 +156,14 @@
165156
<extension>
166157
<groupId>org.apache.maven.wagon</groupId>
167158
<artifactId>wagon-webdav-jackrabbit</artifactId>
168-
<version>3.1.0</version>
169159
</extension>
170160
<extension>
171161
<groupId>org.apache.maven.wagon</groupId>
172162
<artifactId>wagon-ssh-external</artifactId>
173-
<version>3.1.0</version>
174163
</extension>
175164
<extension>
176165
<groupId>org.apache.maven.wagon</groupId>
177166
<artifactId>wagon-ssh</artifactId>
178-
<version>3.1.0</version>
179167
</extension>
180168
</extensions>
181169

@@ -199,6 +187,7 @@
199187
<plugin>
200188
<groupId>org.apache.maven.plugins</groupId>
201189
<artifactId>maven-jxr-plugin</artifactId>
190+
<version>3.1.1</version>
202191
</plugin>
203192
<plugin>
204193
<groupId>org.apache.maven.plugins</groupId>
@@ -211,83 +200,11 @@
211200
</execution>
212201
</executions>
213202
</plugin>
214-
<!--
215-
DOXIA does not yet copy resources to the generated-site or site
216-
location. Bug DOXIA-355 was submitted in July of 09 and is listed to
217-
be resolved in DOXIA 1.2. This plugin a is work around for copying
218-
the resources from the book source to the generate site.
219-
-->
220-
<plugin>
221-
<groupId>org.apache.maven.plugins</groupId>
222-
<artifactId>maven-antrun-plugin</artifactId>
223-
<executions>
224-
<execution>
225-
<id>book</id>
226-
<phase>pre-site</phase>
227-
<configuration>
228-
<!--
229-
<tasks>
230-
<copy
231-
todir="${project.build.directory}/generated-site/xdoc/users-guide/images/">
232-
<fileset dir="${basedir}/src/books/users-guide/images/" />
233-
</copy>
234-
<copy todir="${project.build.directory}/site/users-guide/images/">
235-
<fileset dir="${basedir}/src/books/users-guide/images/" />
236-
</copy>
237-
</tasks>
238-
-->
239-
</configuration>
240-
<goals>
241-
<goal>run</goal>
242-
</goals>
243-
</execution>
244-
</executions>
245-
</plugin>
246-
<plugin>
247-
<groupId>org.apache.maven.doxia</groupId>
248-
<artifactId>doxia-maven-plugin</artifactId>
249-
<version>1.1.3</version>
250-
<executions>
251-
<execution>
252-
<phase>pre-site</phase>
253-
<goals>
254-
<goal>render-books</goal>
255-
</goals>
256-
</execution>
257-
</executions>
258-
<configuration>
259-
<books>
260-
<book>
261-
<directory>src/books/users-guide</directory>
262-
<descriptor>src/books/users-guide.xml</descriptor>
263-
<formats>
264-
<format>
265-
<id>xdoc</id>
266-
</format>
267-
</formats>
268-
</book>
269-
</books>
270-
</configuration>
271-
<dependencies>
272-
<dependency>
273-
<groupId>org.codehaus.plexus</groupId>
274-
<artifactId>plexus-utils</artifactId>
275-
<version>1.5.12</version>
276-
</dependency>
277-
<dependency>
278-
<groupId>org.apache.maven.doxia</groupId>
279-
<artifactId>doxia-module-confluence</artifactId>
280-
<version>1.1.3</version>
281-
</dependency>
282-
</dependencies>
283-
</plugin>
284-
285203
<plugin>
286204
<groupId>org.apache.maven.plugins</groupId>
287205
<artifactId>maven-javadoc-plugin</artifactId>
288-
<version>2.6.1</version>
289206
<configuration>
290-
<additionalparam>-Xdoclint:none</additionalparam>
207+
<additionalJOption>-Xdoclint:none</additionalJOption>
291208
<charset>UTF-8</charset>
292209
<docencoding>UTF-8</docencoding>
293210
<docfilessubdirs>true</docfilessubdirs>
@@ -332,14 +249,12 @@
332249
<plugin>
333250
<groupId>org.apache.maven.plugins</groupId>
334251
<artifactId>maven-project-info-reports-plugin</artifactId>
335-
<version>2.9</version>
336252
</plugin>
337253
<plugin>
338254
<groupId>org.apache.maven.plugins</groupId>
339255
<artifactId>maven-javadoc-plugin</artifactId>
340-
<version>2.6.1</version>
341256
<configuration>
342-
<additionalparam>-Xdoclint:none</additionalparam>
257+
<additionalJOption>-Xdoclint:none</additionalJOption>
343258
<charset>UTF-8</charset>
344259
<docencoding>UTF-8</docencoding>
345260
<docfilessubdirs>true</docfilessubdirs>
@@ -356,7 +271,7 @@
356271
<groupId>org.apache.maven.plugins</groupId>
357272
<artifactId>maven-pmd-plugin</artifactId>
358273
<configuration>
359-
<targetJdk>1.6</targetJdk>
274+
<targetJdk>1.8</targetJdk>
360275
</configuration>
361276
</plugin>
362277
<plugin>
@@ -366,6 +281,7 @@
366281
<plugin>
367282
<groupId>org.apache.maven.plugins</groupId>
368283
<artifactId>maven-jxr-plugin</artifactId>
284+
<version>3.1.1</version>
369285
</plugin>
370286
<plugin>
371287
<groupId>org.codehaus.mojo</groupId>

src/main/java/org/nhind/james/mailet/DirectXdMailet.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,19 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5252
import org.nhindirect.xd.routing.impl.RoutingResolverImpl;
5353
import org.nhindirect.xd.transform.MimeXdsTransformer;
5454
import org.nhindirect.xd.transform.impl.DefaultMimeXdsTransformer;
55-
import org.slf4j.Logger;
56-
import org.slf4j.LoggerFactory;
5755
import org.springframework.context.ApplicationContext;
5856
import org.springframework.context.support.ClassPathXmlApplicationContext;
5957

58+
import lombok.extern.slf4j.Slf4j;
59+
6060
/**
6161
* An Apache James Mailet that converts clinical messages into IHE
6262
* Cross-Enterprise Document Reliability (XDR) messages and transmits them to an
6363
* XDR Document Recipient via IHE XDS.b Provide and Register transaction
6464
* (ITI-41).
6565
*
6666
*/
67+
@Slf4j
6768
public class DirectXdMailet extends AbstractNotificationAwareMailet implements XDDeliveryCallback
6869
{
6970
protected static final String RELIABLE_DELIVERY_OPTION = MDNStandard.DispositionOption_TimelyAndReliable + "=optional,true";
@@ -75,7 +76,6 @@ public class DirectXdMailet extends AbstractNotificationAwareMailet implements X
7576
private RoutingResolver resolver;
7677
private XDDeliveryCore deliveryCore;
7778
protected NotificationProducer notificationProducer;
78-
private static final Logger LOGGER = LoggerFactory.getLogger(DirectXdMailet.class);
7979

8080

8181
/*
@@ -86,7 +86,7 @@ public class DirectXdMailet extends AbstractNotificationAwareMailet implements X
8686
@Override
8787
public void service(Mail mail) throws MessagingException
8888
{
89-
LOGGER.info("Servicing DirectXdMailet");
89+
log.info("Servicing DirectXdMailet");
9090

9191
final SMTPMailMessage smtpMailMessage = mailToSMTPMailMessage(mail);
9292

@@ -107,13 +107,13 @@ public void service(Mail mail) throws MessagingException
107107
// this basically sets the message back to it's original state with SMTP addresses only
108108
if (getResolver().hasSmtpEndpoints(recipAddresses))
109109
{
110-
LOGGER.info("Recipients include SMTP endpoints");
110+
log.info("Recipients include SMTP endpoints");
111111

112112
mail.setRecipients(getSmtpRecips(recipAddresses));
113113
}
114114
else
115115
{
116-
LOGGER.info("Recipients do not include SMTP endpoints");
116+
log.info("Recipients do not include SMTP endpoints");
117117

118118
// No SMTP addresses, ghost it
119119
mail.setState(Mail.GHOST);
@@ -139,15 +139,15 @@ private Collection<MailAddress> getSmtpRecips(Collection<String> recips) throws
139139
public void init() throws MessagingException
140140
{
141141

142-
LOGGER.info("Initializing DirectXdMailet");
142+
log.info("Initializing DirectXdMailet");
143143
super.init();
144144

145145
// Get the endpoint URL
146146
endpointUrl = getInitParameter("EndpointURL");
147147

148148
if (StringUtils.isBlank(endpointUrl))
149149
{
150-
LOGGER.error("DirectXdMailet endpoint URL cannot be empty or null.");
150+
log.error("DirectXdMailet endpoint URL cannot be empty or null.");
151151
throw new MessagingException("DirectXdMailet endpoint URL cannot be empty or null.");
152152
}
153153

@@ -287,7 +287,7 @@ public void sendNotificationMessage(NotificationMessage message) throws Messagin
287287
catch (Throwable t)
288288
{
289289
// don't kill the process if this fails
290-
LOGGER.error("Error sending MDN dispatched message.", t);
290+
log.error("Error sending MDN dispatched message.", t);
291291
}
292292
}
293293

0 commit comments

Comments
 (0)