Roberto Sánchez
2014-05-20 632a396b7b6d533b3103372a6621ba49edd337b8
#593 config - Configuration for right packaging system using maven
4 files added
5 files modified
changed files
README patch | view | blame | history
assembly.xml patch | view | blame | history
config/log4j2.xml patch | view | blame | history
config/securis-client.properties patch | view | blame | history
etc/build/files/config/log4j2.xml patch | view | blame | history
etc/build/files/config/securis-client.properties patch | view | blame | history
etc/build/files/securis.sh patch | view | blame | history
pom.xml patch | view | blame | history
src/main/resources/log4j2.xml patch | view | blame | history
README
....@@ -0,0 +1,21 @@
1
+SeCuris client
2
+==============
3
+
4
+Updated doc: https://redmine.curistec.com/projects/securis/wiki/HowToSeCurisClient
5
+
6
+Creation of a request file
7
+For a manual activation, a request file should be sent to SeCuris administrator, to create a request file we can execute:
8
+
9
+ $ ./securis.sh --gen_request --rfile=/tmp/curisapp.req
10
+
11
+Validate license file
12
+
13
+ $ ./securis.sh --validate=/path/to/license/file/curisapp.lic
14
+
15
+Request a new license to server
16
+
17
+ $ ./securis.sh --create=/path/to/license/file/curisapp.lic --server="http://server:0000/securis/api/create"
18
+
19
+Renew an existing license
20
+
21
+ $ securis.sh --renew=/path/to/license/file/curisapp.lic --server="http://server:0000/securis/api/create"
assembly.xml
....@@ -10,4 +10,7 @@
1010 <outputDirectory>output</outputDirectory>
1111 </fileSet>
1212 </fileSets>
13
+ <sources>
14
+ <excludes/>
15
+ </sources>
1316 </assembly>
config/log4j2.xml
....@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Configuration>
3
+ <Appenders>
4
+ <Console name="STDOUT" target="SYSTEM_OUT">
5
+ <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
6
+ </Console>
7
+ </Appenders>
8
+ <Loggers>
9
+
10
+ <Logger name="net.curisit" level="info"/>
11
+
12
+ <Root level="debug">
13
+ <AppenderRef ref="STDOUT"/>
14
+ </Root>
15
+ </Loggers>
16
+</Configuration>
config/securis-client.properties
....@@ -0,0 +1,9 @@
1
+#########################################################################
2
+# #
3
+# Modify the current file using the proper values for you environment #
4
+# #
5
+#########################################################################
6
+
7
+public.key.file = /Path/to/public/key/file/securis.pub
8
+app.code = AP01
9
+customer.code = XX
etc/build/files/config/log4j2.xml
....@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Configuration>
3
+ <Appenders>
4
+ <Console name="STDOUT" target="SYSTEM_OUT">
5
+ <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
6
+ </Console>
7
+ </Appenders>
8
+ <Loggers>
9
+
10
+ <Logger name="net.curisit" level="info"/>
11
+
12
+ <Root level="debug">
13
+ <AppenderRef ref="STDOUT"/>
14
+ </Root>
15
+ </Loggers>
16
+</Configuration>
etc/build/files/config/securis-client.properties
....@@ -6,4 +6,4 @@
66
77 public.key.file = /Path/to/public/key/file/securis.pub
88 app.code = AP01
9
-customer.code = XX
9
+customer.code = XX
etc/build/files/securis.sh
....@@ -1,3 +1,4 @@
11 #!/bin/bash
2
-export CLASSPATH=libs/*.jar:config/securis-client.properties
3
-java -cp $CLASSPATH -jar libs/securis-client-*.jar $@
2
+
3
+export CLASSPATH="config:libs/*"
4
+java -cp "$CLASSPATH" net.curisit.securis.License $@
pom.xml
....@@ -18,14 +18,12 @@
1818 <groupId>org.apache.maven.plugins</groupId>
1919 <artifactId>maven-jar-plugin</artifactId>
2020 <configuration>
21
- <archive>
22
- <manifest>
23
- <mainClass>net.curisit.securis.License</mainClass>
24
- </manifest>
25
- </archive>
21
+ <excludes>
22
+ <exclude>*.properties</exclude>
23
+ </excludes>
2624 </configuration>
2725 </plugin>
28
- <plugin>
26
+ <plugin>
2927 <artifactId>maven-assembly-plugin</artifactId>
3028 <version>2.4</version>
3129 <configuration>
....@@ -73,6 +71,7 @@
7371 <version>2.0-rc1</version>
7472 </dependency>
7573 </dependencies>
74
+
7675 <distributionManagement>
7776 <!-- use the following if you're not using a snapshot version. -->
7877 <repository>
src/main/resources/log4j2.xml
....@@ -9,7 +9,7 @@
99
1010 <Logger name="net.curisit" level="info"/>
1111
12
- <Root level="debug">
12
+ <Root level="info">
1313 <AppenderRef ref="STDOUT"/>
1414 </Root>
1515 </Loggers>