You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Nord, James" <JN...@nds.com> on 2009/07/30 15:04:57 UTC

Archetype plug-in and line end funnies.

Hi all,
 
I've created an multi-module archetype and it seems to be working mostly
well.  However any multi line comments in the poms are getting written
out as unix line ends and not Windows (which is what the platform and
the original poms files are.)
 
e.g
 
<project>CRLF
    <modelVersion>4.0.0</modelVersion>CRLF
...
 <!-- CRLF
  this is a commentCRLF
  that spans multiple linesCRLF
  -->CRLF
...
</project>
 
gets written as
<project>CRLF
    <modelVersion>4.0.0</modelVersion>CRLF
...
 <!-- LF
  this is a commentLF
  that spans multiple linesLF
  -->CRLF
...
</project>
 
If I change the input file to be unix line ends then it all gets written
as unix line ends - but I want it to be all written using the native
line end style (or CRLF if it can't do native).  
 
How do I achieve that - or is this an archetype bug (2.0-alpha4)
 
/James 

**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

Re: Archetype plug-in and line end funnies.

Posted by Stephen Connolly <st...@gmail.com>.
CR's which are internal to the elements should be removed, the spec does not
specify about CR's between elements and within ignorable whitespace...

so technically it's not a bug...

i.e. the CR's are being removed from the comment text

but effectively it is!

-Stephen

2009/7/31 Nord, James <JN...@nds.com>

> So it is buggy then?
>
> 1) it should translate all CRLFs to LF (it doesn't, it only coverts
> CRLFs in comments.)
> 2) it should really for convience replace all LFs to the platform
> default encoding on writing.
>
> It should be consistent - but it's not - it handles comments one way
> (apparantly correctly but without 2) but not the rest of the document.
>
> /James
>
> > -----Original Message-----
> > From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> > Sent: 31 July 2009 09:31
> > To: Maven Users List
> > Subject: Re: Archetype plug-in and line end funnies.
> >
> > See http://www.w3.org/TR/REC-xml/#NT-S
> >
> > All CR characters are supposed to be removed from an XML file
> > when parsed.
> >
> > -Stephen
> >
> > 2009/7/30 Nord, James <JN...@nds.com>
> >
> > > Hi all,
> > >
> > > I've created an multi-module archetype and it seems to be working
> > > mostly well.  However any multi line comments in the poms
> > are getting
> > > written out as unix line ends and not Windows (which is what the
> > > platform and the original poms files are.)
> > >
> > > e.g
> > >
> > > <project>CRLF
> > >    <modelVersion>4.0.0</modelVersion>CRLF
> > > ...
> > >  <!-- CRLF
> > >  this is a commentCRLF
> > >  that spans multiple linesCRLF
> > >  -->CRLF
> > > ...
> > > </project>
> > >
> > > gets written as
> > > <project>CRLF
> > >    <modelVersion>4.0.0</modelVersion>CRLF
> > > ...
> > >  <!-- LF
> > >  this is a commentLF
> > >  that spans multiple linesLF
> > >  -->CRLF
> > > ...
> > > </project>
> > >
> > > If I change the input file to be unix line ends then it all gets
> > > written as unix line ends - but I want it to be all written
> > using the
> > > native line end style (or CRLF if it can't do native).
> > >
> > > How do I achieve that - or is this an archetype bug (2.0-alpha4)
> > >
> > > /James
> > >
> > >
> > >
> > **********************************************************************
> > > **************** This message is confidential and intended only for
> > > the addressee. If you have received this message in error, please
> > > immediately notify the postmaster@nds.com and delete it from your
> > > system as well as any copies.
> > > The content of e-mails as well as traffic data may be
> > monitored by NDS
> > > for employment and security purposes. To protect the environment
> > > please do not print this e-mail unless necessary.
> > >
> > > NDS Limited. Registered Office: One London Road, Staines,
> > Middlesex,
> > > TW18 4EX, United Kingdom. A company registered in England
> > and Wales.
> > > Registered no. 3080780. VAT no. GB 603 8808 40-00
> > >
> > >
> > **********************************************************************
> > > ****************
> > >
> >
>
>
> **************************************************************************************
> This message is confidential and intended only for the addressee. If you
> have received this message in error, please immediately notify the
> postmaster@nds.com and delete it from your system as well as any copies.
> The content of e-mails as well as traffic data may be monitored by NDS for
> employment and security purposes. To protect the environment please do not
> print this e-mail unless necessary.
>
> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18
> 4EX, United Kingdom. A company registered in England and Wales. Registered
> no. 3080780. VAT no. GB 603 8808 40-00
>
> **************************************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Archetype plug-in and line end funnies.

Posted by "Nord, James" <JN...@nds.com>.
So it is buggy then?

1) it should translate all CRLFs to LF (it doesn't, it only coverts
CRLFs in comments.)
2) it should really for convience replace all LFs to the platform
default encoding on writing.

