Skip to content

Commit

Permalink
First fix for Issue #41 and #42 of Vitam
Browse files Browse the repository at this point in the history
This version of Waarp-Vitam is compatible with Vitam 2.15.3 and 3.0.2.

This is a short fix for Change Behavior from Vitam client side. It should
not get any issue for Waarp-Vitam users but we follow this issue with Vitam
Team.

See ProgrammeVitam/vitam#41
and ProgrammeVitam/vitam#42

Note that this module is compiled against Java 8, thus allowing anyone
to use it with Java 8, 9, 10, 11 and follow, so with Vitam 2.15 and Vitam 3.0.

Vitam jar are not include in the all dependencies jar anymore to counter-act
the Java 11 issue from Vitam side, letting final users to choose between
Java 8 and above and V2 of Vitam OR Java 11 and above and V3 of Vitam.

However we work with Vitam team to get a Waarp version available for both versions 2 and 3. Note that the "all jar" versions does not include any more the Vitam jar, in order to allow you to use either v2.15.3 or v3.0.1 and following versions.

You therefore need to ass the following jars with the Waarp-Vitam library:

**Common Jar for both V2 and V3 versions of Vitam**

*Vitam jars:*
 * fr.gouv.vitam:ingest-external-client
 * fr.gouv.vitam:common-public-client
 * fr.gouv.vitam:ingest-external-api
 * fr.gouv.vitam:access-external-client
 * fr.gouv.vitam:common-public
 * fr.gouv.vitam:common-http-interface
 * fr.gouv.vitam:access-external-api
 * fr.gouv.vitam:common-database-public

**Specific to V2 version of Vitam**

*Vitam jars:*
 * fr.gouv.vitam:access-external-common:jar:2.15.3
 * fr.gouv.vitam:logbook-common-client:jar:2.15.3
 * fr.gouv.vitam:logbook-common:jar:2.15.3

*Other jars: Those jars are included by default, even if Vitam V3 does not need them (no issue).*
 * com.github.fge:json-schema-validator:jar:2.2.6
 * com.googlecode.libphonenumber:libphonenumber:jar:6.2
 * com.github.fge:json-schema-core:jar:1.2.5
 * com.github.fge:uri-template:jar:0.9
 * org.mozilla:rhino:jar:1.7R4
 * javax.mail:mailapi:jar:1.4.3
 * net.sf.jopt-simple:jopt-simple:jar:4.6
  • Loading branch information
fredericBregier committed Sep 30, 2020
1 parent a5ab587 commit 0527518
Show file tree
Hide file tree
Showing 19 changed files with 1,256 additions and 559 deletions.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,37 @@ Vitam introduces a version V3 that has the following issues:
* Java 11 is now mandatory, despite the large usage of Java 8 out of there. This prevents a lot if final users or co-project as this one to follow easily the path taken by Vitam team. Java 11 is not yet quite a success, considering a huge number of Java projects still using Java 8 as the minimal requirement.
* Several issues were encountered in using Version 3 compares to Version 2.X (last being 2.15.3): while Java API are the same, the behaviors are not, those preventing an clean upgrade from V2 to V3.

Therefore, except if V3 evolves in Java 8 and fixing those functional issues, or except if clients command to have a compatible version with V3 of Vitam, Waarp-Vitam will stay on V2 versions.
However we work with Vitam team to get a Waarp version available for both versions 2 and 3. Note that the "all jar" versions does not include any more the Vitam jar, in order to allow you to use either v2.15.3 or v3.0.1 and following versions.

You therefore need to ass the following jars with the Waarp-Vitam library:

**Common Jar for both V2 and V3 versions of Vitam**

*Vitam jars:*
* fr.gouv.vitam:ingest-external-client
* fr.gouv.vitam:common-public-client
* fr.gouv.vitam:ingest-external-api
* fr.gouv.vitam:access-external-client
* fr.gouv.vitam:common-public
* fr.gouv.vitam:common-http-interface
* fr.gouv.vitam:access-external-api
* fr.gouv.vitam:common-database-public

**Specific to V2 version of Vitam**

*Vitam jars:*
* fr.gouv.vitam:access-external-common:jar:2.15.3
* fr.gouv.vitam:logbook-common-client:jar:2.15.3
* fr.gouv.vitam:logbook-common:jar:2.15.3

