From 35a7ce99f771462b07056461561ec3f53f4ded45 Mon Sep 17 00:00:00 2001
From: Roberto Sánchez <roberto.sanchez@curisit.net>
Date: Tue, 20 May 2014 10:59:49 +0000
Subject: [PATCH] #593 config - Configuration for right packaging system using maven
---
doc/HOWTO.md | 0
etc/build/files/config/securis-client.properties | 9 ++
etc/build/files/README | 21 +++++
assembly.xml | 13 +++
etc/build/files/securis.sh | 3
src/main/resources/securis-client.properties | 2
etc/build/pro/mvn_descriptor.xml | 24 ++++--
pom.xml | 157 ++++++++++++++++++++------------------
8 files changed, 146 insertions(+), 83 deletions(-)
diff --git a/assembly.xml b/assembly.xml
new file mode 100644
index 0000000..1e7cd66
--- /dev/null
+++ b/assembly.xml
@@ -0,0 +1,13 @@
+<assembly>
+ <id>bundle</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/output</directory>
+ <outputDirectory>output</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
diff --git a/etc/build/files/HOWTO.md b/doc/HOWTO.md
similarity index 100%
rename from etc/build/files/HOWTO.md
rename to doc/HOWTO.md
diff --git a/etc/build/files/README b/etc/build/files/README
new file mode 100644
index 0000000..9eb1bf8
--- /dev/null
+++ b/etc/build/files/README
@@ -0,0 +1,21 @@
+SeCuris client
+==============
+
+Updated doc: https://redmine.curistec.com/projects/securis/wiki/HowToSeCurisClient
+
+Creation of a request file
+For a manual activation, a request file should be sent to SeCuris administrator, to create a request file we can execute:
+
+ $ ./securis.sh --gen_request --rfile=/tmp/curisapp.req
+
+Validate license file
+
+ $ ./securis.sh --validate=/path/to/license/file/curisapp.lic
+
+Request a new license to server
+
+ $ ./securis.sh --create=/path/to/license/file/curisapp.lic --server="http://server:0000/securis/api/create"
+
+Renew an existing license
+
+ $ securis.sh --renew=/path/to/license/file/curisapp.lic --server="http://server:0000/securis/api/create"
diff --git a/etc/build/files/config/securis-client.properties b/etc/build/files/config/securis-client.properties
new file mode 100644
index 0000000..2a2011d
--- /dev/null
+++ b/etc/build/files/config/securis-client.properties
@@ -0,0 +1,9 @@
+#########################################################################
+# #
+# Modify the current file using the proper values for you environment #
+# #
+#########################################################################
+
+public.key.file = /Path/to/public/key/file/securis.pub
+app.code = AP01
+customer.code = XX
\ No newline at end of file
diff --git a/etc/build/files/securis.sh b/etc/build/files/securis.sh
new file mode 100644
index 0000000..e850570
--- /dev/null
+++ b/etc/build/files/securis.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export CLASSPATH=libs/*.jar:config/securis-client.properties
+java -cp $CLASSPATH -jar libs/securis-client-*.jar $@
diff --git a/etc/build/pro/mvn_descriptor.xml b/etc/build/pro/mvn_descriptor.xml
index 16fad93..20e39ab 100644
--- a/etc/build/pro/mvn_descriptor.xml
+++ b/etc/build/pro/mvn_descriptor.xml
@@ -5,25 +5,33 @@
<id>packager</id>
<formats>
<format>zip</format>
+ <format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
- <directory>${project.build.directory}/classes</directory>
+ <directory>${basedir}/etc/build/files</directory>
<includes>
- <include>*.txt</include>
+ <include>**/*</include>
</includes>
- <outputDirectory>${basedir}/target</outputDirectory>
- <excludes>
- <exclude>assembly/**</exclude>
- <exclude>runners/**</exclude>
- </excludes>
+ <excludes>
+ <exclude>*.sh</exclude>
+ </excludes>
+ <outputDirectory>.</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/etc/build/files</directory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <fileMode>755</fileMode>
+ <outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>/libs</outputDirectory>
- <useProjectArtifact>false</useProjectArtifact>
+ <useProjectArtifact>true</useProjectArtifact>
<unpack>false</unpack>
<scope>runtime</scope>
</dependencySet>
diff --git a/pom.xml b/pom.xml
index c9461ef..df6e0e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,75 +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">
- <modelVersion>4.0.0</modelVersion>
- <groupId>net.curisit</groupId>
- <artifactId>securis-client</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <formats>
- <format>zip</format>
- </formats>
- <descriptors>
- <descriptor>/Users/cproberto/Documents/wsCurisIT/SeCurisClient/etc/build/pro/mvn_descriptor.xml</descriptor>
- </descriptors>
- <archive>
- <manifest>
- <mainClass>net.curisit.securis.License</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.2.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3.2</version>
- </dependency>
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- <version>3.3</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <version>1.9.13</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>2.0-rc1</version>
- </dependency>
- </dependencies>
- <distributionManagement>
-<!-- use the following if you're not using a snapshot version. -->
-<repository>
- <id>local</id>
- <name>LocalDir</name>
- <url>file://${basedir}/target</url>
-</repository>
-</distributionManagement>
+<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>net.curisit</groupId>
+ <artifactId>securis-client</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <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>net.curisit.securis.License</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <formats>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+ <descriptors>
+ <descriptor>etc/build/pro/mvn_descriptor.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-net</groupId>
+ <artifactId>commons-net</artifactId>
+ <version>3.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>2.0-rc1</version>
+ </dependency>
+ </dependencies>
+ <distributionManagement>
+ <!-- use the following if you're not using a snapshot version. -->
+ <repository>
+ <id>local</id>
+ <name>LocalDir</name>
+ <url>file://${basedir}/target</url>
+ </repository>
+ </distributionManagement>
</project>
\ No newline at end of file
diff --git a/src/main/resources/securis-client.properties b/src/main/resources/securis-client.properties
index e7aee1a..2e3c1d5 100644
--- a/src/main/resources/securis-client.properties
+++ b/src/main/resources/securis-client.properties
@@ -1,3 +1,3 @@
public.key.file = __ADD_PUBLIC_KEY_FILE__
app.code = __ADD_APP_CODE__
-customer.code = __ADD_APP_CODE__
+customer.code = __ADD_CUSTOMER_CODE__
--
Gitblit v1.3.2