It should be consistent - but it's not - it handles comments one way
(apparantly correctly but without 2) but not the rest of the document.

/James

> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com] 
> Sent: 31 July 2009 09:31
> To: Maven Users List
> Subject: Re: Archetype plug-in and line end funnies.
> 
> See http://www.w3.org/TR/REC-xml/#NT-S
> 
> All CR characters are supposed to be removed from an XML file 
> when parsed.
> 
> -Stephen
> 
> 2009/7/30 Nord, James <JN...@nds.com>
> 
> > Hi all,
> >
> > I've created an multi-module archetype and it seems to be working 
> > mostly well.  However any multi line comments in the poms 
> are getting 
> > written out as unix line ends and not Windows (which is what the 
> > platform and the original poms files are.)
> >
> > e.g
> >
> > <project>CRLF
> >    <modelVersion>4.0.0</modelVersion>CRLF
> > ...
> >  <!-- CRLF
> >  this is a commentCRLF
> >  that spans multiple linesCRLF
> >  -->CRLF
> > ...
> > </project>
> >
> > gets written as
> > <project>CRLF
> >    <modelVersion>4.0.0</modelVersion>CRLF
> > ...
> >  <!-- LF
> >  this is a commentLF
> >  that spans multiple linesLF
> >  -->CRLF
> > ...
> > </project>
> >
> > If I change the input file to be unix line ends then it all gets 
> > written as unix line ends - but I want it to be all written 
> using the 
> > native line end style (or CRLF if it can't do native).
> >
> > How do I achieve that - or is this an archetype bug (2.0-alpha4)
> >
> > /James
> >
> >
> > 
> **********************************************************************
> > **************** This message is confidential and intended only for 
> > the addressee. If you have received this message in error, please 
> > immediately notify the postmaster@nds.com and delete it from your 
> > system as well as any copies.
> > The content of e-mails as well as traffic data may be 
> monitored by NDS 
> > for employment and security purposes. To protect the environment 
> > please do not print this e-mail unless necessary.
> >
> > NDS Limited. Registered Office: One London Road, Staines, 
> Middlesex, 
> > TW18 4EX, United Kingdom. A company registered in England 
> and Wales. 
> > Registered no. 3080780. VAT no. GB 603 8808 40-00
> >
> > 
> **********************************************************************
> > ****************
> >
> 

**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

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


Re: Archetype plug-in and line end funnies.

Posted by Stephen Connolly <st...@gmail.com>.
See http://www.w3.org/TR/REC-xml/#NT-S

All CR characters are supposed to be removed from an XML file when parsed.

-Stephen

2009/7/30 Nord, James <JN...@nds.com>

> Hi all,
>
> I've created an multi-module archetype and it seems to be working mostly
> well.  However any multi line comments in the poms are getting written
> out as unix line ends and not Windows (which is what the platform and
> the original poms files are.)
>
> e.g
>
> <project>CRLF
>    <modelVersion>4.0.0</modelVersion>CRLF
> ...
>  <!-- CRLF
>  this is a commentCRLF
>  that spans multiple linesCRLF
>  -->CRLF
> ...
> </project>
>
> gets written as
> <project>CRLF
>    <modelVersion>4.0.0</modelVersion>CRLF
> ...
>  <!-- LF
>  this is a commentLF
>  that spans multiple linesLF
>  -->CRLF
> ...
> </project>
>
> If I change the input file to be unix line ends then it all gets written
> as unix line ends - but I want it to be all written using the native
> line end style (or CRLF if it can't do native).
>
> How do I achieve that - or is this an archetype bug (2.0-alpha4)
>
> /James
>
>
> **************************************************************************************
> This message is confidential and intended only for the addressee. If you
> have received this message in error, please immediately notify the
> postmaster@nds.com and delete it from your system as well as any copies.
> The content of e-mails as well as traffic data may be monitored by NDS for
> employment and security purposes. To protect the environment please do not
> print this e-mail unless necessary.
>
> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18
> 4EX, United Kingdom. A company registered in England and Wales. Registered
> no. 3080780. VAT no. GB 603 8808 40-00
>
> **************************************************************************************
>