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

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 made changes - 20/Jan/07 10:01 PM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
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>


David L. Whitehurst made changes - 20/Jan/07 10:03 PM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
2327 by  David L. Whitehurst (1 file)
20/Jan/07 11:27 PM (42 months, 18 days ago)
2329 by  David L. Whitehurst (1 file)
20/Jan/07 11:30 PM (42 months, 18 days ago)
2331 by  David L. Whitehurst (1 file)
20/Jan/07 11:32 PM (42 months, 18 days ago)
2332 by  David L. Whitehurst (1 file)
20/Jan/07 11:34 PM (42 months, 18 days ago)