Issue Details (XML | Word | Printable)

Key: APF-660
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: Rob van Oostrum
Votes: 0
Watchers: 1
Operations

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

hibernate.cfg.xml incorrectly included by war overlay for modular archetypes

Created: 25/Feb/07 09:02 PM   Updated: 27/Feb/07 01:53 AM   Resolved: 27/Feb/07 01:53 AM
Component/s: Build, Test, or Deploy Process
Affects Version/s: 2.0-M4
Fix Version/s: 2.0-M4

Environment: Mac OS X 10.4.8, JSE 6, Maven 2.0.5


 Description  « Hide
- using Appfuse 2.0-m4-SNAPSHOT
- create spring-modular project
- run mvn package on web project
- the hibernate.cfg.xml file from appfuse-web-common is included in the war file at WEB-INF/classes

- follow the tutorial, create a hibernate.cfg.xml in core/src/main/resources
- run mvn package on the web module
- the hibernate.cfg.xml file from appfuse-web-common is included in the war file at WEB-INF/classes which masks the one in the core jar file in WEB-INF/lib

If I'm not mistaken, fixing this behavior in the warpath plugin will break the project when it's first created because the war file won't have a hibernate.cfg.xml file out of the box anymore. The archetype should probably create the project correctly with the starter hibernate.cfg.xml file in core/src/main/resources



Sort Order: Ascending order - Click to sort in descending order
Rob van Oostrum added a comment - 25/Feb/07 09:19 PM
Scratch that last paragraph. There's a hibernate.cfg.xml in core/src/main/resources when you create the project with the latest archetype.

Matt Raible added a comment - 27/Feb/07 01:53 AM
Added the following to all archetypes:

            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <dependentWarExcludes>**/hibernate.cfg.xml,WEB-INF/classes/META-INF/**</dependentWarExcludes>
                </configuration>
            </plugin>