RE: POM Parser
I'm using the exact same code, i'm getting no error but the dependencies list doesn't load. Why not ? Thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: domingo, 16 de Maio de 2004 18:00 To: Maven Users List Cc: Maven Users List Subject: Re: POM Parser Thanks for the hint, I played around a bit with that class, using a know working project.xml. I wrote a small test public class PomParserTest extends TestCase { public void setUp() throws Exception { } public void testPomParserDoesStuff() throws Exception { String s = ./test_src/project.xml; File f=new File(s); if (f.exists()){ Project p=MavenUtils.getProject(f); System.out.println(OK); } else{ System.out.println(no file present); } } } but unfortunately I always get the same error : 5779|ERROR|[main ]| |org.apache.commons.digester.Digester - Body event threw exception java.lang.IllegalStateException: either id or (groupId and artifactId) must be provided for a dependency at org.apache.maven.project.Dependency.getId(Dependency.java:116) at org.apache.maven.project.Dependency.toString(Dependency.java:313) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at org.apache.commons.betwixt.expression.MethodUpdater.update(MethodUpdater.java:135) at org.apache.commons.betwixt.io.BeanCreateRule$1.body(BeanCreateRule.java:584) at org.apache.commons.digester.Rule.body(Rule.java:240) at org.apache.commons.digester.Digester.endElement(Digester.java:1034) the corresponding POM Dependency is dependency groupIdsje/groupId artifactIdsje-config/artifactId version1.0.0/version properties ejb.manifest.classpathtrue/ejb.manifest.classpath war.bundlefalse/war.bundle war.manifest.classpathtrue/war.manifest.classpath ear.bundlefalse/ear.bundle /properties /dependency I tried to change project.xml but always fails at the first dependency. I also tried to change maven.jar to an older version but I always got the same problem. Is there something I am doing wrong ? do I need to set something before ? is that not the correct way to use the API ? Any help is welcome Regards Michele |-+ | | Trygve Laugstøl | | | [EMAIL PROTECTED]| | | nat.uio.no | | || | || | | 14/05/2004 13:49 | | | Please respond to| | | Maven Users List | | || |-+ --| | | | | | | | | | | |To: Maven Users List [EMAIL PROTECTED] | |cc: (bcc: Michele Forte/SwissRe) | |bcc:Michele Forte/SwissRe | |Subject:Re: POM Parser | --| This is the one that maven itself uses: http://maven.apache.org/xref/org/apache/maven/MavenUtils.html#106 On Fri, 14 May 2004 13:37:01 +0200, [EMAIL PROTECTED] wrote: Thanks for the quick answer, Michal. In reality I just wanted to use the same parser as it is used now by the rc2, I have the impression that this done using a sax approach, but I am not sure which one is the class you are using in the current maven module. in particular in the bootstrap directory there is something like BootstrapPOMParser, but looking into the code I am not sure that it supports POM inheritance
RE: POM Parser
The code you are refering to is a part of maven2 code base. It hasn't yet even reached alpha stage and it is not ready for public consumption (everyday there are some changes in the api). What you are trying to do (perstist POMs in the database) is also in our plans. So we cannot offer any direct help at the moment... regrads Michal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 1:15 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: POM Parser For my project in order to make it persistent the information gathered by the POM of an application we want to store that in a database. Being the POM Parser a fundamental part of that concept, instead of writing my own one, I noticed that there is already a POM parser and the corresponding Model to populate in maven-components and in particular in the maven-project module. I noticed that those classes are not distributed with the maven.jar that normally comes with the public distribution. In the maven repository at ibiblio I could only find maven-model-2.0-ARTIFACT.jar Is there anyone who could shed some light on that arguments and in case point me to a location where I could get the maven-project-version.jar ? Any help is welcome Michele This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information. Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender - 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]
RE: POM Parser
Thanks for the quick answer, Michal. In reality I just wanted to use the same parser as it is used now by the rc2, I have the impression that this done using a sax approach, but I am not sure which one is the class you are using in the current maven module. in particular in the bootstrap directory there is something like BootstrapPOMParser, but looking into the code I am not sure that it supports POM inheritance, that is in reality my doubt, and consequent question. Regards Michele |-+ | | Maczka Michal| | | [EMAIL PROTECTED]| | | tf.ch | | || | || | | 14/05/2004 13:22 | | | Please respond to| | | Maven Users | | | List| | || |-+ --| | | | | | | | | | | |To: 'Maven Users List' [EMAIL PROTECTED] | |cc: (bcc: Michele Forte/SwissRe) | |bcc:Michele Forte/SwissRe | |Subject:RE: POM Parser | --| The code you are refering to is a part of maven2 code base. It hasn't yet even reached alpha stage and it is not ready for public consumption (everyday there are some changes in the api). What you are trying to do (perstist POMs in the database) is also in our plans. So we cannot offer any direct help at the moment... regrads Michal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 1:15 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: POM Parser For my project in order to make it persistent the information gathered by the POM of an application we want to store that in a database. Being the POM Parser a fundamental part of that concept, instead of writing my own one, I noticed that there is already a POM parser and the corresponding Model to populate in maven-components and in particular in the maven-project module. I noticed that those classes are not distributed with the maven.jar that normally comes with the public distribution. In the maven repository at ibiblio I could only find maven-model-2.0-ARTIFACT.jar Is there anyone who could shed some light on that arguments and in case point me to a location where I could get the maven-project-version.jar ? Any help is welcome Michele This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information. Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender - 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] This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information. Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: POM Parser
This is the one that maven itself uses: http://maven.apache.org/xref/org/apache/maven/MavenUtils.html#106 On Fri, 14 May 2004 13:37:01 +0200, [EMAIL PROTECTED] wrote: Thanks for the quick answer, Michal. In reality I just wanted to use the same parser as it is used now by the rc2, I have the impression that this done using a sax approach, but I am not sure which one is the class you are using in the current maven module. in particular in the bootstrap directory there is something like BootstrapPOMParser, but looking into the code I am not sure that it supports POM inheritance, that is in reality my doubt, and consequent question. Regards Michele |-+ | | Maczka Michal| | | [EMAIL PROTECTED]| | | tf.ch | | || | || | | 14/05/2004 13:22 | | | Please respond to| | | Maven Users | | | List| | || |-+ --| | | | | | | | | | | |To: 'Maven Users List' [EMAIL PROTECTED] | |cc: (bcc: Michele Forte/SwissRe) | |bcc:Michele Forte/SwissRe | |Subject:RE: POM Parser| --| The code you are refering to is a part of maven2 code base. It hasn't yet even reached alpha stage and it is not ready for public consumption (everyday there are some changes in the api). What you are trying to do (perstist POMs in the database) is also in our plans. So we cannot offer any direct help at the moment... regrads Michal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 1:15 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: POM Parser For my project in order to make it persistent the information gathered by the POM of an application we want to store that in a database. Being the POM Parser a fundamental part of that concept, instead of writing my own one, I noticed that there is already a POM parser and the corresponding Model to populate in maven-components and in particular in the maven-project module. I noticed that those classes are not distributed with the maven.jar that normally comes with the public distribution. In the maven repository at ibiblio I could only find maven-model-2.0-ARTIFACT.jar Is there anyone who could shed some light on that arguments and in case point me to a location where I could get the maven-project-version.jar ? Any help is welcome Michele This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information. Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender - 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] This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information. Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e
RE: POM Parser
On Fri, 2004-05-14 at 07:22, Maczka Michal wrote: The code you are refering to is a part of maven2 code base. It hasn't yet even reached alpha stage and it is not ready for public consumption (everyday there are some changes in the api). What you are trying to do (perstist POMs in the database) is also in our plans. So we cannot offer any direct help at the moment... But we will be able to shortly and using the components from maven2 is definitely the way to go. If you are in the planning stages of your project then there will be something for you to use. Note that we generate the the xpp3 reader/writer from the modello model you see in the maven-model module: http://cvs.modello.codehaus.org/modello/ This model will also serve to generate SQL required for tables and other persistence artifacts. So from this model I'm sure you could OJB metadata (or hibernate, I don't use hibernate) or whatever you need for other persistence layers. So you can take a look at modello and ask questions on the modello list as what it provides for persistence of a model is what you will want to use. That's about all the info you need and about as much as I will say until the alpha is released. The first thing I plan to do post 1.0 is to use the maven2 model mechanism in maven1. Modello supports multiple versions of a model so the model for the v3 will be supported. I have started some dabbling with database stuff for modello if you're in a dire rush to complete a phase for you project. It's taken from work I did in Torque and commons-sql to generate SQL and persistence mechanisms from a model in those projects. If you're interested mail me in private. regrads Michal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 1:15 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: POM Parser For my project in order to make it persistent the information gathered by the POM of an application we want to store that in a database. Being the POM Parser a fundamental part of that concept, instead of writing my own one, I noticed that there is already a POM parser and the corresponding Model to populate in maven-components and in particular in the maven-project module. I noticed that those classes are not distributed with the maven.jar that normally comes with the public distribution. In the maven repository at ibiblio I could only find maven-model-2.0-ARTIFACT.jar Is there anyone who could shed some light on that arguments and in case point me to a location where I could get the maven-project-version.jar ? Any help is welcome Michele This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information. Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender - 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] -- jvz. Jason van Zyl [EMAIL PROTECTED] http://maven.apache.org happiness is like a butterfly: the more you chase it, the more it will elude you, but if you turn your attention to other things, it will come and sit softly on your shoulder ... -- Thoreau - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]