cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-2212) cdbimport cleanup and configuration schema refactoring
Date Thu, 02 Feb 2017 13:17:52 GMT

     [ https://issues.apache.org/jira/browse/CAY-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nikita Timofeev updated CAY-2212:
---------------------------------
    Description: 
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 -->
            <useJava7Types>true</useJava7Types>

            <!-- 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}


  was:
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}



> 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
-->
>             <useJava7Types>true</useJava7Types>
>             <!-- 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.15#6346)

Mime
View raw message