You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Mike Perham <Mi...@webifysolutions.com> on 2006/06/10 19:42:44 UTC

Commit MJAR-38

This is a patch against 2.0.x maven-archiver which allows the user to
override the default manifest entries placed by Maven and also cleans
all manifest entries of linebreaks so invalid manifests with linebreaks
are not created.  We will also need to push this down to the jar plugin
but do we want to release a jar plugin which requires 2.0.5?  Should
this be deferred to 2.1?  

Side note: I don't use Subversion daily - what's the command(s) to merge
a change from the 2.0.x branch to the 2.1 trunk?

I need someone else to (hopefully coderead and) commit this as I don't
have commit rights to components.

http://jira.codehaus.org/browse/MJAR-38

mike

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


Re: Commit MJAR-38

Posted by jerome lacoste <je...@gmail.com>.
On 6/14/06, Jochen Wiedmann <jo...@softwareag.com> wrote:
> jerome lacoste wrote:
>
> > I am not so sure this test is a valid test case. Continuations are
> > supposedly allowed. Read my comment in your issue in Jira.
>
> I believe, you are misreading the specification. A continuation is defined
> as otherchar* newline. But otherchar is defined as anything but NUL, CR, LF.
> In other words, even in a continuation line, LF is not allowed.

"otherchar* newline"

This means that a continuation contains a single newline element. So
LF is allowed as part of this newline element, to terminate your
continuation, right ?

Let's continue this in the issue.

J

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


Re: Commit MJAR-38

Posted by Jochen Wiedmann <jo...@softwareag.com>.
jerome lacoste wrote:

> I am not so sure this test is a valid test case. Continuations are
> supposedly allowed. Read my comment in your issue in Jira.

I believe, you are misreading the specification. A continuation is defined
as otherchar* newline. But otherchar is defined as anything but NUL, CR, LF.
In other words, even in a continuation line, LF is not allowed.


Jochen

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


Re: Commit MJAR-38

Posted by jerome lacoste <je...@gmail.com>.
On 6/14/06, Jochen Wiedmann <jo...@softwareag.com> wrote:
> Kenney Westerhof wrote:
>
> > Wasn't the line ending stuff fixed in plexus-archiver a long time ago?
>
> Running the attached test case (which might well be added to the
> plexus-archiver, whenever it should be fixed) demonstrates: No.
>
> Where is the plexus archivers issue tracker so that I can file an issue or
> attach my test?

I am not so sure this test is a valid test case. Continuations are
supposedly allowed. Read my comment in your issue in Jira.

J

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


Re: Commit MJAR-38

Posted by Carlos Sanchez <ca...@apache.org>.
On 6/10/06, Jeff Jensen <je...@upstairstechnology.com> wrote:
>
>
> > -----Original Message-----
> > From: Kenney Westerhof [mailto:kenney@apache.org]
> > Sent: Saturday, June 10, 2006 1:27 PM
> > To: Maven Developers List
> > Subject: Re: Commit MJAR-38
> >
> > On Sat, 10 Jun 2006, Mike Perham wrote:
> >
> > > Side note: I don't use Subversion daily - what's the command(s) to
> > > merge a change from the 2.0.x branch to the 2.1 trunk?
> >
> > Usually you should commit on trunk first and then merge with
> > the branch, but technically it doesn't matter.
>
> It is safest and typical to merge from the codeline that has changed the
> least.
> Which means typically merge from the release maintenance codelines to the
> trunk/main.

We follow http://docs.codehaus.org/display/MAVEN/Development+Process
Everything goes into trunk so we make sure nothing is forgotten for
next releases

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


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

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


Re: Commit MJAR-38

Posted by Jochen Wiedmann <jo...@softwareag.com>.
Emmanuel Venisse wrote:
> http://jira.codehaus.org/browse/PLX
> component plexus-archiver

Thanks, issue created.

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


Re: Commit MJAR-38

Posted by Emmanuel Venisse <em...@venisse.net>.
http://jira.codehaus.org/browse/PLX
component plexus-archiver

