Error parsing project.xml

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error parsing project.xml

Philipp Gasser
Hello everybody,

today I tried to make a java-update (1.4.1 -> 1.4.2). With this update i got
some errors within my maven-projects:

org.apache.maven.MavenException: Error parsing project.xml
'C:\CVSData\ddp\common-project.xml'
        at
org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:208)
        at
org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:232)
        at org.apache.maven.MavenUtils.getProject(MavenUtils.java:144)
        at org.apache.maven.MavenUtils.getProject(MavenUtils.java:123)
        at
org.apache.maven.MavenSession.initializeRootProject(MavenSession.java:235)
        at org.apache.maven.MavenSession.initialize(MavenSession.java:175)
        at org.apache.maven.cli.App.doMain(App.java:473)
        at org.apache.maven.cli.App.main(App.java:1215)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)



I have got a bigger multiproject.

Maven: Version 1.0
Java Version WORKING: 1.4.1_07
Java Version Produces this ERROR: 1.4.2_08

SubProject - project.xml:
--------------------------
<?xml version="1.0"?>
<!DOCTYPE project [
  <!ENTITY % index SYSTEM "file:index.ent"> %index;
]>


<project>
  <extend>${basedir}/../../../common-project.xml</extend>

  <name>converter API</name>

  <groupId>&ddp-id;</groupId>
  <id>&convertor-api-id;</id>
  <currentVersion>&convertor-api-version;</currentVersion>
 
  <description>
........


Multiproject - commons-project.xml
------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
  <!ENTITY % index SYSTEM "versions.ent"> %index;
]>

<project>

  <pomVersion>3</pomVersion>
........


I have no idea how to find the bad situation, within these
project.xml-files.

Any idea???

Thanks
Phil

--
+++ Neu: Echte DSL-Flatrates von GMX - Surfen ohne Limits +++
Always online ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

--
+++ Neu: Echte DSL-Flatrates von GMX - Surfen ohne Limits +++
Always online ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error parsing project.xml

Kenney Westerhof
On Fri, 6 May 2005, Philipp Gasser wrote:

It might have something to do with the ENTITY definition. POMs should be
contained in 1 file, using several files (like entity files) is
discouraged, I believe.

Either don't use &entities; (fill in the real values) or try to define
the entities in the project file itself, see if that helps.

Greetings,

        Kenney Westerhof

> Hello everybody,
>
> today I tried to make a java-update (1.4.1 -> 1.4.2). With this update i got
> some errors within my maven-projects:
>
> org.apache.maven.MavenException: Error parsing project.xml
> 'C:\CVSData\ddp\common-project.xml'
>         at
> org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:208)
>         at
> org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:232)
>         at org.apache.maven.MavenUtils.getProject(MavenUtils.java:144)
>         at org.apache.maven.MavenUtils.getProject(MavenUtils.java:123)
>         at
> org.apache.maven.MavenSession.initializeRootProject(MavenSession.java:235)
>         at org.apache.maven.MavenSession.initialize(MavenSession.java:175)
>         at org.apache.maven.cli.App.doMain(App.java:473)
>         at org.apache.maven.cli.App.main(App.java:1215)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at com.werken.forehead.Forehead.run(Forehead.java:551)
>         at com.werken.forehead.Forehead.main(Forehead.java:581)
>
>
>
> I have got a bigger multiproject.
>
> Maven: Version 1.0
> Java Version WORKING: 1.4.1_07
> Java Version Produces this ERROR: 1.4.2_08
>
> SubProject - project.xml:
> --------------------------
> <?xml version="1.0"?>
> <!DOCTYPE project [
>   <!ENTITY % index SYSTEM "file:index.ent"> %index;
> ]>
>
>
> <project>
>   <extend>${basedir}/../../../common-project.xml</extend>
>
>   <name>converter API</name>
>
>   <groupId>&ddp-id;</groupId>
>   <id>&convertor-api-id;</id>
>   <currentVersion>&convertor-api-version;</currentVersion>
>
>   <description>
> ........
>
>
> Multiproject - commons-project.xml
> ------------------------------------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE project [
>   <!ENTITY % index SYSTEM "versions.ent"> %index;
> ]>
>
> <project>
>
>   <pomVersion>3</pomVersion>
> ........
>
>
> I have no idea how to find the bad situation, within these
> project.xml-files.
>
> Any idea???
>
> Thanks
> Phil
>
> --
> +++ Neu: Echte DSL-Flatrates von GMX - Surfen ohne Limits +++
> Always online ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
>
> --
> +++ Neu: Echte DSL-Flatrates von GMX - Surfen ohne Limits +++
> Always online ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Error parsing project.xml

