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



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 made changes - 26/Feb/07 03:30 PM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Matt Raible made changes - 26/Feb/07 03:31 PM
Fix Version/s 2.0-M4 [ 10130 ]
2521 by  Matt Raible (16 files)
27/Feb/07 01:53 AM (41 months, 12 days ago)
APF-660: Added persistence.xml to service and web-common so JPA could be tested (requires changing lazyLoadingFilter for web projects). Deleted GenericManagerTest since I couldn't make it dao.framework agnostic. Fixed issue with hibernate.cfg.xml and persistence.xml being included in WAR files for modular archetypes.
appfuse: trunk/service/src/test/java/org/appfuse/service/GenericManagerTest.java 2521 history deleted
appfuse: trunk/archetypes/appfuse-basic-struts/src/main/resources/archetype-resources/pom.xml 2521 history download (+7 -0) diffs
appfuse: trunk/service/src/test/resources/META-INF 2521 history download new
appfuse: trunk/archetypes/appfuse-basic-jsf/src/main/resources/archetype-resources/pom.xml 2521 history download (+7 -0) diffs
appfuse: trunk/archetypes/appfuse-basic-spring/src/main/resources/archetype-resources/pom.xml 2521 history download (+7 -0) diffs
appfuse: trunk/archetypes/appfuse-modular-tapestry/src/main/resources/archetype-resources/web/pom.xml 2521 history download (+7 -0) diffs
appfuse: trunk/web/common/src/main/resources/META-INF 2521 history download new
appfuse: trunk/web/common/pom.xml 2521 history download (+1 -10) diffs
appfuse: trunk/service/src/test/resources/applicationContext-manager.xml 2521 history deleted
appfuse: trunk/web/common/src/main/resources/META-INF/persistence.xml 2521 history download (+10) new
appfuse: trunk/archetypes/appfuse-modular-jsf/src/main/resources/archetype-resources/web/pom.xml 2521 history download (+7 -0) diffs
appfuse: trunk/archetypes/appfuse-modular-spring/src/main/resources/archetype-resources/web/pom.xml 2521 history download (+7 -0) diffs
appfuse: trunk/service/src/test/resources/META-INF/persistence.xml 2521 history download (+10) new
appfuse: trunk/archetypes/appfuse-basic-tapestry/src/main/resources/archetype-resources/pom.xml 2521 history download (+7 -0) diffs
appfuse: trunk/service/src/main/java/org/appfuse/service/impl/UserManagerImpl.java 2521 history download (+5 -0) diffs
appfuse: trunk/archetypes/appfuse-modular-struts/src/main/resources/archetype-resources/web/pom.xml 2521 history download (+7 -0) diffs

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>

Matt Raible made changes - 27/Feb/07 01:53 AM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]