Skip to content

Commit

Permalink
Made the project a maven project.
Browse files Browse the repository at this point in the history
  • Loading branch information
yankee42 committed Dec 6, 2013
1 parent d8bd475 commit 70291fc
Show file tree
Hide file tree
Showing 22 changed files with 96 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ developmentSMTP ships with a small web server based on [NanoHTTPD](http://elonen
to reconfigure the server during runtime using a minimal http interface. Just supply the `--http-port` option to enable
this service.

Building
--------
Execute `mvn package` if you want to build to a "normal" jar file. Execute `mvn compile assembly:single` if you want to build to a jar file which includes all dependencies.

A word of warning
-----------------

developmentSMTP is supplied in the hope that it is useful, but without any guarantee. It is not tested for multi
threading issues which would be extremely unlikely in a development environment. Never use developmentSMTP in a
production environment!

[Mutt]: http://en.wikipedia.org/wiki/Mutt_(e-mail_client)
[Mutt]: http://en.wikipedia.org/wiki/Mutt_(e-mail_client)
Binary file removed lib/activation.jar
Binary file not shown.
Binary file removed lib/commons-cli-1.2.jar
Binary file not shown.
Binary file removed lib/mail.jar
Binary file not shown.
Binary file removed lib/slf4j-api-1.6.1.jar
Binary file not shown.
Binary file removed lib/slf4j-simple-1.6.1.jar
Binary file not shown.
Binary file removed lib/subethasmtp-3.1.7.jar
Binary file not shown.
83 changes: 83 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<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">
<modelVersion>4.0.0</modelVersion>

<groupId>de.slab.testsmtp</groupId>
<artifactId>developmentSMTP</artifactId>
<version>1.0</version>
<packaging>jar</packaging>

<name>developmentSMTP</name>
<url>https://github.com/yankee42/developmentSMTP</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>de.slab.testsmtp.CLI</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>de.slab.testsmtp.CLI</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp</artifactId>
<version>3.1.7</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.7</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
3 changes: 0 additions & 3 deletions src/META-INF/MANIFEST.MF

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
package de.slab.testsmtp.www;

import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
import de.slab.testsmtp.DevelopmentSMTP;
import de.slab.testsmtp.mailhandler.MailHandler;

import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

import java.io.OutputStream;

public class ConfigurationPageBuilder implements Runnable {
private final XMLStreamWriter out;
private final DevelopmentSMTP developmentSMTP;

public ConfigurationPageBuilder(OutputStream out, DevelopmentSMTP developmentSMTP) {
this.out = XMLStreamWriterFactory.create(out);
try {
this.out = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
} catch (XMLStreamException | FactoryConfigurationError e) {
throw new Error(e);
}
this.developmentSMTP = developmentSMTP;
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 70291fc

Please sign in to comment.