Re: understanding how configs are "mavenized"
Adam Rossi <[email protected]>
| Newsgroups | gmane.comp.java.keel.devel |
|---|---|
| Message-ID | <[email protected]> |
Mike, That did it, thanks for the advice! I was indeed combining the "app-timewarp" and "timewarp project" concepts. I have now split up the project, resulting in an app-timewarp project with my java files, jsp's, and a project.xml with minimal dependencies. I have marked this as a SNAPSHOT version in the project.xml, and I build it by executing "maven jar:install". This also fixed my jsp problem that I had reported earlier. In previous posts, I had to specify a "src/webapp" directory for my webapps (maven default) instead of "src/jsp/struts" like the example projects. Now that this is an "app-" project, I moved the jsp's back to the src/jsp/struts subdirectory, and they are properly packaged into the resulting jar (and ultimately into the war). I also have a "timewarp" project, which has a build.properties file, a keel.properties file, and a project.xml. In this project.xml, I have specified dependencies to app-timwarp (snapshot version) as well as a bunch of other goodies, like app-crud, auth, etc. In this directory, I issue the "maven war" command, and I see that my app-timewarp-SNAPSHOT.jar is picked up from the local repository. The war file works as expected. My final question is a practical working question. What is normal development process now? I suspect that I will issue a "maven eclipse" command in the app-timewarp project, and will make changes to my java files and jsp files from within eclipse on my app-timewarp project. However, my "maven war" builds take a few minutes to complete. What is the most efficient way to develop and test? It seems like a long process to issue the maven jar:install command, switch directories, issue the maven war command, and deploy the war to test the next chunk of code. Any practical guidelines for decreasing the development/test cycle? Regards, Adam On Sun, 2005-03-13 at 13:50, Michael Nash wrote: > Adam: > > I've made a start at documenting the two different "types" of Keel > project when using Maven here: > > http://keelframework.org/release/HEAD/docbook/keel-doc/html_chunk/manual/ch13.html#d0e5918 > > I'm not 100% sure, but I think it may be that you've got one project > trying to be "both", from what you describe. > > E.g. if you're writing a webapp, there's going to be an "app-xxx" > module, where you have your models, your UI files, etc. This app-xxx is > turned into app-xxx-version.jar and made available in your local (only) > repository with a "maven jar:install". > > Then you've got a second project, which is where you actually put > app-xxx together with the Keel services it needs. There's no code in > this project, no JSP,s nothing - just a project.xml and a couple of > config files (at least a keel.properties, probably a build.properties). > > This is where you'd do a "maven war" to assemble the finished app and > create a war file. > > On Sun, 2005-03-13 at 12:18, Adam Rossi wrote: > > I have been trying to get an existing project to play in the new > > mavenized environment, but I am running into some problems, I think due > > to my lack of understanding of how all the pieces now fit together. > > > > I am having trouble getting the following configurations to get picked > > up in the war file: > > > > conf/client/struts/struts-config.xml - this file has my struts forwards, > > which should get folded in to the consolidated struts-config.xml. For > > me, only associated projects like app-crud have the forwards in the > > final war file, but my project entries in this file are not getting > > picked up. > > Where do you have your entries? They should be in conf/client... within > an "app-something" module. The conf/client dir in the module where you > run a "maven war" will not be used. > > > > conf/server/logkit.xconf, system.xconf - these files are not getting > > carried over into the war file. The merged.config in the war file does > > not have any of my "stuff" from these files, but the dependency apps > > like app-crud are working properly. > > > > xdoclet persistent stuff: I had a bunch of xdoclet stuff in my java > > persistent classes, which ant used to pull out and automatically > > generate persist-name.xconf files, which would then get folded into the > > merged file. Now with my "maven war" process, these files are not > > getting created, and when I look at the persistent menu in app-crud, I > > do not see my app's schema. > > A "maven war" will not do this - application code should always be in a > module that's generated with a "maven jar", which is where the plugin > will run the appropriate xdoclet/Fortress processes to extract the > configuration. The config then gets included in the app-xxx-version.jar > file, where it is later extracted by the "war" (actually the "uberjar") > process and bundled into the uberjar for the finished application (this > is true for both webapps and standalone apps) > > > Any guidance on how to get these configuration items to flow through to > > the war would be greatly appreciated. I have read the documentation, but > > I have not found the relevant section which describes the structure of > > configuration. The odd thing is, I have (I think) faithfully copied the > > structure and layout of other apps in CVS, such as app-crud, and > > app-poll, but what is apparently working there is not working for me. > > I hope the above helps, I may be on the wrong page as far as what the > problem is! > > Mike > > > > > Regards, > > > > Adam > > > > > > http://keelframework.org/documentation.shtml > > Keelgroup mailing list > > [email protected] > > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com > > http://keelframework.org/documentation.shtml > Keelgroup mailing list > [email protected] > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com http://keelframework.org/documentation.shtml Keelgroup mailing list [email protected] http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com