public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-java] Current state of java-config for a new release.
@ 2008-01-21  5:59 Alistair Bush
  0 siblings, 0 replies; only message in thread
From: Alistair Bush @ 2008-01-21  5:59 UTC (permalink / raw
  To: gentoo-java

Ok, as we all know java-config has some issues :)

Firstly the outstanding issue(s)

[ISSUE} Currently the javadoc virtual is broken as it only has
blackdown-jdk-1.4.2 and sun-jdk-1.5 as its providing vm's.  java-config
currently always takes a positive view and uses the highest vm possible
( ie sun-jdk-1.6 ).  So even when you have sun-jdk-1.5 it will still
result in the error.

!!! ERROR: Couldn't find suitable VM. Possible invalid dependency string.

[WORKAROUND] virtuals must include the highest vm's ( ie sun-jdk-1.6 )
if they are going to PROVIDE virtuals.  otherwise ebuild must depend on
|| ( =virtual/jdk-1.x virtual/jdk-1.y etc )

I don't consider this enough to stop the release mainly because there
are no current virtuals that _should_ (note the javadoc virtual isn't
complete ) have this issue as vm's only add api <fingers crosses>).

[ISSUE] Currently java-config uses a packages TARGET to determine which
vm to use.  Really java-config should use the VM var and support
<virtual/jre-1.x, =virtual/jre-1.x, etc, etc

[WORKAROUND] None, believe we are stuck with it until Generation 3 ( at
least ),  this could require a major rewrite.


Now, here are a set of Use Cases.  Hopefully you can look at them an say 
yes brilliant they are great, but I would like to make sure ive covered 
everything as much as possible. ( This is more for my benefit than yours )

Use Case 1:  java-virtuals/jmx.  (ie. both packages and vm's.  If you 
are wondering where jmx is, I wouldn't bother looking for it the 
java-virtuals overlay one is outdated and broken ).

a)
$ java-config-2 -f
sun-jdk-1.5

$ java-config -p jmx
<nothing>

b)
$ java-config -s 1
Now using blackdown-jdk-1.4.2 as your user JVM

$ java-config -p jmx
/usr/share/sun-jmx/lib/jmxri.jar:/usr/share/sun-jmx/lib/jmxtools.jar

c)
$ emerge -C sun-jmx
$ java-config-2 -s 1
Now using blackdown-jdk-1.4.2 as your user JVM
$ ./java-config-2 -p jmx
!!! ERROR: No providers are available, please ensure you have one of the 
following VM's or Package's;
            VM's (Your active vm must be one of these): sun-jdk-1.6, 
sun-jdk-1.5
            Packages's: sun-jmx

___NOTE___  is this error msg confusing?

d)
$ ./java-config-2 -s 35 as your us
Now using sun-jdk-1.5 as your user JVM

$ ./java-config-2 -p jmx your user


Use Case 2: java-virtuals/javamail ( ie a package only virtual, another 
example is servlet-api )

$ ./java-config-2 -p javamail
/usr/share/gnu-javamail-1/lib/gnumail-providers.jar:/usr/share/gnu-javamail-1/lib/mail.jar
$ ./java-config-2 -p javamail
/usr/share/sun-javamail/lib/mail.jar

___NOTE___  had to edit /etc/java-config-2/virtuals to do this. 
javamail=gnu-javamail-1 and javamail=sun-javamail respectively.

Use Case 3: depend-java-query (the interesting ones)

___NOTE___ some query strings might not be valid within DEPEND but we 
don't perform as strict a checks as portage.

a) (in various combo's, also after demonstrating a point I don't 
continue to do so.)
$ ./depend-java-query --get-vm '=virtual/jdk-1.4* 
=java-virtuals/servlet-api-2.4'
blackdown-jdk-1.4.2
$ ./depend-java-query --get-vm '=virtual/jdk-1.4* 
=java-virtuals/servlet-api-2.4*'
blackdown-jdk-1.4.2
$ ./depend-java-query --get-vm '=virtual/jdk-1.4* 
java-virtuals/servlet-api:2.4'
blackdown-jdk-1.4.2
$ ./depend-java-query --get-vm '=virtual/jdk-1.4* 
=java-virtuals/servlet-api:2.4'
blackdown-jdk-1.4.2

b)
$ ./depend-java-query --get-vm '=virtual/jdk-1.5* 
java-virtuals/servlet-api:2.4'
sun-jdk-1.5

c)
$ ./depend-java-query --get-vm '|| ( =virtual/jdk-1.5* =virtual/jdk-1.4* 
) java-virtuals/servlet-api:2.4'
sun-jdk-1.5

d)
$ ./depend-java-query --get-vm '>=virtual/jdk-1.5 
java-virtuals/servlet-api:2.4'
sun-jdk-1.6
$ ./depend-java-query --get-vm '>=virtual/jdk-1.6 
java-virtuals/servlet-api:2.4'
sun-jdk-1.6

e) (No sun-jmx )
$ ./depend-java-query --get-vm '=virtual/jdk-1.4* java-virtuals/jmx'
!!! ERROR: Couldn't find suitable VM. Possible invalid dependency string.

$ ./depend-java-query --get-vm '>=virtual/jdk-1.4* java-virtuals/jmx'
sun-jdk-1.6

( With sun-jmx ) available )
$ ./depend-java-query --get-vm '=virtual/jdk-1.4* java-virtuals/jmx'
blackdown-jdk-1.4.2

So hopefully there will be a new release of java-config this week, and 
that release of java-config can be stabilised

Alistair

ps.  God I hope this is everything !!!!
pss. Seeing I fixed somethings during the writing of this there is more 
chance than not ive broken something else :P
-- 
gentoo-java@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-21  6:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21  5:59 [gentoo-java] Current state of java-config for a new release Alistair Bush

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox