Skip to content

Commit

Permalink
Release version 2.3.0 (#35)
Browse files Browse the repository at this point in the history
* Upgrade to latest BuncyCastle libraries

* Cater for JRE and JDK location of JSSE certificate file

* Update developers guide

* Refactored maven configuration

- Introduced maven wrapper in order to stick to certain version of maven and eliminate dependency on local installation
- Moved dependencies and plugins to parent in order to have a single point version declaration
- Remove unnecessary configurations from poms
- Fix modules hierarchy
- Introduced SNAPSHOT version for further configuration of release process
- Removed IDE specific files
- Update .gitignore

* Improved Maven config

- Added automatically copied dependencies, no need to put jars into lib manually
- Renamed artifact names to standard since start-up scripts were improved
- Scripts and configs were relocated for further release process configuration
- Introduced maven-site-plugin for documentation uploading
- Removed obsolete Ant configuration since Maven wrapper can be used.

* State processing value fixes (#27)

* Fix the DIRECTION setting for database logging
* Set FILE_NAME of payload as early as possible to ensure it is logged in the state processing log events

* Fix uuid in stored file name (#28)

* Fix the DIRECTION setting for database logging

* Set FILE_NAME of payload as early as possible to ensure it is logged in
the state processing log events

* Remove redundant import

* Using direct setOption call instead.

* Remove automatically appending a UUID to the stored inbound files name

* Make OpenAS2Server more testable (#29)

* Make OpenAS2Server more testable

- Added a build for OpenAS2Server instance.
- Command processor initialization moved to XMLSession.
- H2DBHandler moved to appropriate package.
- Graceful shutdown on exit command.
- Added an integration test.
- All threads and timers were named in order to simplify profiling.
- Introduced a scheduler component for periodical tasks.
- Code cleanup and re-formatting.
- Bumped version.

* Minor enhancements and bugfixes (#30)

* Make message Id globally reconfigurable

* Make session object available in resend method to facilitate DB logging

* Update to use a specified format to avoid failure when format is
changed.

* Use a common method for generating the message ID between AS2 message
and MDN response

* Support InvalidParameterException exception in generatMessageId method

* Make information about app available as properties

* Use the Properties object for app info

* Remove hard coded app info

* Use Properties for app title

* Remove redundant method

* The terminate method will either call server shutdown method or teminate
JVM depending on flag

* Add the global default format for message ID generation

Change fileid to filename for format attribute on the generic directory
polling module instance

* Support access to server object via session and add mechanism to
determine if JVM shutdown should be allowed

* Allow payload file name to be accessed via message object if not
extracted from disposition

* Allow storing the server object

* Use common methid for genrating message ID.
Add some trace  logging to simplify debug

* Changes to support using external databases and make embedded DB handler
more generic to allow easier replacement with other embedded DB

* Persist all message attributes for pending files to retain information
through the lifecycle of the sent messages

* Support Random parameters on MDN file name format string

* Add 2 new paramters for controlling the DB tracking database

* Copy new "resources" folder containing DB utilities into distribution
package

* Start extending the developer related documentation

* Various additions and enhancements to documentation for 2.3.0 release

* Add a resend queued message state

* Split building the metadata from the actual message to facilitate new
functionality that depends on the metadata

* Support PRIOR_MSG_ID column for back reference tpo previous message send
attempt

* Add a state message log when resend is going to be attempted to provide
a final state to the old message

* Tools to create database table SQL and manage upgrade to database

* Sample script to run DDLUtils builder

* Set formal release number

* Update for latest release

* Refined LogManager (#31)

- Added default logger for cases when no logger are configured.
- Refactored initialization of LogManager

* Proxy server plus bug fixes (#33)

* Fixed exit command

- Added Session lifecycle controls.
- H2 server thread was still running event after shutdown() that prevented server from shutdown.

* Set the class to ActiveModule when building and returning a list of
active modules to avoid unnecessary class casts and check for running
modules to stop to avoid unnecessary calls.

* Remove call to stop modules method in stop() method for session since
destroy() method on processors modules does that.

* Add additional debug message to facilitate debugging

* Support proxy server

Support proxy authentication
Support handing the openConnection() method a proxy instance

* Remove redundant imports

* Support ASYNC MDN send retry

* Add default "retries" attribute to AS2SenderModule and
AsyncMDNSenderModule

* Support extracting key/value pairs from XML without changing key to
lowercase

* Avoid changing property names to lowercase when pushed into Properties
object

* Enhanced documentation and added Proxy server information

* Prevent the "fallback" parameter being set as the property value

* Release documentation

* Release notes updated

* Updated the valid version statement for new release

* Move messaging so it is relevant to the stage it is at. (#34)
  • Loading branch information
uhurusurfa authored and pete-gilchrist committed May 4, 2017
1 parent aef5436 commit 1a63b99
Show file tree
Hide file tree
Showing 180 changed files with 13,842 additions and 5,463 deletions.
19 changes: 0 additions & 19 deletions .classpath

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/bin/
/classes/
/tests/
*.iml
.idea/*
.project
.classpath
pom.xml.versionsBackup
*/dist/*
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
34 changes: 0 additions & 34 deletions .project

This file was deleted.

26 changes: 0 additions & 26 deletions Bundle/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions Bundle/.project

This file was deleted.

214 changes: 80 additions & 134 deletions Bundle/pom.xml
Original file line number Diff line number Diff line change
@@ -1,138 +1,84 @@
<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">
<parent>
<groupId>org.openas2</groupId>
<artifactId>OpenAS2</artifactId>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openas2</groupId>
<artifactId>openas2-osgi</artifactId>
<version>2.2.0</version>
<name>OpenAS2 OSGi Server</name>
<url>https://sourceforge.net/projects/openas2</url>
<description>Open source implementation of the AS2 standard for signed encrypted and compressed document transfer</description>
<properties>
<project.dist.package.name>${project.parent.artifactId}ServerOSGi-${project.version}.zip</project.dist.package.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<lib.dir>${basedir}/lib</lib.dir>
<help.filename>OpenAS2HowTo.pdf</help.filename>
<help.file.src>../docs/${help.filename}</help.file.src>
<dist.dir>dist</dist.dir>
</properties>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<directory>target</directory>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<!-- <finalName>${project.artifactId}-${project.version}</finalName> -->
<finalName>${project.artifactId}</finalName>
<testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
<scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>

<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>run</goal>
</goals>
<phase>package</phase>
<configuration>
<target>
<delete file="${lib.dir}/${project.build.finalName}.jar" />
<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="${lib.dir}" />
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<!-- Create the distribution directory -->
<mkdir dir="${dist.dir}" />
<!-- Add the help PDF version to the distro -->
<copy file="${help.file.src}" todir="${basedir}" />
<!-- create distribution package -->
<zip destfile="${dist.dir}/${project.dist.package.name}"
basedir="." excludes="dist/**,temp/**,logs/**,data/**,target/**" />
<!-- Remove the copied help file -->
<delete file="${help.filename}" />
<modelVersion>4.0.0</modelVersion>

</target>
</configuration>
</execution>
</executions>
<parent>
<groupId>org.openas2</groupId>
<artifactId>OpenAS2</artifactId>
<version>2.3.0-SNAPSHOT</version>
</parent>

<artifactId>openas2-osgi</artifactId>

<name>OpenAS2 OSGi Bundle</name>
<description>
OpenAS2 server OSGi bundle
</description>

<properties>
<mainClass>org.openas2.osgi.Activator</mainClass>
<project.dist.package.name>${project.parent.artifactId}Bundle-${project.version}.zip</project.dist.package.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<lib.dir>${project.basedir}/lib</lib.dir>
<help.filename>OpenAS2HowTo.pdf</help.filename>
<help.file.src>../docs/${help.filename}</help.file.src>
<dist.dir>${project.basedir}/dist</dist.dir>
</properties>

<build>
<plugins>
<!--TODO it's not clear how the artifact is distributed-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>run</goal>
</goals>
<phase>package</phase>
<configuration>
<target>
<!--Copy artifact to build lib dicetory -->
<copy file="${project.build.directory}/${project.build.finalName}.jar"
todir="${project.build.directory}/dist/lib" verbose="true"/>
<!-- Add the help PDF version to the distro -->
<copy file="${help.file.src}" todir="${project.build.directory}/dist" verbose="true"/>
<!-- create distribution package -->
<zip destfile="${project.basedir}/dist/${project.dist.package.name}"
basedir="${project.build.directory}/dist"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.openas2</groupId>
<artifactId>openas2-server</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<index>true</index>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>org.openas2.osgi.Activator</mainClass>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15on</artifactId>
<version>1.54</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.54</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.54</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.193</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<version>1.54</version>
</dependency>
</dependencies>
</project>
48 changes: 25 additions & 23 deletions Bundle/src/main/java/org/openas2/osgi/Activator.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,33 @@

public class Activator implements BundleActivator {

private static BundleContext context;
private ServiceRegistration<?> openAS2Registration;
private static BundleContext context;
private ServiceRegistration<?> openAS2Registration;

static BundleContext getContext() {
return context;
}
static BundleContext getContext()
{
return context;
}

/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
OpenAS2Server openAS2Service = new OpenAS2Server();
openAS2Registration = bundleContext.registerService(OpenAS2Server.class.getName(), openAS2Service, null);
openAS2Service.start(null);
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception
{
Activator.context = bundleContext;
OpenAS2Server openAS2Server = new OpenAS2Server.Builder().run();
openAS2Registration = bundleContext.registerService(OpenAS2Server.class.getName(), openAS2Server, null);
}

/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
openAS2Registration.unregister();
Activator.context = null;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception
{
openAS2Registration.unregister();
Activator.context = null;
}

}
Loading

0 comments on commit 1a63b99

Please sign in to comment.