This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tectonica; | |
import org.yaml.snakeyaml.DumperOptions; | |
import org.yaml.snakeyaml.Yaml; | |
import org.yaml.snakeyaml.constructor.Constructor; | |
import org.yaml.snakeyaml.nodes.Tag; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.FileWriter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a template for creating and running a Jetty web application, using Jersey + Jackson for REST, and Weld for CDI. | |
It is organized as a maven project, which builds a WAR file deployable to a standalone Jetty server. | |
The Jetty maven plugin - which is more suitable for development time - is also configured in the pom.xml. | |
Comments: | |
* As Jetty is a servlet-3.0 compatible container, no configuration is needed in web.xml | |
* Due to a bug in maven, it's required to use version 3.2.2 or above | |
* The JaxRs API classes are to be placed at the package - or below - the one where 'RestConfig.java' is | |
* When using in standalone Jetty installation, enable the 'cdi' module before deploying | |
>> java -jar start.jar --add-to-startd=cdi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tectonica.log; | |
import java.io.ByteArrayInputStream; | |
import java.io.InputStream; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.logging.ConsoleHandler; | |
import java.util.logging.Formatter; | |
import java.util.logging.Level; | |
import java.util.logging.LogManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tectonica.util; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
import java.util.Properties; | |
import javax.activation.DataHandler; | |
import javax.mail.BodyPart; | |
import javax.mail.Message; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tectonica.util; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
import java.util.Properties; | |
import javax.activation.DataHandler; | |
import javax.mail.Authenticator; | |
import javax.mail.BodyPart; |