*Other jars:*
* com.github.fge:json-schema-validator:jar:2.2.6
* com.googlecode.libphonenumber:libphonenumber:jar:6.2
* com.github.fge:json-schema-core:jar:1.2.5
* com.github.fge:uri-template:jar:0.9
* org.mozilla:rhino:jar:1.7R4
* javax.mail:mailapi:jar:1.4.3
* net.sf.jopt-simple:jopt-simple:jar:4.6



Expand Down
27 changes: 25 additions & 2 deletions WaarpVitamInstall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,34 @@ files into it.
Once copied in the correct directory, go to the base directory (for instance:
`/waarp`) where you placed all subdirs and where this `README.md` is.

Run `./scripts/r66/install-module.sh path_to_Waarp-Vitam.jar`
Run `./scripts/r66/install-module.sh path_to_Waarp-Vitam.jar path_to_Vitam_jars`
which will rewrite all files replacing `%ROOT%` by the
current directory and copy the `Waarp-Vitam-X.Y.Z-jar-with-dependencies.jar`
into `%ROOT%/lib/r66/` directory
(`mvn clean install` to generate this jar into target directory).
(`mvn clean install` to generate this jar into target directory) and add to the
`-cp` argument the Vitam jar path.

This Vitam jar path allows to use different versions of Vitam with Waarp-Vitam,
both 2.9 to 3.X versions.

It relies also on existing Jars from Vitam:

### B. Vitam jars

* fr.gouv.vitam:ingest-external-client
* fr.gouv.vitam:common-public-client
* fr.gouv.vitam:ingest-external-api
* fr.gouv.vitam:access-external-client
* fr.gouv.vitam:common-public
* fr.gouv.vitam:common-http-interface
* fr.gouv.vitam:access-external-api
* fr.gouv.vitam:common-database-public

#### Specific to V2 version of Vitam

* fr.gouv.vitam:access-external-common:jar:2.15.3
* fr.gouv.vitam:logbook-common-client:jar:2.15.3
* fr.gouv.vitam:logbook-common:jar:2.15.3

## IV. Adapt according to your need

Expand Down
2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/DipMonitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ "${VERBE}" = "start" ]
then
rm %ROOT%/conf/dip_stop.txt
echo Create %ROOT%/conf/dip_stop.txt to stop DIP Monitor
java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.dip.DipMonitor -e 10 -s %ROOT%/conf/r66/dip_stop.txt -w %ROOT%/conf/r66/config-clientSubmitA.xml
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.dip.DipMonitor -e 10 -s %ROOT%/conf/r66/dip_stop.txt -w %ROOT%/conf/r66/config-clientSubmitA.xml
elif [ "${VERBE}" = "stop" ]
then
echo DIP Monitor will stop
Expand Down
2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/DipTask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ then
echo $0 Need at least file argument -f filepath
exit 1
fi
java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.ingest.DipTask -o %ROOT%/conf/r66/config-ingest.property -w %ROOT%/conf/r66/config-clientSubmitA.xml $@
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.ingest.DipTask -o %ROOT%/conf/r66/config-ingest.property -w %ROOT%/conf/r66/config-clientSubmitA.xml $@

2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/IngestMonitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ "${VERBE}" = "start" ]
then
rm %ROOT%/conf/ingest_stop.txt
echo Create %ROOT%/conf/ingest_stop.txt to stop Ingest Monitor
java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.ingest.IngestMonitor -e 10 -s %ROOT%/conf/r66/ingest_stop.txt -w %ROOT%/conf/r66/config-clientSubmitA.xml
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.ingest.IngestMonitor -e 10 -s %ROOT%/conf/r66/ingest_stop.txt -w %ROOT%/conf/r66/config-clientSubmitA.xml
elif [ "${VERBE}" = "stop" ]
then
echo Ingest Monitor will stop
Expand Down
2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/IngestTask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ then
exit 1
fi

java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.ingest.IngestTask -o %ROOT%/conf/r66/config-ingest.property -w %ROOT%/conf/r66/config-clientSubmitA.xml -k -x DEFAULT_WORKFLOW $@
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.ingest.IngestTask -o %ROOT%/conf/r66/config-ingest.property -w %ROOT%/conf/r66/config-clientSubmitA.xml -k -x DEFAULT_WORKFLOW $@
2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/InitR66Database.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml org.waarp.openr66.server.ServerInitDatabase %ROOT%/conf/r66/config-serverInitA.xml -initdb -dir %ROOT%/data/r66/conf -auth %ROOT%/conf/r66/OpenR66-authent-A.xml
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml org.waarp.openr66.server.ServerInitDatabase %ROOT%/conf/r66/config-serverInitA.xml -initdb -dir %ROOT%/data/r66/conf -auth %ROOT%/conf/r66/OpenR66-authent-A.xml
2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/OperationCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ then
exit 1
fi

