Hi Matt, I was busy with a demo release the last days, but now found the time to try it once again:
As you suggested I started with a "vanilla" AppFuse 2.0-M5 (Spring-MVC modular), where "mvn site" works as expected. I then checked out the core classes as described in the Wiki (http://appfuse.org/display/APF/AppFuse+Core+Classes) and left them unchanged. After that I ran the following commands on the root pom in this order: mvn clean mvn install mvn site mvn site -Dmaven.test.skip=true Both of the site tasks failed with the same error message quoted below: --- SNIP --- [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Unable to load class declared as <mapping class="org.appfuse.model.User"/> in the configuration: [INFO] ------------------------------------------------------------------------ [INFO] Trace org.hibernate.MappingException: Unable to load class declared as <mapping class="org.appfuse.model.User"/> in the configuration: at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:545) [...] Caused by: java.lang.ClassNotFoundException: org.appfuse.model.User at java.net.URLClassLoader$1.run(URLClassLoader.java:200) [...] --- SNAP --- Seems like there's something missing in the maven.test.classpath. Kind regards, Tobias -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Matt Raible Gesendet: Donnerstag, 24. Mai 2007 19:27 An: [email protected] Betreff: Re: [appfuse-user] Exclusion of appfuse-data-common in M5 Can you try creating new project instead of using your upgraded one? If you create a new one, can you run "mvn install site" from the top level OK? Matt On 5/24/07, Tobias Vogel <[EMAIL PROTECTED]> wrote: > Actually, the parameter does not help. The strange thing about this is, that > this task starts two times while during the generation of the core-site, with > the first one completing without any problem, but the second time failing. > > I just saw, there's actually a warning just before hmb2ddl starts the second > time: > > --- SNIP --- > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] Preparing hibernate3:hbm2ddl > [WARNING] Removing: hbm2ddl from forked lifecycle, to prevent recursive > invocation. > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [hibernate3:hbm2ddl {execution: default}] > --- SNAP --- > > Maybe this has something to do with it, can't really rate the dimension of > this one, being new to Maven and AppFuse-2. > > Many thanks for your assistance and your good work, very appreciated. > > Tobias > > > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Matt > Raible > Gesendet: Donnerstag, 24. Mai 2007 17:40 > An: [email protected] > Betreff: Re: [appfuse-user] Exclusion of appfuse-data-common in M5 > > I believe there's a bug in the hibernate3 plugin when you're running > mvn:site. It may be fixed in a SNAPSHOT release. In the meantime, if you run > "mvn site -Dmaven.test.skip=true", does that work? > > Matt > > On 5/24/07, Tobias Vogel <[EMAIL PROTECTED]> wrote: > > Hi Matt, > > > > thanks for your reply. Yes this works too, I should've had a look on the > > dependency tree. So it's just a small documentation update. > > > > I still have a small issue left now: I modified Address to be a mapped > > entity (e.g. to allow multiple addresses for users/persons). This works > > well for "mvn integration-test" and others, but on "mvn site" it suddenly > > won't find the mapped class anymore: > > > > --- SNIP --- > > [INFO] [hibernate3:hbm2ddl {execution: default}] [INFO] > > Configuration XML file loaded: > > c:\dev\workspace\app\core\src\main\resources\hibernate.cfg.xml > > [INFO] Configuration XML file loaded: > > c:\dev\workspace\app\core\src\main\resources\hibernate.cfg.xml > > [INFO] > > -------------------------------------------------------------------- > > -- > > -- > > [ERROR] FATAL ERROR > > [INFO] > > -------------------------------------------------------------------- > > -- > > -- [INFO] Unable to load class declared as <mapping > > class="org.appfuse.model.Address"/> in the configuration: > > [INFO] > > -------------------------------------------------------------------- > > -- > > -- > > [INFO] Trace > > org.hibernate.MappingException: Unable to load class declared as <mapping > > class="org.appfuse.model.Address"/> in the configuration: > > [...] > > --- SNAP --- > > > > I can only find one hbm2ddl goal in the core-module, so the tests should > > fail too, if my modified classes don't get loaded. I searched my way > > through the poms, to find any different settings for the site-plugin, but > > found none. Do you have any advice on how to resolve this? > > > > Tobias > > > > -----Ursprüngliche Nachricht----- > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von > > Matt Raible > > Gesendet: Donnerstag, 24. Mai 2007 16:36 > > An: [email protected] > > Betreff: Re: [appfuse-user] Exclusion of appfuse-data-common in M5 > > > > If you add an exclusion to appfuse-${dao.framework} instead of > > appfuse-service, does it fix the problem? Maybe we just need to update our > > instructions. Also, if you're using Hibernate, you don't need to > > exclude/include appfuse-${dao.framework} in your pom.xml - it's only needed > > if you want to switch to JPA or iBATIS. > > > > Matt > > > > On 5/24/07, Tobias Vogel <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > > > I just tried to migrate from M4 to M5, and had some problems with > > > modified core classes. In M4 you had to add an exclusion of > > > "appfuse-data-common" to the dependency "appfuse-service". In my > > > M5 archetype i did the same, but even after a full rebuild, the > > > appfuse-data-common package still gets included in the webapp and > > > the original core classes and hibernate.cfg get loaded. This leads > > > to a breaking application, as it depends on the modified classes > > > and configuration. > > > > > > The only difference I could see between the two pom.xml files is > > > the foolowing part: > > > <dependency> > > > <groupId>org.appfuse</groupId> > > > <artifactId>appfuse-${dao.framework}</artifactId> > > > <version>${appfuse.version}</version> > > > </dependency> > > > > > > I looked at the pom.xml of this dependency (in my case hibernate), > > > and it has appfuse-data-common as dependency, so it's clear why > > > the package still makes it into the full build. > > > > > > I removed the dependency "appfuse-${dao.framework}" from the > > > core/pom.xml, and now all tests were successful. Shall i open an > > > issue and propose this solution, or may this cause other unwanted > > > behaviour i'm not aware of? > > > > > > Kind regards, > > > Tobias > > > > > > ------------------------------------------------------------------ > > > -- > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > http://raibledesigns.com > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
