You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2017/01/27 13:03:25 UTC

[jira] [Created] (CAY-2212) cdbimport cleanup and configuration schema refactoring

Nikita Timofeev created CAY-2212:
------------------------------------

             Summary: cdbimport cleanup and configuration schema refactoring
                 Key: CAY-2212
                 URL: https://issues.apache.org/jira/browse/CAY-2212
             Project: Cayenne
          Issue Type: Bug
          Components: Non-GUI Tools
            Reporter: Nikita Timofeev
            Assignee: Nikita Timofeev
             Fix For: 4.0.M5


cdbimport Maven plugin (and Ant task) has many small problems with naming, configuration schema and code organization. That leads to confusion when configuring or maintaining it.
So several tasks should be done to improve usability of this tools.

Main braking change is the new XML schema for configuration:
{code:xml}
<plugin>
    <artifactId>maven-cayenne-plugin</artifactId>
    <configuration>
        <map>test.map.xml</map>
        <adapter>org.apache.cayenne.dba.derby.DerbyAdapter</adapter>
        <!-- Group all data-source related fields, they can later be unified with data-source configured in project's DataNode -->
        <dataSource>
            <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
            <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
            <username>cayenne</username>
            <password>cayenne</password>
        </dataSource>
        
        <!-- Rename reverseEngineering to dbimport -->
        <dbimport>
            <!-- Flag to control Date and Time types, new default will be java8 types -->
            <useJava7DateTypes>true</useJava7DateTypes>

            <!-- move all other top level settings here -->
            <skipRelationshipsLoading>false</skipRelationshipsLoading>
            <forceDataMapCatalog>true</forceDataMapCatalog>
            <usePrimitives>false</usePrimitives>
             
            <meaningfulPkTables>table1,table2,table3</meaningfulPkTables>

            <catalog>
                <name>TEST_CATALOG</name>
               <!-- remove confusing plural forms of tags (like includeTables) -->
                <includeTable>
                    <pattern>table1</pattern>
                    <excludeColumn>.*XYZ</excludeColumn>
                </includeTable>
                <includeTable>table2</includeTable>
                <includeTable>table3</includeTable>
            </catalog>

            <schema>
                <name>TEST_SCHEMA</name>
            </schema>
        </dbimport>
    </configuration>
</plugin>
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)