tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Eaves (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-1638) tomee:exec on Windows produces invalid tomee.zip due to backslash directory separators
Date Mon, 19 Oct 2015 23:11:28 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14964222#comment-14964222
] 

David Eaves commented on TOMEE-1638:
------------------------------------

This now runs under Windows and Linux with the "java" script, but not with the default script.
It fails on the default script with "Can't find  apache-tomee/bin\catalina.bat" (ExecRunner.java:118)
on Windows and "Can't find  apache-tomee/bin/catalina.sh" (ExecRunner.java:118) on Linux.
NB, this error message is a bit misleading as it is scriptFile rather than cmd it cannot find.

At this point the relevant variables are as follows for Windows:
distribOutput = .distribution\apache-tomee
script = catalina.bat
cmd = apache-tomee/bin\catalina.bat
scriptFile = .distribution\apache-tomee\apache-tomee\bin\catalina.bat

and for Linux:
distribOutput = .distribution/apache-tomee
script = catalina.sh
cmd = apache-tomee/bin/catalina.sh
scriptFile = .distribution/apache-tomee/apache-tomee/bin/catalina.sh

So there are two problems - not all directory separators in cmd are being converted for Windows,
and the scriptFile path has apache-tomee appended twice for both Linux and Windows.

Hope this helps pin things down.

> tomee:exec on Windows produces invalid tomee.zip due to backslash directory separators
> --------------------------------------------------------------------------------------
>
>                 Key: TOMEE-1638
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1638
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Maven Plugin
>    Affects Versions: 1.7.2
>         Environment: Windows
>            Reporter: David Eaves
>            Priority: Minor
>         Attachments: ExecRunner.java.patch, Zips.java, Zips.java.patch, ZipsTest.java
>
>
> The tomee:exec target produces an invalid tomee.zip file within the standalone jar when
run under Windows. This prevents the standalone jar from being run under Linux.
> This issue is caused by the use of platform directory separators in the Zip entry names
rather than forward slashes. See section 4.4.17 at https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
> The offending code is in org.apache.openejb.maven.plugin.util.Zips. I have produced a
fix and tested this stand-alone, but not in the context of the plugin.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message