POM root Element: project or model?
The Docs on m2 web site for the POM shows model as the root element. In the m2 cvs is a mixture of project and model elements in the pom.xml files. What is the planned name for this element, project or model? BTW Why not using a namespace declaration (and an online accessible schema representation of the pom) in the pom.xml? yo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: POM root Element: project or model?
From: Brett Porter Sent: Sunday, April 17, 2005 8:14 AM To: Maven Developers List Subject: Re: POM root Element: project or model? [snip] It's planned to provide a generated schema - however, different namespaces will not tend to be used inside the POM - we've looked at the option and preferred to keep it simple, finding no need to add them at this point. Yes this is not really a problem for m2 ;-) I was just playing around with the new m2 model. For me the POM is a repository for Metadata about a project/artifact. I want to parse the pom.xml files and transfer them to a XTM TopicMap. For XML parsing I very often use XMLBeans... and XMLBeans needs a schema and xml instances with a namespace. In the moment I have created a schema for the new m2 POM and use it with XML Beans for parsing the POM. Before I give the XML to the parser I add a science fiction namespace and good ;-) Yes I know this is just my personal kismet and I can live with it ;-) but perhaps other schema and namespace aware parsers for examples in IDE's or Tools may have the same problem. Just an idea and a report from working with m2. Not a criticism! yo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: POM root Element: project or model?
If you'd like, you can use the same code Maven does: maven-model-2.0-alpha-1.jar (you'll also need plexus-utils-1.0-alpha- 2.jar) MavenXppReader reader = new MavenXpp3Reader(); Model pom = reader.read( new FileReader( new File( pom.xml ) ) ); (with suitable error handling on the FileReader, of course) From that, you have pom.getName(), pom.getBuild(), pom.getDependencies(), etc - basically the same as XMLBeans would give you. Cool, I will do this ;-) Thanks! yo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven 2 directory structure for Multiple Modules configurable?
Hi all, Good to see all these changes in Maven 2. I use Maven since a long time and actually in a big J2EE project producing a lot of different artifacts with multi-project. We use Eclipse 3 as IDE and the maven-eclipse-plugin to create .project and .classpath files. This works fine for us and thanks to Maven we do not depend to a special IDE. Now I read in the Getting Started section of the new Maven 2 documentation in Subsection Multiple Modules the new plans for creating multiple modules. I want to ask, is the new directory structure configurable? +- pom.xml +- my-app | +- pom.xml +- my-webapp | +- pom.xml I saw this new structure in Vincent Massol's ppt presentations and examples and now in Maven 2 (but not in Cargo ;-). I'm interested because the pitfall with Eclipse is that this kind of directory structure is not supported. The classpath and build properties in Eclipse 3 are only on the project level configurable and not on directories. This means one artifact in Maven is one Project in Eclipe and must reside in the same directory like: +- my-root | +- pom.xml +- my-app | +- pom.xml +- my-webapp | +- pom.xml So my question? Is this directory structure for Eclipse in Maven 2 possible? Thanks! yo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven 2 directory structure for Multiple Modules configurable?
From: Michal Maczka [mailto:[EMAIL PROTECTED] AFAIK the only limitation which exists in eclipse is that project directories cannot overlap. Yes So you should be able to import to eclipse all projects, which contain java sources and are leaves in the directory tree. So in you case you can create eclipse projects for my-app and my- webapp Ok I do this and... eclipse_workspcae +- my-app | +- pom.xml +- my-webapp | +- pom.xml ...I have no root project for my root pom.xml because the root is the workspace and there is no possibility to check out something from inside eclipse in the workspace. Do I misunderstand? yo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven 2 directory structure for Multiple Modules configurable?
From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Saturday, April 16, 2005 4:07 PM To: 'Maven Developers List' Subject: RE: Maven 2 directory structure for Multiple Modules configurable? [snip] It's actually there... (unless I've misunderstood what you meant :-)). Aahhh I see it now ;-) Personally I still use a single Eclipse project for the master project + all subprojects. That's until I find a better solution... Yes exactly this is the problem in big projects. I have a multi-project build with more than 50 ejbs and 3 different developers. I use binary dependency builds with snapshots. This makes building only of the core or only parts of the modules very fast. Each ejb, jar, war has its own maven project and is part of the multi-project build. When I now check out the complete trunk in the new Maven 2 layout I have all ejbs (sub projects/modules) in one directory and when I start the multi-project build all ejbs are generated with e.g. xdoclet. This takes a long time and no advantage of the binary dependency build is available any longer. The solution is now to delete all ejbs I do not need to develop only for example a few modules. But this is not a fine solution to tell your developers please check out the trunk and after this you're allowed to delete this and this and. It's nicer to say check out this core projects and then the module you want to work with. After a checkout from a project I use in Maven 1 the maven-eclipse-plugin to generate .classpath and .project. Is this working with the new directory structure too? I hope my bad English can explain my prob clear enough?! yo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]