Hello Michal,

Entity is an XML feature and the SAX Parser you are using to do the job
works fine with entities. I debugged  remotely  the process generated by
maven.bat and it seems to works fine with the same POM.

But in my test I do not initialize any MavenSession and in general
JellyContext so I was wondering if that could be the problem !!

package com.swissre.dcscm.util.impl;

import java.io.File;
/* maven 2
import org.apache.maven.model.Model;
import org.apache.maven.project.DefaultMavenProjectBuilder;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
*/
import junit.framework.TestCase;
/* maven 1*/
import org.apache.maven.DependencyDescriberBean;
import org.apache.maven.MavenSession;
import org.apache.maven.MavenUtils;
import org.apache.maven.cli.App;
import org.apache.maven.jelly.MavenJellyContext;
import org.apache.maven.project.Project;
/**
 * @author srzfhe
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class PomParserTest extends TestCase {

  public void setUp() throws Exception {
  }

  public void testPomParserDoesStuff() throws Exception {
    String s = "./admin/project.xml";
    File f=new File(s);
    if (f.exists()||f.canRead()){

            //Project p=MavenUtils.getProject(f,null,true); // Using Maven
1 parser
            Project p=MavenUtils.getProject(f); // Using Maven 1 parser
            System.out.println("OK");
    }
      else{
            System.out.println("no file present");
      }
     }
}

Sorry to bother you but I found that behaviour quite "komisch".

Regards

Michele


|---------+---------------------------->
|         |           Maczka Michal    |
|         |           <[EMAIL PROTECTED]|
|         |           tf.ch>           |
|         |                            |
|         |                            |
|         |           18/05/2004 10:56 |
|         |           Please respond to|
|         |           "Maven Users     |
|         |           List"            |
|         |                            |
|---------+---------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                          |
  |                                                                                    
                                          |
  |                                                                                    
                                          |
  |                                                                                    
                                          |
  |                                                                                    
                                          |
  |        To:                                         "'Maven Users List'" <[EMAIL 
PROTECTED]>                             |
  |        cc:                                         (bcc: Michele Forte/SwissRe)    
                                          |
  |        bcc:                                        Michele Forte/SwissRe           
                                          |
  |        Subject:                                    RE: Again POM Parser in Maven 1 
                                          |
  
>------------------------------------------------------------------------------------------------------------------------------|




Michele have to tried if it works without external entities?

This is not something which is recommended and it was never tested.

Michal


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 18, 2004 9:40 AM
> To: [EMAIL PROTECTED]
> Cc: Maven Users List
> Subject: Again POM Parser in Maven 1
>
>
> Hello dIon,
>
> here is the POMs I am using :
>
> (See attached file: s13.ent)the entity is used among
> different category of
> projects
>
> (See attached file: project.xml)the initial POM is relative
> to a particular
> module
>
> (See attached file: project.xml)the father is used to group together
> property of a single project
>
> I then use that POM to generate an ear but this part is not
> imporatant at
> the moment I want to find a way using the API  how to parse
> the POM and
> create a Project rappresentation in memory.
>
> Best Regards and thanks for your time  and above all for the
> great job you
> all did.
>
> Michele
>



---------------------------------------------------------------------
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]

Reply via email to