Roberto Sánchez
2014-05-20 35a7ce99f771462b07056461561ec3f53f4ded45
#593 config - Configuration for right packaging system using maven
4 files added
1 files renamed
3 files modified
changed files
assembly.xml patch | view | blame | history
doc/HOWTO.md patch | view | blame | history
etc/build/files/README patch | view | blame | history
etc/build/files/config/securis-client.properties patch | view | blame | history
etc/build/files/securis.sh patch | view | blame | history
etc/build/pro/mvn_descriptor.xml patch | view | blame | history
pom.xml patch | view | blame | history
src/main/resources/securis-client.properties patch | view | blame | history
assembly.xml
....@@ -0,0 +1,13 @@
1
+<assembly>
2
+ <id>bundle</id>
3
+ <formats>
4
+ <format>tar.gz</format>
5
+ </formats>
6
+ <includeBaseDirectory>false</includeBaseDirectory>
7
+ <fileSets>
8
+ <fileSet>
9
+ <directory>src/main/output</directory>
10
+ <outputDirectory>output</outputDirectory>
11
+ </fileSet>
12
+ </fileSets>
13
+</assembly>
etc/build/files/HOWTO.md
similarity index 100%rename from etc/build/files/HOWTO.mdrename to doc/HOWTO.md
etc/build/files/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"
etc/build/files/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/securis.sh
....@@ -0,0 +1,3 @@
1
+#!/bin/bash
2
+export CLASSPATH=libs/*.jar:config/securis-client.properties
3
+java -cp $CLASSPATH -jar libs/securis-client-*.jar $@
etc/build/pro/mvn_descriptor.xml
....@@ -5,25 +5,33 @@
55 <id>packager</id>
66 <formats>
77 <format>zip</format>
8
+ <format>tar.gz</format>
89 </formats>
910 <includeBaseDirectory>false</includeBaseDirectory>
1011 <fileSets>
1112 <fileSet>
12
- <directory>${project.build.directory}/classes</directory>
13
+ <directory>${basedir}/etc/build/files</directory>
1314 <includes>
14
- <include>*.txt</include>
15
+ <include>**/*</include>
1516 </includes>
16
- <outputDirectory>${basedir}/target</outputDirectory>
17
- <excludes>
18
- <exclude>assembly/**</exclude>
19
- <exclude>runners/**</exclude>
20
- </excludes>
17
+ <excludes>
18
+ <exclude>*.sh</exclude>
19
+ </excludes>
20
+ <outputDirectory>.</outputDirectory>
21
+ </fileSet>
22
+ <fileSet>
23
+ <directory>${basedir}/etc/build/files</directory>
24
+ <includes>
25
+ <include>*.sh</include>
26
+ </includes>
27
+ <fileMode>755</fileMode>
28
+ <outputDirectory>.</outputDirectory>
2129 </fileSet>
2230 </fileSets>
2331 <dependencySets>
2432 <dependencySet>
2533 <outputDirectory>/libs</outputDirectory>
26
- <useProjectArtifact>false</useProjectArtifact>
34
+ <useProjectArtifact>true</useProjectArtifact>
2735 <unpack>false</unpack>
2836 <scope>runtime</scope>
2937 </dependencySet>
pom.xml
....@@ -1,75 +1,84 @@
1
-<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">
2
- <modelVersion>4.0.0</modelVersion>
3
- <groupId>net.curisit</groupId>
4
- <artifactId>securis-client</artifactId>
5
- <version>0.0.1-SNAPSHOT</version>
6
- <build>
7
- <plugins>
8
- <plugin>
9
- <artifactId>maven-compiler-plugin</artifactId>
10
- <version>3.1</version>
11
- <configuration>
12
- <source>1.7</source>
13
- <target>1.7</target>
14
- </configuration>
15
- </plugin>
16
- <plugin>
17
- <artifactId>maven-assembly-plugin</artifactId>
18
- <version>2.4</version>
19
- <configuration>
20
- <formats>
21
- <format>zip</format>
22
- </formats>
23
- <descriptors>
24
- <descriptor>/Users/cproberto/Documents/wsCurisIT/SeCurisClient/etc/build/pro/mvn_descriptor.xml</descriptor>
25
- </descriptors>
26
- <archive>
27
- <manifest>
28
- <mainClass>net.curisit.securis.License</mainClass>
29
- </manifest>
30
- </archive>
31
- </configuration>
32
- </plugin>
33
- </plugins>
34
- </build>
35
- <dependencies>
36
- <dependency>
37
- <groupId>org.apache.commons</groupId>
38
- <artifactId>commons-lang3</artifactId>
39
- <version>3.2.1</version>
40
- </dependency>
41
- <dependency>
42
- <groupId>org.apache.commons</groupId>
43
- <artifactId>commons-io</artifactId>
44
- <version>1.3.2</version>
45
- </dependency>
46
- <dependency>
47
- <groupId>commons-cli</groupId>
48
- <artifactId>commons-cli</artifactId>
49
- <version>1.2</version>
50
- </dependency>
51
- <dependency>
52
- <groupId>commons-net</groupId>
53
- <artifactId>commons-net</artifactId>
54
- <version>3.3</version>
55
- </dependency>
56
- <dependency>
57
- <groupId>org.codehaus.jackson</groupId>
58
- <artifactId>jackson-mapper-asl</artifactId>
59
- <version>1.9.13</version>
60
- </dependency>
61
- <dependency>
62
- <groupId>org.apache.logging.log4j</groupId>
63
- <artifactId>log4j-core</artifactId>
64
- <version>2.0-rc1</version>
65
- </dependency>
66
- </dependencies>
67
- <distributionManagement>
68
-<!-- use the following if you're not using a snapshot version. -->
69
-<repository>
70
- <id>local</id>
71
- <name>LocalDir</name>
72
- <url>file://${basedir}/target</url>
73
-</repository>
74
-</distributionManagement>
1
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+ <modelVersion>4.0.0</modelVersion>
4
+ <groupId>net.curisit</groupId>
5
+ <artifactId>securis-client</artifactId>
6
+ <version>0.9.0-SNAPSHOT</version>
7
+ <build>
8
+ <plugins>
9
+ <plugin>
10
+ <artifactId>maven-compiler-plugin</artifactId>
11
+ <version>3.1</version>
12
+ <configuration>
13
+ <source>1.7</source>
14
+ <target>1.7</target>
15
+ </configuration>
16
+ </plugin>
17
+ <plugin>
18
+ <groupId>org.apache.maven.plugins</groupId>
19
+ <artifactId>maven-jar-plugin</artifactId>
20
+ <configuration>
21
+ <archive>
22
+ <manifest>
23
+ <mainClass>net.curisit.securis.License</mainClass>
24
+ </manifest>
25
+ </archive>
26
+ </configuration>
27
+ </plugin>
28
+ <plugin>
29
+ <artifactId>maven-assembly-plugin</artifactId>
30
+ <version>2.4</version>
31
+ <configuration>
32
+ <formats>
33
+ <format>zip</format>
34
+ <format>tar.gz</format>
35
+ </formats>
36
+ <descriptors>
37
+ <descriptor>etc/build/pro/mvn_descriptor.xml</descriptor>
38
+ </descriptors>
39
+ <appendAssemblyId>false</appendAssemblyId>
40
+ </configuration>
41
+ </plugin>
42
+ </plugins>
43
+ </build>
44
+ <dependencies>
45
+ <dependency>
46
+ <groupId>org.apache.commons</groupId>
47
+ <artifactId>commons-lang3</artifactId>
48
+ <version>3.2.1</version>
49
+ </dependency>
50
+ <dependency>
51
+ <groupId>org.apache.commons</groupId>
52
+ <artifactId>commons-io</artifactId>
53
+ <version>1.3.2</version>
54
+ </dependency>
55
+ <dependency>
56
+ <groupId>commons-cli</groupId>
57
+ <artifactId>commons-cli</artifactId>
58
+ <version>1.2</version>
59
+ </dependency>
60
+ <dependency>
61
+ <groupId>commons-net</groupId>
62
+ <artifactId>commons-net</artifactId>
63
+ <version>3.3</version>
64
+ </dependency>
65
+ <dependency>
66
+ <groupId>org.codehaus.jackson</groupId>
67
+ <artifactId>jackson-mapper-asl</artifactId>
68
+ <version>1.9.13</version>
69
+ </dependency>
70
+ <dependency>
71
+ <groupId>org.apache.logging.log4j</groupId>
72
+ <artifactId>log4j-core</artifactId>
73
+ <version>2.0-rc1</version>
74
+ </dependency>
75
+ </dependencies>
76
+ <distributionManagement>
77
+ <!-- use the following if you're not using a snapshot version. -->
78
+ <repository>
79
+ <id>local</id>
80
+ <name>LocalDir</name>
81
+ <url>file://${basedir}/target</url>
82
+ </repository>
83
+ </distributionManagement>
7584 </project>
src/main/resources/securis-client.properties
....@@ -1,3 +1,3 @@
11 public.key.file = __ADD_PUBLIC_KEY_FILE__
22 app.code = __ADD_APP_CODE__
3
-customer.code = __ADD_APP_CODE__
3
+customer.code = __ADD_CUSTOMER_CODE__