Bug 916924 - gshell 2.6.5 don't build with jline2 2.10
Summary: gshell 2.6.5 don't build with jline2 2.10
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: jline2
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marek Goldmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 914056
TreeView+ depends on / blocked
 
Reported: 2013-03-01 09:28 UTC by gil cattaneo
Modified: 2013-07-23 12:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-23 12:57:44 UTC
Type: Bug


Attachments (Terms of Use)
gshell spec file (11.08 KB, text/x-rpm-spec)
2013-03-01 09:59 UTC, gil cattaneo
no flags Details
gshell spec file (11.09 KB, text/x-rpm-spec)
2013-03-01 10:34 UTC, gil cattaneo
no flags Details

Description gil cattaneo 2013-03-01 09:28:14 UTC
Description of problem:
gshell used jline2 at least 2.5. the pom file requires org.sonatype.jline:jline:2.3
i use for now
%pom_remove_dep org.sonatype.jline:jline gshell-util
%pom_xpath_inject "pom:project/pom:dependencies" "
  <dependency>
    <groupId>jline</groupId>
    <artifactId>jline</artifactId>
    <scope>system</scope>
    <systemPath>$(build-classpath jline2)</systemPath>
  </dependency>" gshell-util


[ERROR] /builddir/build/BUILD/gshell-2.6.5/gshell-util/src/main/java/org/sonatype/gshell/util/io/PromptReader.java:[46,15] error: no suitable constructor found for ConsoleReader(InputStream,PrintWriter,Terminal)
[ERROR] constructor ConsoleReader.ConsoleReader(String,InputStream,OutputStream,Terminal,String) is not applicable
(actual and formal argument lists differ in length)
constructor ConsoleReader.ConsoleReader(String,InputStream,OutputStream,Terminal) is not applicable
(actual and formal argument lists differ in length)
constructor ConsoleReader.ConsoleReader(InputStream,OutputStream,Terminal) is not applicable
(actual argument PrintWriter cannot be converted to OutputStream by method invocation conversion)
constructor ConsoleReader.ConsoleReader(InputStream,OutputStream) is not applicable
(actual and formal argument lists differ in length)
constructor ConsoleReader.ConsoleReader() is not applicable
(actual and formal argument lists differ in length)
/builddir/build/BUILD/gshell-2.6.5/gshell-util/src/main/java/org/sonatype/gshell/util/io/InputPipe.java:[80,19] error: cannot find symbol

tried to fix with
sed -i "s|return new ConsoleReader(streams.in, new PrintWriter(streams.out, true), term);|return new ConsoleReader(streams.in, streams.out, term);|" \
gshell-util/src/main/java/org/sonatype/gshell/util/io/PromptReader.java
sed -i "s|return term.readCharacter(streams.in);|return streams.in.read();|" \
 gshell-util/src/main/java/org/sonatype/gshell/util/io/InputPipe.java 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project gshell-core: Compilation failure: Compilation failure:
[ERROR] /builddir/build/BUILD/gshell-2.6.5/gshell-core/src/main/java/org/sonatype/gshell/shell/ShellImpl.java:[311,72] error: cannot find symbol
[ERROR] symbol:   variable JLINE_KEYBINDINGS
[ERROR] location: class ConsoleReader
[ERROR] /builddir/build/BUILD/gshell-2.6.5/gshell-core/src/main/java/org/sonatype/gshell/shell/ShellImpl.java:[314,72] error: cannot find symbol
[ERROR] symbol:   variable JLINE_KEYBINDINGS
[ERROR] location: class ConsoleReader
[ERROR] /builddir/build/BUILD/gshell-2.6.5/gshell-core/src/main/java/org/sonatype/gshell/shell/ShellImpl.java:[317,70] error: cannot find symbol
[ERROR] symbol:   variable JLINE_KEYBINDINGS
[ERROR] location: class ConsoleReader
[ERROR] /builddir/build/BUILD/gshell-2.6.5/gshell-core/src/main/java/org/sonatype/gshell/shell/ShellImpl.java:[322,80] error: cannot find symbol
[ERROR] symbol:   variable JLINEBINDINGS_PROPERTIES
[ERROR] location: class ConsoleReader
[ERROR] /builddir/build/BUILD/gshell-2.6.5/gshell-core/src/main/java/org/sonatype/gshell/shell/ShellImpl.java:[339,39] error: cannot find symbol
[ERROR] symbol:   method getDefaultBindings()
[ERROR] location: interface Terminal
[ERROR] /builddir/build/BUILD/gshell-2.6.5/gshell-core/src/main/java/org/sonatype/gshell/console/Console.java:[80,22] error: no suitable constructor found for ConsoleReader(InputStream,PrintWriter,InputStream,Terminal)
[ERROR] -> [Help 1]

