Issue Details (XML | Word | Printable)

Key: APF-586
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: David L. Whitehurst
Reporter: David L. Whitehurst
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
AppFuse

Database cannot be changed in archetype created project

Created: 20/Jan/07 09:35 PM   Updated: 20/Jan/07 10:03 PM   Resolved: 20/Jan/07 10:03 PM
Component/s: Persistence Layer
Affects Version/s: 2.0-M2
Fix Version/s: 2.0-M3

Environment: All


 Description  « Hide
Changing jdbc.url in root pom of archetype created project does not allow GenericDao to use specified database

Sort Order: Ascending order - Click to sort in descending order
Matt Raible added a comment - 20/Jan/07 09:43 PM
AFAICT, the problem appears to be that the resources plugin doesn't recognize overriding variables from the root pom.xml.

For example, if I run "mvn clean" followed by "mvn -Djdbc.url=jdbc:mysql://localhost/testit", the target/test-classes/jdbc.properties still has "appfuse" in it's
jdbc.url property.

I don't know if filters would help.

http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

This seems like a bug in Maven to me.

David L. Whitehurst added a comment - 20/Jan/07 10:03 PM
Add <filtering>true</filtering> to the /src/main/webapp resources in the root pom of the archetype-created project.

        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>src/main/webapp</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </testResource>
        </testResources>