Jochen Wiedmann a écrit :
> Kenney Westerhof wrote:
> 
>> Wasn't the line ending stuff fixed in plexus-archiver a long time ago?
> 
> Running the attached test case (which might well be added to the
> plexus-archiver, whenever it should be fixed) demonstrates: No.
> 
> Where is the plexus archivers issue tracker so that I can file an issue or
> attach my test?
> 
> 
> Regards,
> 
> Jochen
> 
> 
> ------------------------------------------------------------------------
> 
> package org.codehaus.plexus.archiver.jar;
> 
> import java.io.BufferedReader;
> import java.io.File;
> import java.io.InputStream;
> import java.io.InputStreamReader;
> import java.util.Enumeration;
> import java.util.zip.ZipEntry;
> import java.util.zip.ZipFile;
> 
> import junit.framework.TestCase;
> 
> 
> /** Tests, whether it is possible to create invalid jar
>  * files by using invalid MANIFEST values.
>  */
> public class BlanksTest
>     extends TestCase
> {
>     public void testLineFeeds()
>         throws Exception
>     {
>         Manifest manifest = new Manifest();
>         final String entryName = BlanksTest.class.getName();
>         manifest.addConfiguredAttribute( new Manifest.Attribute( entryName, "xyz\r\nzyx" ) );
>         JarArchiver jarArchiver = new JarArchiver();
>         jarArchiver.addConfiguredManifest( manifest );
>         File tmpFile = File.createTempFile( entryName, null );
>         tmpFile.deleteOnExit();
>         jarArchiver.setDestFile( tmpFile );
>         jarArchiver.createArchive();
> 
>         ZipFile zipFile = new ZipFile( tmpFile );
>         final String match = entryName + ": ";
>         for ( Enumeration en = zipFile.entries(); en.hasMoreElements(); )
>         {
>             ZipEntry entry = (ZipEntry) en.nextElement();
>             if ( "META-INF/MANIFEST.MF".equals( entry.getName() ) )
>             {
>                 InputStream istream = zipFile.getInputStream( entry );
>                 try {
>                     InputStreamReader isr = new InputStreamReader( istream, "UTF-8" );
>                     try {
>                         BufferedReader br = new BufferedReader( isr );
>                         try {
>                             boolean found = false;
>                             for (;;) {
>                                 String line = br.readLine();
>                                 if (line == null) {
>                                     break;
>                                 }
>                                 if (line.startsWith( match )) {
>                                     found = true;
>                                     String value = line.substring( match.length() ).trim();
>                                     assertTrue("xyz zyx".equals(value)  ||  "xyz  zyx".equals(value));
>                                 }
>                             }
>                             assertTrue(found);
>                             br.close();
>                             br = null;
>                         } finally {
>                             if (br != null) { try { br.close(); } catch (Throwable t) { /* Ignore me */ } }
>                         }
>                         isr.close();
>                         isr = null;
>                     } finally {
>                         if (isr != null) { try { isr.close(); } catch (Throwable t) { /* Ignore me */ } }
>                     }
>                     istream.close();
>                     istream = null;
>                 } finally {
>                     if (istream != null) { try { istream.close(); } catch (Throwable t) { /* Ignore me */ } }
>                 }
>             }
>         }
>     }
> }
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org


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


Re: Commit MJAR-38

Posted by Jochen Wiedmann <jo...@softwareag.com>.
Kenney Westerhof wrote:

> Wasn't the line ending stuff fixed in plexus-archiver a long time ago?

Running the attached test case (which might well be added to the
plexus-archiver, whenever it should be fixed) demonstrates: No.

Where is the plexus archivers issue tracker so that I can file an issue or
attach my test?


Regards,

Jochen

RE: Commit MJAR-38

Posted by Jeff Jensen <je...@upstairstechnology.com>.
 

> -----Original Message-----
> From: Kenney Westerhof [mailto:kenney@apache.org] 
> Sent: Saturday, June 10, 2006 1:27 PM
> To: Maven Developers List
> Subject: Re: Commit MJAR-38
> 
> On Sat, 10 Jun 2006, Mike Perham wrote:
> 
> > Side note: I don't use Subversion daily - what's the command(s) to 
> > merge a change from the 2.0.x branch to the 2.1 trunk?
> 
> Usually you should commit on trunk first and then merge with 
> the branch, but technically it doesn't matter.

It is safest and typical to merge from the codeline that has changed the
least.
Which means typically merge from the release maintenance codelines to the
trunk/main.


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


Re: Commit MJAR-38

Posted by Kenney Westerhof <ke...@apache.org>.
On Sat, 10 Jun 2006, Mike Perham wrote:

> This is a patch against 2.0.x maven-archiver which allows the user to
> override the default manifest entries placed by Maven and also cleans
> all manifest entries of linebreaks so invalid manifests with linebreaks
> are not created.  We will also need to push this down to the jar plugin
> but do we want to release a jar plugin which requires 2.0.5?  Should
> this be deferred to 2.1?

Wasn't the line ending stuff fixed in plexus-archiver a long time ago?

>
> Side note: I don't use Subversion daily - what's the command(s) to merge
> a change from the 2.0.x branch to the 2.1 trunk?

Usually you should commit on trunk first and then merge with the branch,
but technically it doesn't matter.

You do:
$ cd path/to/branch;
$ svn commit;
remember revision number: X
$ cd path/to/trunk;
$ svn merge -rX-1:X https://svn.apache.org/..../branch-2.0.x .
(if X = 3000 then it's  -r2999:3000)
test, and commit, and mention you've merged revision X from trunk to
branch so we can do merge tracking.

> I need someone else to (hopefully coderead and) commit this as I don't
> have commit rights to components.

ah, so i've explained this for nothing.. ;)

-- Kenney

> http://jira.codehaus.org/browse/MJAR-38
>
> mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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

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