You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Scott Lamb <sl...@slamb.org> on 2005/06/22 23:39:43 UTC
1.1-beta-1 sourceModifications problem
maven 1.1-beta-1 doesn't parse my project.xml. It gives me errors
like these:
org.apache.maven.MavenException: Unknown error reading project
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:146)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:99)
...
--- Nested Exception ---
org.apache.maven.MavenException: Error parsing project.xml 'foo/
project.xml'
at org.apache.maven.MavenUtils.getNonJellyProject
(MavenUtils.java:189)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:120)
...
--- Nested Exception ---
org.codehaus.plexus.util.xml.pull.XmlPullParserException: TEXT must
be immediately followed by END_TAG and not START_TAG (position:
START_TAG seen ...<sourceModication>\n <className>... @268:20)
at org.codehaus.plexus.util.xml.pull.MXParser.nextText
(MXParser.java:1059)
at
org.apache.maven.project.io.xpp3.MavenXpp3Reader.parseBuild
(MavenXpp3Reader.java:153)
at
org.apache.maven.project.io.xpp3.MavenXpp3Reader.parseModel
(MavenXpp3Reader.java:846)
at org.apache.maven.project.io.xpp3.MavenXpp3Reader.read
(MavenXpp3Reader.java:1621)
at org.apache.maven.project.Project.<init>(Project.java:120)
at org.apache.maven.MavenUtils.getNonJellyProject
(MavenUtils.java:185)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:120)
...
The relevant section of the project.xml is:
<build>
<sourceModifications>
<sourceModication>
<className>thisIsAFakeClass</className>
<excludes>
<exclude>**/foo/**</exclude>
<exclude>**/bar/**</exclude>
</excludes>
</sourceModication>
</sourceModifications>
Line 268, position 20 is the start of "thisIsAFakeClass".
Now, silliness aside (I'm not sure why we're always doing a
sourceModification), why isn't this working? It appears consistent
with <http://maven.apache.org/reference/project-
descriptor.html#class_SourceModification> and worked under maven 1.0.2.
Thanks,
Scott
--
Scott Lamb <http://www.slamb.org/>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 1.1-beta-1 sourceModifications problem
Posted by Brett Porter <br...@gmail.com>.
I use http://maven.apache.org/maven-v3_0_0.xsd in IDEA, works quite nicely.
- Brett
On 6/24/05, Scott Lamb <sl...@slamb.org> wrote:
> On Jun 22, 2005, at 9:04 PM, Incze Lajos wrote:
>
> > Fix: Check your project file against the XSD published for the model
> > version you are using.
>
> Is there an XML schema validator that gives decent error messages?
> This is frustrating because I can't get one from either maven itself
> or xmllint. xmllint says:
>
> ./cms-web/project.xml:3: element project: Schemas validity
> error : Element 'project' [CT 'Model']: The element content is not
> valid.
> ./cms-web/project.xml fails to validate
>
> I'm managing to fix these problems by commenting out blocks and
> seeing when the problem goes away...but it'd be nice if I had
> something more to go on.
>
> Regards,
> Scott
>
> --
> Scott Lamb <http://www.slamb.org/>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 1.1-beta-1 sourceModifications problem
Posted by Scott Lamb <sl...@slamb.org>.
On Jun 22, 2005, at 9:04 PM, Incze Lajos wrote:
> Fix: Check your project file against the XSD published for the model
> version you are using.
Is there an XML schema validator that gives decent error messages?
This is frustrating because I can't get one from either maven itself
or xmllint. xmllint says:
./cms-web/project.xml:3: element project: Schemas validity
error : Element 'project' [CT 'Model']: The element content is not
valid.
./cms-web/project.xml fails to validate
I'm managing to fix these problems by commenting out blocks and
seeing when the problem goes away...but it'd be nice if I had
something more to go on.
Regards,
Scott
--
Scott Lamb <http://www.slamb.org/>
Re: 1.1-beta-1 sourceModifications problem
Posted by Incze Lajos <in...@axelero.hu>.
I means that you have to follow strictly the project schema. See:
http://maven.apache.org/reference/backwards-compatibility.html:
Parse errors on previously 'valid' project files
project.xml files that used to work in older versions of Maven may
now present parse errors. The parser in Maven 1.1 is much less tolerant
of invalid project.xml files to avoid silently masking syntax errors.
Some XML features are not enabled (such as DOCTYPE ENTITY declarations)
- see the FAQ for an explanation.
Fix: Check your project file against the XSD published for the model
version you are using.
On Wed, Jun 22, 2005 at 02:39:43PM -0700, Scott Lamb wrote:
> maven 1.1-beta-1 doesn't parse my project.xml. It gives me errors
> like these:
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 1.1-beta-1 sourceModifications problem
Posted by Scott Lamb <sl...@slamb.org>.
On 22 Jun 2005, at 18:31, Brett Porter wrote:
> Since it repeated several times, I assume this is not just a type
> in the email:
>
> sourceModication -> sourceModification
Thanks. I didn't notice this misspelling. Too much slashdot has
desensitized me, or something...
Regards,
Scott
--
Scott Lamb <http://www.slamb.org/>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: 1.1-beta-1 sourceModifications problem
Posted by Brett Porter <br...@gmail.com>.
Since it repeated several times, I assume this is not just a type in the email:
sourceModication -> sourceModification
Even though Maven1 didn't fail on this, it would have ignored it.
Cheers,
Brett
On 6/23/05, Scott Lamb <sl...@slamb.org> wrote:
> maven 1.1-beta-1 doesn't parse my project.xml. It gives me errors
> like these:
>
>
> org.apache.maven.MavenException: Unknown error reading project
> at org.apache.maven.MavenUtils.getProject(MavenUtils.java:146)
> at org.apache.maven.MavenUtils.getProject(MavenUtils.java:99)
> ...
> --- Nested Exception ---
> org.apache.maven.MavenException: Error parsing project.xml 'foo/
> project.xml'
> at org.apache.maven.MavenUtils.getNonJellyProject
> (MavenUtils.java:189)
> at org.apache.maven.MavenUtils.getProject(MavenUtils.java:120)
> ...
> --- Nested Exception ---
> org.codehaus.plexus.util.xml.pull.XmlPullParserException: TEXT must
> be immediately followed by END_TAG and not START_TAG (position:
> START_TAG seen ...<sourceModication>\n <className>... @268:20)
> at org.codehaus.plexus.util.xml.pull.MXParser.nextText
> (MXParser.java:1059)
> at
> org.apache.maven.project.io.xpp3.MavenXpp3Reader.parseBuild
> (MavenXpp3Reader.java:153)
> at
> org.apache.maven.project.io.xpp3.MavenXpp3Reader.parseModel
> (MavenXpp3Reader.java:846)
> at org.apache.maven.project.io.xpp3.MavenXpp3Reader.read
> (MavenXpp3Reader.java:1621)
> at org.apache.maven.project.Project.<init>(Project.java:120)
> at org.apache.maven.MavenUtils.getNonJellyProject
> (MavenUtils.java:185)
> at org.apache.maven.MavenUtils.getProject(MavenUtils.java:120)
> ...
>
>
> The relevant section of the project.xml is:
>
>
> <build>
> <sourceModifications>
> <sourceModication>
> <className>thisIsAFakeClass</className>
> <excludes>
> <exclude>**/foo/**</exclude>
> <exclude>**/bar/**</exclude>
> </excludes>
> </sourceModication>
> </sourceModifications>
>
>
> Line 268, position 20 is the start of "thisIsAFakeClass".
>
> Now, silliness aside (I'm not sure why we're always doing a
> sourceModification), why isn't this working? It appears consistent
> with <http://maven.apache.org/reference/project-
> descriptor.html#class_SourceModification> and worked under maven 1.0.2.
>
> Thanks,
> Scott
>
> --
> Scott Lamb <http://www.slamb.org/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org