You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2004/09/18 08:27:33 UTC

POM parser in 1.1

I'm working on replacing the POM parser in Maven 1.1, and POMS that
previously parsed with things like this:
     <resources>
         <resource>
             <directory>../../../../src/messages</directory>
             <includes>**/*.properties</includes>
         </resource>
     </resources>
Now fail because the includes format is not legal. It should be:
       <includes>
         <include>**/*.properties</include>
       </includes>

Anyone have a strong objection to these POMs no longer parsing? As this
is probably a common error (it's in the m1 test cases :), that silently
failed before, we can address it in an FAQ.

- Brett



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: POM parser in 1.1

Posted by Trygve Laugstøl <tr...@student.matnat.uio.no>.
On Mon, Sep 20, 2004 at 06:11:09PM +0200, Eric Pugh wrote:
> Re: POM parser in 1.1+1 for me too!
> 
> I was under the impression that hopefully these types of problems would be
> automatically fixed when bumping the version?  Same for changing to the
> <artifactId/> and <groupId/> structure as well?

Not quite sure what you mean, but there is a lot of messy totally invalid
poms out there that makes it very hard to have a automated process
converting poms.

For the v3 pom the pom has to be loaded into memory as a dom4j and some
funky rules has to be used to extract the necessary info.

For the v4 pom there is already a much better validator that will ensure
that the poms stays valid and will make it so much easier to migrate to
v4+ versions.

--
Trygve

> 
> Eric
>   -----Original Message-----
>   From: Trygve Laugstøl [mailto:trygvela@student.matnat.uio.no]
>   Sent: Saturday, September 18, 2004 3:03 PM
>   To: Maven Developers List; brett@apache.org
>   Subject: Re: POM parser in 1.1
> 
> 
>   On Sat, Sep 18, 2004 at 04:27:33PM +1000, Brett Porter wrote:
>   > I'm working on replacing the POM parser in Maven 1.1, and POMS that
>   > previously parsed with things like this:
>   >     <resources>
>   >         <resource>
>   >             <directory>../../../../src/messages</directory>
>   >             <includes>**/*.properties</includes>
>   >         </resource>
>   >     </resources>
>   > Now fail because the includes format is not legal. It should be:
>   >       <includes>
>   >         <include>**/*.properties</include>
>   >       </includes>
>   >
>   > Anyone have a strong objection to these POMs no longer parsing? As this
>   > is probably a common error (it's in the m1 test cases :), that silently
>   > failed before, we can address it in an FAQ.
> 
>   +1 for the change. It should be pretty easy to make a better POM
>   validator/fixer. There is quite a few issues with the existing poms that
>   should be adressed and tried fixed with a better validator. This will also
>   help pom version migration.
> 
>   --
>   Trygve
> 
>   >
>   > - Brett
>   >
>   >
>   >
>   > ---------------------------------------------------------------------
>   > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>   > For additional commands, e-mail: dev-help@maven.apache.org
>   >

RE: POM parser in 1.1

Posted by Eric Pugh <ep...@upstate.com>.
Re: POM parser in 1.1+1 for me too!

I was under the impression that hopefully these types of problems would be
automatically fixed when bumping the version?  Same for changing to the
<artifactId/> and <groupId/> structure as well?

Eric
  -----Original Message-----
  From: Trygve Laugstøl [mailto:trygvela@student.matnat.uio.no]
  Sent: Saturday, September 18, 2004 3:03 PM
  To: Maven Developers List; brett@apache.org
  Subject: Re: POM parser in 1.1


  On Sat, Sep 18, 2004 at 04:27:33PM +1000, Brett Porter wrote:
  > I'm working on replacing the POM parser in Maven 1.1, and POMS that
  > previously parsed with things like this:
  >     <resources>
  >         <resource>
  >             <directory>../../../../src/messages</directory>
  >             <includes>**/*.properties</includes>
  >         </resource>
  >     </resources>
  > Now fail because the includes format is not legal. It should be:
  >       <includes>
  >         <include>**/*.properties</include>
  >       </includes>
  >
  > Anyone have a strong objection to these POMs no longer parsing? As this
  > is probably a common error (it's in the m1 test cases :), that silently
  > failed before, we can address it in an FAQ.

  +1 for the change. It should be pretty easy to make a better POM
  validator/fixer. There is quite a few issues with the existing poms that
  should be adressed and tried fixed with a better validator. This will also
  help pom version migration.

  --
  Trygve

  >
  > - Brett
  >
  >
  >
  > ---------------------------------------------------------------------
  > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
  > For additional commands, e-mail: dev-help@maven.apache.org
  >

Re: POM parser in 1.1

Posted by Trygve Laugstøl <tr...@student.matnat.uio.no>.
On Sat, Sep 18, 2004 at 04:27:33PM +1000, Brett Porter wrote:
> I'm working on replacing the POM parser in Maven 1.1, and POMS that
> previously parsed with things like this:
>     <resources>
>         <resource>
>             <directory>../../../../src/messages</directory>
>             <includes>**/*.properties</includes>
>         </resource>
>     </resources>
> Now fail because the includes format is not legal. It should be:
>       <includes>
>         <include>**/*.properties</include>
>       </includes>
> 
> Anyone have a strong objection to these POMs no longer parsing? As this
> is probably a common error (it's in the m1 test cases :), that silently
> failed before, we can address it in an FAQ.

+1 for the change. It should be pretty easy to make a better POM
validator/fixer. There is quite a few issues with the existing poms that
should be adressed and tried fixed with a better validator. This will also
help pom version migration.

--
Trygve

> 
> - Brett
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>