java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.common.OperationCheck $1
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.vitam.common.OperationCheck $1
2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/SendR66.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ fi
# args:
# 1 2 3 4 5 6 7
# partner rule reqid applSessionId tenantId filename fileinfo (last from monitor)
java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml org.waarp.openr66.client.DirectTransfer %ROOT%/conf/r66/config-serverA.xml -to $1 -rule $2 -file $6 -info "$7 $3 $4 $5"
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback-client.xml org.waarp.openr66.client.DirectTransfer %ROOT%/conf/r66/config-serverA.xml -to $1 -rule $2 -file $6 -info "$7 $3 $4 $5"

2 changes: 1 addition & 1 deletion WaarpVitamInstall/waarp/bin/r66/StartR66ServerVitam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else
fi
if [ "${VERBE}" = "start" ]
then
java -cp %ROOT%/lib/r66/%WaarpVitam% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.openr66.server.R66Server %ROOT%/conf/r66/config-serverA.xml
java -cp %ROOT%/lib/r66/%WaarpVitam%:%VITAM% -Dlogback.configurationFile=%ROOT%/conf/r66/logback.xml -Dvitam.tmp.folder=%ROOT%/tmp/r66 -Dvitam.config.folder=%ROOT%/conf/r66/vitam -Dvitam.data.folder=%ROOT%/data/r66 -Dvitam.log.folder=%ROOT%/log/r66 org.waarp.openr66.server.R66Server %ROOT%/conf/r66/config-serverA.xml
elif [ "${VERBE}" = "stop" ]
then
echo R66Server will stop
Expand Down
15 changes: 13 additions & 2 deletions WaarpVitamInstall/waarp/script/r66/install-module.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#!/bin/sh

if [ $# -eq 0 ]
if [ $# -lt 2 ]
then
echo Needs at least the jar path of the Waarp-Vitam module as 1rst argument
echo Needs at least the jar path of the Waarp-Vitam module as 1rst argument and base path for Java Vitam jars
exit 1
fi
if [ ! -r $1 ]
then
echo Needs a valid jar path of the Waarp-Vitam module as 1rst argument
exit 2
fi
if [ ! -d $2 ]
then
echo Needs a valid jar path of the Waarp-Vitam module as 1rst argument
exit 3
fi
ROOT="$( cd "$(dirname "$0")" ; pwd -P )"
ROOT="$(dirname ${ROOT})"
ROOT="$(dirname ${ROOT})"
Expand All @@ -26,4 +31,10 @@ do
echo ${FILE}
sed -i -e "s#%WaarpVitam%#${WaarpVitam}#g" ${FILE}
done
Vitam="$2"
for FILE in `fgrep -FlR %VITAM% bin conf data`
do
echo ${FILE}
sed -i -e "s#%VITAM%#${Vitam}#g" ${FILE}
done

44 changes: 44 additions & 0 deletions maven-version-rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ This file is part of Waarp Project (named also Waarp or GG).
~
~ Copyright (c) 2019, Waarp SAS, and individual contributors by the @author
~ tags. See the COPYRIGHT.txt in the distribution for a full listing of
~ individual contributors.
~
~ All Waarp Project is free software: you can redistribute it and/or
~ modify it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Waarp is distributed in the hope that it will be useful, but WITHOUT ANY
~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
~ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along with
~ Waarp . If not, see <http://www.gnu.org/licenses/>.
-->

<ruleset xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
comparisonMethod="maven"
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
<ignoreVersions>
<!-- Ignore Alpha's, Beta's, release candidates and milestones -->
<ignoreVersion type="regex">(?i).*Alpha(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*Beta(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*-B(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*RC(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*CR(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*M(?:-?\d+)?</ignoreVersion>
</ignoreVersions>
<rules>
<rule groupId="dom4j" artifactId="dom4j">
<ignoreVersions>
<ignoreVersion type="exact">20040902.021138</ignoreVersion>
<ignoreVersion type="exact">1.6.1-jboss</ignoreVersion>
<ignoreVersion type="exact">1.6.1-brew</ignoreVersion>
</ignoreVersions>
</rule>
</rules>
</ruleset>

0 comments on commit 0527518

Please sign in to comment.