Commit d59b07b9 authored by Stefan Huehner's avatar Stefan Huehner
Browse files

ISSUE-28703: Remove obsolete dbmanager.jar & ant database.lib

Those were not really used anymore by dbsourcemanager for a while
already. However they were still compiled by various ant tasks.
Remove all of that as obsolete

- Stop calling database.lib target whereever done before
- Remove database.lib target from main build.xml file
- Remove src-db/build.xml + src used to build dbmanager.jar itself
- Remove src-db/database/lib/dbmanager.jar from .gitinore
- Above is enough to have it clean for any fresh checkout
- To cleanup older workspaces also add following to compile.complete*
  - rm src-db/build
  - rm src-db/database/lib/dbmanager.jar
    Note that was copied also to WebContent/WEB-INF/lib
parent 93d262ae
......@@ -32,7 +32,6 @@ config/log4j2.xml
config/log4j2-web.xml
src-test/src/log4j2-test.xml
src-db/database/lib/dbmanager.jar
src-db/database/formalChangesScript.xml
src-core/lib/openbravo-core.jar
src-wad/lib/openbravo-wad.jar
......
......@@ -32,7 +32,6 @@ war: refer to build.war target of src.
core.lib: refer to build target of src-core.
wad.lib: refer to build target of src-wad.
trl.lib: refer to build target of src-trl.
database.lib: refer to jar target of src-db.
clean: refer to clean target of src.
trl.clean: refer to trl.clean target of src.
translate: refer to translate target of src.
......@@ -568,11 +567,6 @@ export.database: exports database structure and data to xml files.
<ant dir="${base.src.trl}" target="build" inheritAll="true" inheritRefs="true" />
</target>
<target name="database.lib" depends="init">
<ant dir="${base.src.db}" target="jar" inheritAll="true" inheritRefs="true" />
<copy file="${base.src.db}/build/lib/dbmanager.jar" todir="${base.db}/lib" failonerror="false" />
</target>
<target name="clean" depends="init">
<ant dir="${base.src}" target="clean" inheritAll="true" inheritRefs="true" />
</target>
......@@ -594,12 +588,12 @@ export.database: exports database structure and data to xml files.
<ant dir="${base.db}" target="setApplied" inheritAll="true" inheritRefs="true" />
</target>
<target name="create.database" depends="init, core.lib, database.lib">
<target name="create.database" depends="init, core.lib">
<ant dir="${base.db}" antfile="build-create.xml" target="create.database" inheritAll="true" inheritRefs="true" />
<antcall target="db.apply.modules.sampledata" />
</target>
<target name="update.database" depends="init, core.lib, database.lib, buildvalidation">
<target name="update.database" depends="init, core.lib, buildvalidation">
<updatesystemstatus v="RB12"/>
<ant dir="${base.db}" target="update.database.java" inheritAll="true" inheritRefs="true" />
<antcall target="generate.entities.quick" />
......@@ -614,7 +608,7 @@ export.database: exports database structure and data to xml files.
<ant dir="${base.db}" target="update.database.script" inheritAll="true" inheritRefs="true" />
</target>
<target name="export.database" depends="init, core.lib, database.lib, generate.entities.quick">
<target name="export.database" depends="init, core.lib, generate.entities.quick">
<ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true" />
</target>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!--
************************************************************************************
* Copyright (C) 2001-2015 Openbravo S.L.U.
* Licensed under the Apache Software License version 2.0
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
************************************************************************************
-->
<project default="jar" basedir="." name="dbmanager">
<property name="build.db.classes" value="${basedir}/build/classes" />
<property name="build.db.lib" value="${basedir}/build/lib" />
<property name="build.db.src" value="${basedir}/src" />
<path id="db.class.path">
<fileset dir="${basedir}/database/lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${build.db.classes}" failonerror="false" includeemptydirs="true" />
<delete dir="${build.db.lib}" failonerror="false" includeemptydirs="true" />
</target>
<target name="compile">
<mkdir dir="${build.db.classes}" />
<mkdir dir="${build.db.lib}" />
<javac srcdir="${build.db.src}" destdir="${build.db.classes}" deprecation="on" encoding="UTF-8" fork="true" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<classpath refid="db.class.path" />
</javac>
<copy todir="${build.db.classes}">
<fileset dir="${build.db.src}" excludes="**/*.java,**/*.form" />
</copy>
</target>
<target name="jar" depends="compile">
<jar destfile="${build.db.lib}/dbmanager.jar">
<fileset dir="${build.db.classes}" />
<manifest>
<attribute name="Built-By" value="Openbravo S.L.U." />
</manifest>
</jar>
</target>
</project>
/*
************************************************************************************
* Copyright (C) 2'0''0'1-2'0''0'8 Openbravo S.L.U.
* Licensed under the Apache Software License version 2.'0'
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.'0'
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
************************************************************************************
*/
package com.openbravo.db;
import org.apache.ddlutils.io.AbstractDatabaseFilter;
import org.apache.ddlutils.model.Database;
/**
*
* @author adrian
*/
public final class OpenbravoDataFilter extends AbstractDatabaseFilter {
/** Creates a new instance of OpenbravoDataFilter */
public OpenbravoDataFilter() {
}
public void init(Database database) {
addAllTables(database);
removeTable("AD_DEPENDENCIES");
removeTable("AD_ID_TRANSLATION");
removeTable("AD_PINSTANCE");
removeTable("AD_PINSTANCE_PARA");
removeTable("AD_REPLICATION");
removeTable("AD_REPLICATION_LOG");
removeTable("AD_REPLICATION_RUN");
removeTable("AD_REPLICATIONSTRATEGY");
removeTable("AD_REPLICATIONTABLE");
removeTable("AD_SCRIPT_SQL");
removeTable("AD_SEQUENCE_AUDIT");
removeTable("AD_SEQUENCE_NO");
removeTable("AD_SESSION");
removeTable("AD_SYSTEM");
removeTable("AD_SYSTEM_INFO");
removeTable("TIME_DIMENSION");
removeTable("AD_DEVELOPER");
addTable("AD_CLIENT", "AD_CLIENT_ID <> '0'");
addTable("AD_CLIENTINFO", "AD_CLIENT_ID <> '0'");
addTable("AD_ORG", "AD_CLIENT_ID <> '0'");
addTable("AD_ORGTYPE", "AD_CLIENT_ID <> '0'");
addTable("AD_ORGINFO", "AD_CLIENT_ID <> '0'");
addTable("AD_ROLE", "AD_CLIENT_ID <> '0'");
addTable("AD_ROLE_ORGACCESS", "AD_CLIENT_ID <> '0'");
addTable("AD_USER", "AD_USER_ID NOT IN ('0','100')");
addTable("AD_USER_ROLES", "AD_CLIENT_ID <> '0'");
addTable("AD_ALERTRULE", "AD_CLIENT_ID <> '0'");
addTable("AD_ALERTRULE_TRL", "AD_CLIENT_ID <> '0' OR AD_LANGUAGE <> 'es_ES'");
removeTable("AD_AUXILIARINPUT");
removeTable("AD_CALLOUT");
removeTable("AD_COLUMN");
removeTable("AD_DATATYPE");
removeTable("AD_DIMENSION");
removeTable("AD_ELEMENT");
removeTable("AD_ELEMENT_TRL");
removeTable("AD_FIELD");
removeTable("AD_FIELD_TRL");
removeTable("AD_FIELDGROUP");
removeTable("AD_FIELDGROUP_TRL");
removeTable("AD_FORM");
removeTable("AD_FORM_TRL");
addTable("AD_IMAGE", "AD_CLIENT_ID <> '0'");
removeTable("AD_LANGUAGE");
removeTable("AD_MENU");
removeTable("AD_MENU_TRL");
removeTable("AD_MESSAGE");
removeTable("AD_MESSAGE_TRL");
removeTable("AD_MODEL_OBJECT");
removeTable("AD_MODEL_OBJECT_MAPPING");
removeTable("AD_MONTH");
addTable("AD_PREFERENCE", "AD_CLIENT_ID <> '0'");
removeTable("AD_PROCESS");
removeTable("AD_PROCESS_TRL");
removeTable("AD_PROCESS_PARA");
removeTable("AD_PROCESS_PARA_TRL");
removeTable("AD_REFERENCE");
removeTable("AD_REFERENCE_TRL");
removeTable("AD_REF_LIST");
removeTable("AD_REF_LIST_TRL");
removeTable("AD_REF_SEARCH");
removeTable("AD_REF_SEARCH_COLUMN");
removeTable("AD_REF_TABLE");
addTable("AD_SEQUENCE", "AD_CLIENT_ID <> '0'");
removeTable("AD_TAB");
removeTable("AD_TAB_TRL");
removeTable("AD_TABLE");
removeTable("AD_TEXTINTERFACES");
removeTable("AD_TEXTINTERFACES_TRL");
addTable("AD_TREE", "AD_CLIENT_ID <> '0'");
addTable("AD_TREENODE", "AD_CLIENT_ID <> '0'");
removeTable("AD_VAL_RULE");
removeTable("AD_WINDOW");
removeTable("AD_WINDOW_TRL");
addTable("AD_ACCOUNTINGRPT_ELEMENT", "AD_CLIENT_ID <> '0'");//
addTable("C_COUNTRY", "AD_CLIENT_ID <> '0'");//
addTable("C_COUNTRY_TRL", "AD_CLIENT_ID <> '0'");//
addTable("C_CURRENCY", "AD_CLIENT_ID <> '0'");//
addTable("C_CURRENCY_TRL", "AD_CLIENT_ID <> '0'");//
addTable("C_DOCTYPE", "AD_CLIENT_ID <> '0'");
addTable("C_DOCTYPE_TRL", "AD_CLIENT_ID <> '0'");
addTable("C_REGION", "AD_CLIENT_ID <> '0'");//
addTable("C_UOM", "AD_CLIENT_ID <> '0'");//
addTable("C_UOM_TRL", "AD_CLIENT_ID <> '0'");//
addTable("GL_CATEGORY", "AD_CLIENT_ID <> '0'");//
}
}
/*
************************************************************************************
* Copyright (C) 2001-2010 Openbravo S.L.U.
* Licensed under the Apache Software License version 2.0
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
************************************************************************************
*/
package com.openbravo.db;
import org.apache.ddlutils.platform.ExcludeFilter;
@Deprecated
/**
* @Deprecated This class has been replaced by the new excludeFilter functionality. If you need to extend the list, you can check this document: http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/How_To_Exclude_Database_Physical_Objects_From_Model
*/
public class OpenbravoExcludeFilter extends ExcludeFilter {
@Override
public String[] getExcludedTables() {
return new String[] { "PLAN_TABLE", "AD_SYSTEM_MODEL", "C_TEMP_SELECTION", "C_TEMP_SELECTION2", "AD_CONTEXT_INFO" };
}
public String[] getExcludedViews() {
return new String[] { "DUAL", "USER_CONS_COLUMNS", "USER_TABLES", "USER_CONSTRAINTS",
"USER_INDEXES", "USER_IND_COLUMNS", "USER_OBJECTS", "USER_TAB_COLUMNS", "USER_TRIGGERS",
"V$VERSION", "AD_INTEGER" };
}
public String[] getExcludedFunctions() {
return new String[] { "EXIST_LANGUAGE", "INSERT_PG_LANGUAGE", "CREATE_LANGUAGE", "DATEFORMAT",
"TO_NUMBER", "TO_DATE", "TO_TIMESTAMP", "TO_CHAR", "ROUND", "RPAD", "SUBSTR",
"TO_INTERVAL", "ADD_MONTHS", "ADD_DAYS", "TYPE_OID", "SUBSTRACT_DAYS", "TRUNC", "INSTR",
"LAST_DAY", "IS_TRIGGER_ENABLED", "DROP_VIEW", "MONTHS_BETWEEN",
"AD_SCRIPT_DISABLE_TRIGGERS", "AD_SCRIPT_DISABLE_CONSTRAINTS", "AD_SCRIPT_ENABLE_TRIGGERS",
"AD_SCRIPT_ENABLE_CONSTRAINTS", "AD_SCRIPT_DROP_RECREATE_INDEXES",
"AD_SCRIPT_DROP_RECREATE_INDEX", "AD_SCRIPT_EXECUTE", "DBA_GETATTNUMPOS",
"DBA_GETSTANDARD_SEARCH_TEXT", "DUMP", "NEGATION", "EQUAL", "GREATEREQUAL", "LOWEREQUAL",
"LOWEREQUALNUMERIC", "LOWEREQUALTIMESTAMP", "DBA_RECOMPILE", "DBA_AFTERIMPORT", "NOW",
"UPDATE_DATEFORMAT", "GET_UUID", "HEX_TO_INT", "UUID_GENERATE_V4", "AD_ORG_CHK_DOCUMENTS",
"AD_ORG_CHK_DOC_PAYMENTS", "C_CREATE_TEMPORARY_TABLES", "AD_DB_MODIFIED", "AD_GET_DOC_LE_BU",
"AD_GET_RDBMS", "AD_CREATE_AUDIT_TRIGGERS"};
}
}
/*
************************************************************************************
* Copyright (C) 2'0''0'1-2'0''0'8 Openbravo S.L.U.
* Licensed under the Apache Software License version 2.'0'
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.'0'
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
************************************************************************************
*/
package com.openbravo.db;
import org.apache.ddlutils.io.AbstractDatabaseFilter;
import org.apache.ddlutils.model.Database;
/**
*
* @author adrian
*/
public class OpenbravoMasterdataFilter extends AbstractDatabaseFilter {
/** Creates a new instance of OpenbravoMetadataFilter */
public OpenbravoMasterdataFilter() {
}
public void init(Database database) {
addTable("AD_ACCOUNTINGRPT_ELEMENT", "AD_CLIENT_ID = '0'");//
addTable("C_COUNTRY", "AD_CLIENT_ID = '0'");//
addTable("C_COUNTRY_TRL", "AD_CLIENT_ID = '0'");//
addTable("C_CURRENCY", "AD_CLIENT_ID = '0'");//
addTable("C_CURRENCY_TRL", "AD_CLIENT_ID = '0'");//
addTable("C_DOCTYPE", "AD_CLIENT_ID = '0'");
addTable("C_DOCTYPE_TRL", "AD_CLIENT_ID = '0'");
addTable("C_REGION", "AD_CLIENT_ID = '0'");//
addTable("C_UOM", "AD_CLIENT_ID = '0'");//
addTable("C_UOM_TRL", "AD_CLIENT_ID = '0'");//
addTable("GL_CATEGORY", "AD_CLIENT_ID = '0'");//
}
}
/*
************************************************************************************
* Copyright (C) 2'0''0'1-2'0''0'8 Openbravo S.L.U.
* Licensed under the Apache Software License version 2.'0'
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.'0'
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
************************************************************************************
*/
package com.openbravo.db;
import org.apache.ddlutils.io.AbstractDatabaseFilter;
import org.apache.ddlutils.model.Database;
/**
*
* @author adrian
*/
public class OpenbravoMetadataFilter extends AbstractDatabaseFilter {
/** Creates a new instance of OpenbravoMetadataFilter */
public OpenbravoMetadataFilter() {
}
public void init(Database database) {
addTable("AD_CLIENT", "AD_CLIENT_ID = '0'");
addTable("AD_CLIENTINFO", "AD_CLIENT_ID = '0'");
addTable("AD_ORG", "AD_CLIENT_ID = '0'");
addTable("AD_ORGTYPE", "AD_CLIENT_ID = '0'");
addTable("AD_ORGINFO", "AD_CLIENT_ID = '0'");
addTable("AD_ROLE", "AD_CLIENT_ID = '0'");
addTable("AD_MODEL_OBJECT_PARA", "AD_CLIENT_ID = '0'");
addTable("AD_USER", "AD_USER_ID IN ('0','100')");
// addTable("AD_WORKBENCH", "AD_CLIENT_ID = '0'");
addTable("AD_ALERTRULE", "AD_CLIENT_ID = '0'");
addTable("AD_ALERTRULE_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_AUXILIARINPUT", "AD_CLIENT_ID = '0'");
addTable("AD_CALLOUT", "AD_CLIENT_ID = '0'");
addTable("AD_COLUMN", "AD_CLIENT_ID = '0'");
addTable("AD_DATATYPE", "AD_CLIENT_ID = '0'");
addTable("AD_DIMENSION", "AD_CLIENT_ID = '0'");
addTable("AD_ELEMENT", "AD_CLIENT_ID = '0'");
addTable("AD_ELEMENT_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_FIELD", "AD_CLIENT_ID = '0'");
addTable("AD_FIELD_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_FIELDGROUP", "AD_CLIENT_ID = '0'");
addTable("AD_FIELDGROUP_TRL", "AD_CLIENT_ID = '0' ");
addTable("AD_FORM", "AD_CLIENT_ID = '0'");
addTable("AD_FORM_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_IMAGE", "AD_CLIENT_ID = '0'");
addTable("AD_LANGUAGE", "AD_CLIENT_ID = '0'");
addTable("AD_MENU", "AD_CLIENT_ID = '0'");
addTable("AD_MENU_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_MESSAGE", "AD_CLIENT_ID = '0'");
addTable("AD_MESSAGE_TRL", "AD_CLIENT_ID = '0' ");
addTable("AD_MODEL_OBJECT", "AD_CLIENT_ID = '0'");
addTable("AD_MODEL_OBJECT_MAPPING", "AD_CLIENT_ID = '0'");
addTable("AD_MODULE", "AD_MODULE_ID = '0'");
addTable("AD_MONTH", "AD_CLIENT_ID = '0'");
addTable("AD_PREFERENCE", "AD_CLIENT_ID = '0'");
addTable("AD_PROCESS", "AD_CLIENT_ID = '0'");
addTable("AD_PROCESS_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_PROCESS_PARA", "AD_CLIENT_ID = '0'");
addTable("AD_PROCESS_PARA_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_REFERENCE", "AD_CLIENT_ID = '0'");
addTable("AD_REFERENCE_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_REF_LIST", "AD_CLIENT_ID = '0'");
addTable("AD_REF_LIST_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_REF_SEARCH", "AD_CLIENT_ID = '0'");
addTable("AD_REF_SEARCH_COLUMN", "AD_CLIENT_ID = '0'");
addTable("AD_REF_TABLE", "AD_CLIENT_ID = '0'");
// addTable("AD_SEQUENCE", "AD_CLIENT_ID = '0'");
addTable("AD_TAB", "AD_CLIENT_ID = '0'");
addTable("AD_TAB_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_TABLE", "AD_CLIENT_ID = '0'");
addTable("AD_TEXTINTERFACES", "AD_CLIENT_ID = '0'");
addTable("AD_TEXTINTERFACES_TRL", "AD_CLIENT_ID = '0'");
addTable("AD_TREE", "AD_CLIENT_ID = '0'");
addTable("AD_TREENODE", "AD_CLIENT_ID = '0'");
addTable("AD_VAL_RULE", "AD_CLIENT_ID = '0'");
addTable("AD_WINDOW", "AD_CLIENT_ID = '0'");
addTable("AD_WINDOW_TRL", "AD_CLIENT_ID = '0'");
/*
* addTable("AD_ACCOUNTINGRPT_ELEMENT", "AD_CLIENT_ID = '0'");// addTable("C_COUNTRY",
* "AD_CLIENT_ID = '0'");// addTable("C_COUNTRY_TRL",
* "AD_CLIENT_ID = '0' AND AD_LANGUAGE = 'es_ES'");// addTable("C_CURRENCY",
* "AD_CLIENT_ID = '0'");// addTable("C_CURRENCY_TRL",
* "AD_CLIENT_ID = '0' AND AD_LANGUAGE = 'es_ES'");//
*/
/*
* addTable("C_DOCTYPE", "AD_CLIENT_ID = '0'"); addTable("C_DOCTYPE_TRL",
* "AD_CLIENT_ID = '0' AND AD_LANGUAGE = 'es_ES'");
*/
/*
* addTable("C_REGION", "AD_CLIENT_ID = '0'");// addTable("C_UOM", "AD_CLIENT_ID = '0'");//
* addTable("C_UOM_TRL", "AD_CLIENT_ID = '0' AND AD_LANGUAGE = 'es_ES'");//
* addTable("GL_CATEGORY", "AD_CLIENT_ID = '0'");//
*/
addTable("M_ATTRIBUTESET", "AD_CLIENT_ID = '0'");
addTable("M_ATTRIBUTESETINSTANCE", "AD_CLIENT_ID = '0'");
addTable("AD_MODULE_DEPENDENCY", "AD_CLIENT_ID = '0'");
addTable("AD_MODULE_DBPREFIX", "AD_CLIENT_ID = '0'");
addTable("AD_DATASET", "AD_CLIENT_ID = '0'");
addTable("AD_DATASET_TABLE", "AD_CLIENT_ID = '0'");
addTable("AD_DATASET_COLUMN", "AD_CLIENT_ID = '0'");
addTable("AD_PACKAGE", "AD_CLIENT_ID = '0'");
addTable("AD_MODULE", "AD_CLIENT_ID = '0'");
}
}
......@@ -122,6 +122,9 @@ build.war: build a war file in the lib directory.
<exclude name="META-INF/MANIFEST.MF" />
<exclude name="**/.keep" />
</fileset>
<!-- Remove leftovers from (removed) dbmanager.jar -->
<fileset dir="${base.src.db}/build" />
<fileset file="${base.db}/lib/dbmanager.jar" />
</delete>
</target>
......
Supports Markdown
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