Jörg Schaible-2
In reply to this post by Philipp Gasser
Hi Philipp,

from where did you start Maven? Did you build the complete multi-project or only a single subproject?


Philipp Gasser wrote on Friday, May 06, 2005 2:13 PM:

[snip]

> SubProject - project.xml:
> --------------------------
> <?xml version="1.0"?>
> <!DOCTYPE project [
>   <!ENTITY % index SYSTEM "file:index.ent"> %index; ]>


What's the content of your index.ent?


> <project>
>   <extend>${basedir}/../../../common-project.xml</extend>
>
>   <name>converter API</name>
>
>   <groupId>&ddp-id;</groupId>
>   <id>&convertor-api-id;</id>
>   <currentVersion>&convertor-api-version;</currentVersion>
>
>   <description>
> ........
>
>
> Multiproject - commons-project.xml
> ------------------------------------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE project [
>   <!ENTITY % index SYSTEM "versions.ent"> %index;
> ]>


Why didn't you use fhe file: protocol here for the system entitiy ?


> <project>
>
>   <pomVersion>3</pomVersion>
> ........
>
>
> I have no idea how to find the bad situation, within these
> project.xml-files.

[snip]

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Error parsing project.xml

Philipp Gasser
> Hi Philipp,
>
> >from where did you start Maven? Did you build the complete multi-project
> or only a single subproject?
I've started it from a single subproject.

>
>
> Philipp Gasser wrote on Friday, May 06, 2005 2:13 PM:
>
> [snip]
>
> > SubProject - project.xml:
> > --------------------------
> > <?xml version="1.0"?>
> > <!DOCTYPE project [
> >   <!ENTITY % index SYSTEM "file:index.ent"> %index; ]>
>
>
> What's the content of your index.ent?
<!ENTITY % versions SYSTEM "versions.ent">
%versions;

the main version - file.

>
>
> > <project>
> >   <extend>${basedir}/../../../common-project.xml</extend>
> >
> >   <name>converter API</name>
> >
> >   <groupId>&ddp-id;</groupId>
> >   <id>&convertor-api-id;</id>
> >   <currentVersion>&convertor-api-version;</currentVersion>
> >
> >   <description>
> > ........
> >
> >
> > Multiproject - commons-project.xml
> > ------------------------------------
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <!DOCTYPE project [
> >   <!ENTITY % index SYSTEM "versions.ent"> %index;
> > ]>
>
>
> Why didn't you use fhe file: protocol here for the system entitiy ?
>
>
> > <project>
> >
> >   <pomVersion>3</pomVersion>
> > ........
> >
> >
> > I have no idea how to find the bad situation, within these
> > project.xml-files.
>
> [snip]
>
> - J?rg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Error parsing project.xml

Jörg Schaible-2
In reply to this post by Philipp Gasser
Hi Philipp,

you have to create proper references for your system entities. Relative paths are not resolved from the location of the including XML, but from your current working directory, while those paths within an entity file are resolved accoring its location. This is not how it should be with XML, but how it works in Maven ;-)

Philipp Gasser wrote on Friday, May 06, 2005 3:01 PM:

>> Hi Philipp,
>>
>>> from where did you start Maven? Did you build the complete
>>> multi-project
>> or only a single subproject?
> I've started it from a single subproject.
>>
>>
>> Philipp Gasser wrote on Friday, May 06, 2005 2:13 PM:
>>
>> [snip]
>>
>>> SubProject - project.xml:
>>> --------------------------
>>> <?xml version="1.0"?>
>>> <!DOCTYPE project [
>>>   <!ENTITY % index SYSTEM "file:index.ent"> %index; ]>
>>
>>
>> What's the content of your index.ent?
> <!ENTITY % versions SYSTEM "versions.ent">
> %versions;
>
> the main version - file.

This should be

<!ENTITY % versions SYSTEM "file:../../../versions.ent">  %versions;

assuming you have located your version.ent at the same position as your commons-project.xml and this index.ent is located next to your POM of the subproject.

[snip]

>>>
>>> Multiproject - commons-project.xml
>>> ------------------------------------
>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>> <!DOCTYPE project [
>>>   <!ENTITY % index SYSTEM "versions.ent"> %index;
>>> ]>


This has to be also:

<!DOCTYPE project [
  <!ENTITY % index SYSTEM "file:index.ent"> %index;
]>


and you'll need a "index.ent" next to your commons-project.xml containing:

<!ENTITY % versions SYSTEM "file:versions.ent">  %versions;

[snip]

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]