Re: Maven2 project classpath resolution
Przemysław Wojnowski <[email protected]> Wed, 15 Jun 2016 20:44:00 +0200
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------040302010007030002050308
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
It has been a while, but...
According to info:elisp#System Environment "path-separator" can be used=20
for that purpose:
-- Variable: path-separator
This variable holds a string that says which character separates
directories in a search path (as found in an environment variable).
Its value is =E2=80=98":"=E2=80=99 for Unix and GNU systems, and =E2=
=80=98";"=E2=80=99 for MS
systems.
The simplest patch is in attachment.
W dniu 14.04.2016 o 02:07, Eric Ludlam pisze:
> Hi,
>
> I don't use maven or windows, so I don't have a good way to debug or
> test. If there is a simple solution someone can verify, I'd be happy t=
o
> include the patch.
>
> Eric
>
> On 03/30/2016 04:04 AM, Przemys=C5=82aw Wojnowski wrote:
>> I'm not a maintainer of this project, but guess that the simplest and
>> fastest way would be to send a patch here.
>>
>> BTW the bug is reproducible only in Windows, because in
>> "ede-jvm-get-classpath-from-command" there is hardcoded colon (":"),
>> whereas it should be a call to a function that returns path separator =
or
>> system dependent variable.
>>
>> Hope it helps.
>>
>> W dniu 30.03.2016 o 09:52, Vladimir Loshchin pisze:
>>> All right.
>>> The bug reproducing only in Windows.
>>> But, how I can fix it?
>>>
>>> 30.03.2016 13:47, Przemys=C5=82aw Wojnowski =D0=BF=D0=B8=D1=88=D0=B5=D1=
=82:
>>>> Hi Vladimir,
>>>>
>>>> It looks like a bug, but a bit different.
>>>>
>>>> Maven outputs classpath using system dependent path separator (see
>>>> https://docs.oracle.com/javase/8/docs/api/java/io/File.html#pathSepa=
ratorChar),
>>>>
>>>> which should also be parsed in a system dependent way. On Windows it
>>>> is ";", but on Linux it is ":".
>>>>
>>>> Cheers,
>>>> Przemys=C5=82aw
>>>>
>>>> W dniu 28.03.2016 o 09:19, =D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=
=D1=80 =D0=9B=D0=BE=D1=89=D0=B8=D0=BD pisze:
>>>>> Hi, everyone. Looks like, I found a bug in CEDET Maven2 support.
>>>>>
>>>>> When CEDET try to build java classpath, it execute /mvn
>>>>> dependency:build-classpath/ (see maven2.el/ede-java-classpath). The=
n
>>>>> CEDET parse result string splitting it by ":" separator (see:
>>>>> java-base.el/ede-jvm-get-classpath-from-command). But, /mvn
>>>>> dependency:build-classpath /output has ';' delimiter.
>>>>>
>>>>> So, the /delimiter/ parameter should be in
>>>>> /ede-jvm-get-classpath-from-command /function. Or, this function
>>>>> should
>>>>> be overriden in /maven2.el/ module.
>>>>>
>>>>> How can I fix this? Email a path here? Or someone will give me
>>>>> repository account?
>>>>>
>>>>>
>>>>> -------------------------------------------------------------------=
-----------
>>>>>
>>>>>
>>>>> Transform Data into Opportunity.
>>>>> Accelerate data analysis in your applications with
>>>>> Intel Data Analytics Acceleration Library.
>>>>> Click to learn more.
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=3D278785471&iu=3D/414=
0
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Cedet-devel mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/cedet-devel
>>>>>
>>>
>>
>> ----------------------------------------------------------------------=
--------
>>
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=3D278785471&iu=3D/4140
>> _______________________________________________
>> Cedet-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/cedet-devel
>>
--------------040302010007030002050308
Content-Type: text/x-patch;
name="0001-Use-system-dependent-path-separator.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0001-Use-system-dependent-path-separator.patch"
>From bcaf3c3c7f6e65da31d1fdc646de977266b7b012 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Przemys=C5=82aw=20Wojnowski?= <[email protected]>
Date: Wed, 15 Jun 2016 20:37:06 +0200
Subject: [PATCH] Use system dependent path separator.
---
lisp/cedet/cedet-java.el | 7 +++----
lisp/cedet/ede/jvm-base.el | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lisp/cedet/cedet-java.el b/lisp/cedet/cedet-java.el
index 36a4f38..ff3fa24 100644
--- a/lisp/cedet/cedet-java.el
+++ b/lisp/cedet/cedet-java.el
@@ -67,7 +67,7 @@
(erase-buffer))
(when cedet-java-classpath-extension
(setq flags (cons "-classpath"
- (cons (mapconcat 'identity cedet-java-classpath-extension ":")
+ (cons (mapconcat 'identity cedet-java-classpath-extension path-separator)
flags))))
(apply 'call-process cedet-java-command
nil b nil flags)
@@ -149,11 +149,10 @@ Exclude empty directories."
(erase-buffer))
(when cedet-java-classpath-extension
(setq flags (cons "-classpath"
- (cons (mapconcat 'identity cedet-java-classpath-extension ":")
+ (cons (mapconcat 'identity cedet-java-classpath-extension path-separator)
flags))))
(apply 'call-process cedet-javap-command
- nil b nil
- flags)
+ nil b nil flags)
b))
(defun cedet-javap-get-class (jar class)
diff --git a/lisp/cedet/ede/jvm-base.el b/lisp/cedet/ede/jvm-base.el
index f316bad..a9a129d 100644
--- a/lisp/cedet/ede/jvm-base.el
+++ b/lisp/cedet/ede/jvm-base.el
@@ -150,7 +150,7 @@ Argument COMMAND is the command to use for compiling the target."
(let* ((output (with-temp-buffer
(insert-file-contents F)
(buffer-string)))
- (cp-list (if output (split-string output ":") nil)))
+ (cp-list (if output (split-string output path-separator) nil)))
(when (file-exists-p F)
(delete-file F)
(when (and output cp-list)
--
2.7.4
--------------040302010007030002050308
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381
--------------040302010007030002050308
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Cedet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-devel
--------------040302010007030002050308--