Version-Release number of selected component (if applicable):
2.10

How reproducible:
always

Comment 1 Marek Goldmann 2013-03-01 09:40:37 UTC
Do you have a Rawhide scratch build available for this?

Comment 2 Mikolaj Izdebski 2013-03-01 09:47:01 UTC
I do happen to have a scratch build (made yesterday):
http://koji.fedoraproject.org/koji/taskinfo?taskID=5064801

Comment 3 gil cattaneo 2013-03-01 09:51:07 UTC
i have this one 
http://koji.fedoraproject.org/koji/taskinfo?taskID=5049533

and added to spec file 
for p in core ui; do
%pom_remove_dep org.sonatype.jline:jline gshell-${p}
%pom_xpath_inject "pom:project/pom:dependencies" "
  <dependency>
    <groupId>jline</groupId>
    <artifactId>jline</artifactId>
    <version>any</version>
    <classifier>tests</classifier>
    <scope>system</scope>
    <systemPath>$(build-classpath jline2)</systemPath>
  </dependency>" gshell-${p}
done

Comment 4 Mikolaj Izdebski 2013-03-01 09:58:12 UTC
(In reply to comment #3)
> %pom_remove_dep org.sonatype.jline:jline gshell-${p}
> %pom_xpath_inject "pom:project/pom:dependencies" "
>   <dependency>
>     <groupId>jline</groupId>
>     <artifactId>jline</artifactId>
>     <version>any</version>
>     <classifier>tests</classifier>
>     <scope>system</scope>
>     <systemPath>$(build-classpath jline2)</systemPath>
>   </dependency>" gshell-${p}

This is not the correct way to solve this. If you hardcode path to jline2 JAR then your build will break with next jline update.

See the packaging guidelines for compatibility packages:
http://fedoraproject.org/wiki/Packaging:Java#Compatibility_packages

Quote from the guidelines: "Maven will use dependency information from main package and will return versioned jar if it matches the version asked for in the pom file." In your case version in POM (2.3) does not match version in the system (2.5), so maven resolves the main package instead (1.0)

Comment 5 gil cattaneo 2013-03-01 09:59:35 UTC
Created attachment 704109 [details]
gshell spec file

Comment 6 Mikolaj Izdebski 2013-03-01 10:00:27 UTC
As a note: I really think compatibility package should be the older one and that jline should be renamed to jline1 and jline2 to jline. That would prevent problems like this.

Comment 7 gil cattaneo 2013-03-01 10:05:15 UTC
(In reply to comment #4)
> (In reply to comment #3)

> This is not the correct way to solve this. If you hardcode path to jline2
> JAR then your build will break with next jline update.
> 
> See the packaging guidelines for compatibility packages:
> http://fedoraproject.org/wiki/Packaging:Java#Compatibility_packages
> 
> Quote from the guidelines: "Maven will use dependency information from main
> package and will return versioned jar if it matches the version asked for in
> the pom file." In your case version in POM (2.3) does not match version in
> the system (2.5), so maven resolves the main package instead (1.0)

yes i know but i made these change, before you corrected the jline2 spec file
RHBZ#911559

Comment 8 gil cattaneo 2013-03-01 10:07:03 UTC
(In reply to comment #6)
> As a note: I really think compatibility package should be the older one and
> that jline should be renamed to jline1 and jline2 to jline. That would
> prevent problems like this.

sorry, isn't this the case. latest jline2 (2.10) package breaks backward compatibility.

Comment 9 gil cattaneo 2013-03-01 10:34:11 UTC
Created attachment 704123 [details]
gshell spec file

http://koji.fedoraproject.org/koji/watchlogs?taskID=5066367

Comment 10 Fedora End Of Life 2013-04-03 16:15:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 11 gil cattaneo 2013-07-18 06:27:42 UTC
hi
gshell has been retired from rawhide, 2013-07-18
if you want can close this issue
thanks
regards


Note You need to log in before you can comment on or make changes to this bug.