Commit 6f7f5f3c authored by PECQUOT's avatar PECQUOT
Browse files

Merge from branch 'quadrige3'

git-svn-id: https://scmforge.ifremer.fr/authscm/lp1ee9d/svn/reefdb/trunk@2256 cd918a83-917d-4a2a-92d7-bc1d03929fc5
parent dfb1e787
This diff is collapsed.
......@@ -21,8 +21,8 @@ IMPORTANT: Pour déployer à l'Ifremer (la configuration par défaut) il faut do
Do it faster:
> mvn release:prepare -Darguments="-DperformRelease -Dmaven.test.skip -Dmaven.javadoc.skip -Dandromda.run.skip=true"
> mvn release:perform -Darguments="-DperformRelease -Dmaven.test.skip -Dmaven.javadoc.skip -Dandromda.run.skip=false" -B
> mvn release:prepare -Darguments="-DperformRelease -Dmaven.test.skip -Dmaven.javadoc.skip"
> mvn release:perform -Darguments="-DperformRelease -Dmaven.test.skip -Dmaven.javadoc.skip -Dmaven.deploy.skip=false -Dsource.skip=false" -B
Déploiement sur le repository EIS
-------------------------------------
......@@ -37,18 +37,18 @@ Déploiement sur le repository EIS
Génération du schema SQL (Oracle)
---------------------------------
> mvn compile andromdapp:schema -pl quadrige2-core-server -Psql
> mvn compile andromdapp:schema -pl quadrige3-core-server -Psql
Génération du schema SQL (Quadrige2)
Génération du schema SQL (quadrige3)
------------------------------------
> mvn compile andromdapp:schema -pl quadrige2-core-client -Psql
> mvn compile andromdapp:schema -pl quadrige3-core-client -Psql
Tester le plugin Magicdraw
--------------------------
mvn -pl quadrige2-mda/quadrige2-magicdraw-plugin -Prun -DmagicdrawHome="<MAGIC_DRAW_HOME>"
mvn -pl quadrige3-mda/quadrige3-magicdraw-plugin -Prun -DmagicdrawHome="<MAGIC_DRAW_HOME>"
Install sous eclipse
......@@ -65,14 +65,14 @@ Démarrage de l'UI avec une base de données
1/ Télécharger la BDD avec les référentiels d'exploitation : https://forge.ifremer.fr/frs/download.php/latestzip/313/PrototypeTestDB-latest.zip
2/ Dézipper la base dans <reefdb_trunk>/quadrige2-core-client/src/test/
2/ Dézipper la base dans <reefdb_trunk>/quadrige3-core-client/src/test/
- soit dans db/ pour lancer la BDD en mode normal (ouverture à chaque lancement)
- soit dans db-server/ pour lancer la BDD une seule fois, en mode serveur --> Conseillé pour les DEV.
Pour lancer le mode serveur, lancer le script <reefdb_trunk>/quadrige2-core-client/src/test/startServer.bat
Pour lancer le mode serveur, lancer le script <reefdb_trunk>/quadrige3-core-client/src/test/startServer.bat
3/ Lancer l'UI, avec l'option JVM suivante :
-Dreefdb.persistence.enable=true
Si vous avez la base en mode serveur, ajouter également l'option :
-Dquadrige2.persistence.jdbc.url=jdbc:hsqldb:hsql://localhost/quadrige2
-Dquadrige3.persistence.jdbc.url=jdbc:hsqldb:hsql://localhost/quadrige3
\ No newline at end of file
......@@ -3,13 +3,13 @@ README ANDROMDA
* Generate SQL creation script:
> mvn andromdapp:schema -pl quadrige2-core-client -Psql
> mvn andromdapp:schema -pl quadrige3-core-client -Psql
the generated sql script file is located in target/generated-sources/sql/create-tables.sql
* Generate SQL creation script and execute it in a new HsqlDB database
> mvn andromdapp:schema -pl quadrige2-core-client -Psql -DexecuteScripts
> mvn andromdapp:schema -pl quadrige3-core-client -Psql -DexecuteScripts
the SQL script created and executed. It will create a HSQL database in src/test/db
......
......@@ -3,19 +3,19 @@ README : for liquibase (database version managment)
HOW-TO (Server part / Oracle):
------------------------------
* Update Quadrige2 database to last version :
* Update quadrige3 database to last version :
1. launch upgrade using maven :
> mvn compile liquibase:update -pl quadrige2-core-server -Psql
> mvn compile liquibase:update -pl quadrige3-core-server -Psql
* Show diff between Quadrige2 database and hibernate entites :
* Show diff between quadrige3 database and hibernate entites :
1. launch diff using maven :
> mvn compile liquibase:diff -pl quadrige2-core-server -Psql -Denv=server-oracle
> mvn compile liquibase:diff -pl quadrige3-core-server -Psql -Denv=server-oracle
2. Open the file : 'quadrige2-core-server/target/db-changelog-<version>.xml' to show updated needs
2. Open the file : 'quadrige3-core-server/target/db-changelog-<version>.xml' to show updated needs
WARNING : some changes on indexes AND/OR sequence must to be ignore (because only columns order change)
......@@ -28,20 +28,20 @@ README : for liquibase (database version managment)
* Update ReefDB database to last version :
1. Edit the file 'quadrige2-core-client/src/test/db/quadrige2.properties', and change properties 'readOnly' to 'false'
1. Edit the file 'quadrige3-core-client/src/test/db/quadrige3.properties', and change properties 'readOnly' to 'false'
2. launch upgrade using maven :
> mvn compile liquibase:update -pl quadrige2-core-client -Psql
> mvn compile liquibase:update -pl quadrige3-core-client -Psql
3. Edit the file 'quadrige2-core-client/src/test/db/quadrige2.properties', and change properties 'readOnly' to 'true'
3. Edit the file 'quadrige3-core-client/src/test/db/quadrige3.properties', and change properties 'readOnly' to 'true'
* Show diff between Q2 DB database and hibernate entites :
1. launch diff using maven :
> mvn compile liquibase:diff -pl quadrige2-core-client -Psql
> mvn compile liquibase:diff -pl quadrige3-core-client -Psql
2. Open the file : 'quadrige2-core-client/target/db-changelog-<version>.xml' to show updated needs
2. Open the file : 'quadrige3-core-client/target/db-changelog-<version>.xml' to show updated needs
WARNING : some changes on indexes AND/OR sequence must to be ignore (because only columns order change)
Troubleshooting:
......@@ -51,4 +51,4 @@ README : for liquibase (database version managment)
1. Release liquibase lock:
> mvn -pl quadrige2-core-<client|server> liquibase:releaseLocks -Psql
> mvn -pl quadrige3-core-<client|server> liquibase:releaseLocks -Psql
......@@ -3,6 +3,6 @@ README MAGICDRAW
* Install Magicdraw ReefDB plugin
> mvn -f quadrige2-mda/quadrige2-magicdraw-plugin/pom.xml -Prun -DmagicdrawHome={magicdrawHome}
> mvn -f quadrige3-mda/quadrige3-magicdraw-plugin/pom.xml -Prun -DmagicdrawHome={magicdrawHome}
where {magicdrawHome} is the home directory of installed MagicDraw software (ex: C:\dev\magicdraw-17.0.4)
\ No newline at end of file
This diff is collapsed.
eclipse.preferences.version=1
encoding/src/main/filtered-resources=UTF-8
encoding/src/main/java=UTF-8
encoding/src/main/resources=UTF-8
encoding/src/test/java=UTF-8
encoding/src/test/resources=UTF-8
encoding/target/generated-sources/hibernate=UTF-8
encoding/target/generated-sources/java=UTF-8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
This diff is collapsed.
This diff is collapsed.
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
# - AL 2.0
# - Affero General Public License (AGPL)
# - Apache License 2.0
# - Apache License Version 2.0
# - Apache License, version 2.0
# - BSD License
# - BSD style
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Development and Distribution License
# - Common Public License Version 1.0
# - Eclipse Distribution License (EDL), Version 1.0
# - Eclipse Public License (EPL), Version 1.0
# - Eclipse Public License 1.0
# - GNU General Public License, Version 2 with the Classpath Exception
# - GNU Lesser Public License
# - HSQLDB License, a BSD open source license
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
# - MIT License
# - MPL 1.1
# - New BSD License
# - OTN license
# - Public Domain
# - The Apache Software License, Version 2.0
# - The New BSD License
# - WTFPL
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
#Thu Feb 12 10:01:13 CET 2015
com.oracle--ojdbc7--12.1.0.2.0=OTN license
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
dom4j--dom4j--1.6.1=BSD License
org.hibernate--hibernate-spatial--4.3-20140213=Lesser General Public License (LGPL)
###
# #%L
# Reef DB :: Quadrige2 Client Core
# $Id:$
# $HeadURL:$
# %%
# Copyright (C) 2013 Ifremer
# %%
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #L%
###
# Global logging configuration
log4j.rootLogger=ERROR, stdout, file
# Console output
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %5p %m%n
# quadrige2 core
log4j.logger.fr.ifremer.quadrige2=INFO
log4j.logger.fr.ifremer.quadrige2.core.config=WARN
log4j.logger.fr.ifremer.common.synchro.dao.DaoUtils=ERROR
log4j.logger.org.hibernate=WARN
log4j.logger.org.reflections=WARN
log4j.logger.org.nuiton.util=WARN
log4j.logger.org.nuiton.config=WARN
log4j.logger.org.springframework=WARN
log4j.logger.org.apache.commons.beanutils=WARN
log4j.logger.org.jboss.logging=WARN
log4j.logger.net.sf.ehcache=ERROR
log4j.logger.net.sf.ehcache.hibernate=WARN
log4j.logger.liquibase=WARN
#See https://forum.hibernate.org/viewtopic.php?p=2404391
log4j.logger.org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog=ERROR
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.file=${quadrige2.log.file}
log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=4
log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %5p [%20t] %c - %m%n
log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %5p (%c:%L) - %m%n
quadrige2.version=${project.version}
quadrige2.site.url=${project.url}
quadrige2.inceptionYear=${project.inceptionYear}
quadrige2.organizationName=${license.organizationName}
###################################################################
# database properties :
###################################################################
quadrige2.persistence.db.directory=data/db
quadrige2.persistence.db.name=quadrige2
quadrige2.persistence.jdbc.url=jdbc:hsqldb:file:${quadrige2.persistence.db.directory}/${quadrige2.persistence.db.name}
# For server mode (dev only):
#quadrige2.persistence.jdbc.url=jdbc:hsqldb:hsql://localhost/quadrige2
#quadrige2.persistence.jdbc.driver=${jdbc.driver}
#quadrige2.persistence.hibernate.dialect=${hibernate.dialect}
quadrige2.persistence.jdbc.username=sa
quadrige2.persistence.jdbc.password=
quadrige2.persistence.jdbc.schema=PUBLIC
###################################################################
# Import database properties, used by synchronization
###################################################################
quadrige2.synchro.import.jdbc.url=jdbc:oracle:thin:@<HOST>:1521:<INSTANCE>
quadrige2.synchro.import.jdbc.username=<USER>
quadrige2.synchro.import.jdbc.password=<PWD>
quadrige2.synchro.import.jdbc.schema=<SCHEMA>
quadrige2.synchro.import.jdbc.driver=oracle.jdbc.driver.OracleDriver
quadrige2.synchro.import.hibernate.dialect=org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect
# Transcribing items types to import
# If empty: all transcribing types
#quadrige2.synchro.import.transcribingTypeId=
# Referential tables to import
# If empty: all default tables
#quadrige2.synchro.import.tables.referential.includes=
# Data tables (for importation and exportation)
# If empty: all default tables
#quadrige2.synchro.import.tables.data.includes=
###################################################################
# Other properties
###################################################################
# Change log path to used for options '--schema-XXX'
quadrige2.persistence.liquibase.changelog.path=file:./changelog/db-changelog-master.xml
# HSQLDB Database script for option '--new-db'
quadrige2.persistence.db.script=file:./changelog/quadrige2.script
\ No newline at end of file
package fr.ifremer.quadrige2.core.action;
/*
* #%L
* Reef DB :: Quadrige2 Client Core
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2014 - 2015 Ifremer
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
/**
* <p>
* HelpAction class.
* </p>
*
*/
public class HelpAction {
/**
* <p>
* show.
* </p>
*/
public void show() {
StringBuilder sb = new StringBuilder();
sb.append("Usage: <commands> <options>\n")
.append("with <commands>:\n")
.append(" -h --help Display help\n")
.append(" --schema-update Run database schema update\n")
.append(" --schema-status --output <file> Generate a database status report (pending schema changes)\n")
.append(" --schema-diff --output <file> Generate a database schema diff report (compare database to quadrige2 data model)\n")
.append(" --schema-changelog --output <file> Generate a diff into a changelog XML file (compare database to quadrige2 data model)\n")
.append(" --new-db --output <directory> Generate a empty Quadrige2 database (and execute --schema-update)\n")
.append(" --import-ref Import referential data, from the central database\n")
.append(" --import-data Import raw data, from the central database\n")
.append("\n")
.append("with <options>:\n")
.append(" -u --user <user> Database user\n")
.append(" -p --password <pwd> Database password\n")
.append(" -db --database <db_url> Database JDBC URL ()\n")
.append(" -f Force the output directory overwrite, if exists\n")
.append("\n")
.append("other <options> for commands --import-XXX\n")
.append(" -iu --import-user <user> Imported database user\n")
.append(" -ip --import-password <pwd> Imported database password\n")
.append(" -idb --import-database <db_url> Imported database JDBC URL\n")
.append(" -ny --nb-years <nb_years> Number of years to import (for --import-data)\n")
;
System.out.println(sb.toString());
}
}
package fr.ifremer.quadrige2.core.config;
/*
* #%L
* Reef DB :: Quadrige2 Client Core
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2012 - 2014 Ifremer
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
import fr.ifremer.quadrige2.core.action.*;
import fr.ifremer.quadrige2.synchro.action.ImportAction;
import org.nuiton.config.ConfigActionDef;
/**
* <p>
* Quadrige2CoreConfigurationAction class.
* </p>
*
*/
public enum Quadrige2CoreConfigurationAction implements ConfigActionDef {
HELP(HelpAction.class.getName() + "#show", "-h", "--help"),
DB_UPDATE(DatabaseUpdateAction.class.getName() + "#run", "--schema-update"),
DB_STATUS(DatabaseStatusAction.class.getName() + "#run", "--schema-status"),
DB_DIFF(DatabaseDiffAction.class.getName() + "#run", "--schema-diff"),
DB_CHANGELOG(DatabaseChangeLogAction.class.getName() + "#run", "--schema-changelog"),
NEW_EMPTY_DB(DatabaseNewDbAction.class.getName() + "#run", "--new-db"),
IMPORT_REF(ImportAction.class.getName() + "#importReferential", "--import-ref"),
IMPORT_DATA(ImportAction.class.getName() + "#importData", "--import-data"),
IMPORT_ALL(ImportAction.class.getName() + "#importReferentialAndData", "--import");
public String action;
public String[] aliases;
Quadrige2CoreConfigurationAction(String action, String... aliases) {
this.action = action;
this.aliases = aliases;
}
/** {@inheritDoc} */
@Override
public String getAction() {
return action;
}
/** {@inheritDoc} */
@Override
public String[] getAliases() {
return aliases;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment