Jar file name pedantry

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Jar file name pedantry

tyro
Hi. The current list of distribution jar names:

gluegen.jar
gluegen-rt-android-armeabi-v7a.apk
gluegen-rt-android-armeabi-v7a-unsigned.apk
gluegen-rt.jar
gluegen-rt-natives-android-armv7.jar
gluegen-rt-natives-linux-amd64.jar
gluegen-rt-natives-linux-armv7hf.jar
gluegen-rt-natives-linux-armv7.jar
gluegen-rt-natives-linux-i586.jar
gluegen-rt-natives-macosx-universal.jar
gluegen-rt-natives-solaris-amd64.jar
gluegen-rt-natives-solaris-i586.jar
gluegen-rt-natives-windows-amd64.jar
gluegen-rt-natives-windows-i586.jar
joal-armeabi-v7a.apk
joal-armeabi-v7a-unsigned.apk
joal.jar
joal-natives-android-armv7.jar
joal-natives-linux-amd64.jar
joal-natives-linux-armv7hf.jar
joal-natives-linux-armv7.jar
joal-natives-linux-i586.jar
joal-natives-macosx-universal.jar
joal-natives-solaris-amd64.jar
joal-natives-solaris-i586.jar
joal-natives-windows-amd64.jar
joal-natives-windows-i586.jar
joal-test.jar
jocl-armeabi-v7a.apk
jocl-armeabi-v7a-unsigned.apk
jocl.jar
jocl-natives-android-armv7.jar
jocl-natives-linux-amd64.jar
jocl-natives-linux-armv7hf.jar
jocl-natives-linux-armv7.jar
jocl-natives-linux-i586.jar
jocl-natives-macosx-universal.jar
jocl-natives-solaris-amd64.jar
jocl-natives-solaris-i586.jar
jocl-natives-windows-amd64.jar
jocl-natives-windows-i586.jar
jogamp.android-launcher.apk
jogamp.android-launcher-unsigned.apk
jogl.all-android-armeabi-v7a.apk
jogl.all-android-armeabi-v7a-unsigned.apk
jogl.all.jar
jogl.all-mobile.jar
jogl-all-natives-android-armv7.jar
jogl-all-natives-linux-amd64.jar
jogl-all-natives-linux-armv7hf.jar
jogl-all-natives-linux-armv7.jar
jogl-all-natives-linux-i586.jar
jogl-all-natives-macosx-universal.jar
jogl-all-natives-solaris-amd64.jar
jogl-all-natives-solaris-i586.jar
jogl-all-natives-windows-amd64.jar
jogl-all-natives-windows-i586.jar
jogl.all-noawt.jar
jogl.test-android.apk
jogl.test-android-unsigned.apk
jogl.test.jar

Would it be possible to fix the names of the jogl.* jar files for consistency with the others? This would make it much easier for us to automate processing of the jar files (right now, we special case jogl jars).

Any objections to changing things to:

gluegen.jar
gluegen-rt-android-armeabi-v7a.apk
gluegen-rt-android-armeabi-v7a-unsigned.apk
gluegen-rt.jar
gluegen-rt-natives-android-armv7.jar
gluegen-rt-natives-linux-amd64.jar
gluegen-rt-natives-linux-armv7hf.jar
gluegen-rt-natives-linux-armv7.jar
gluegen-rt-natives-linux-i586.jar
gluegen-rt-natives-macosx-universal.jar
gluegen-rt-natives-solaris-amd64.jar
gluegen-rt-natives-solaris-i586.jar
gluegen-rt-natives-windows-amd64.jar
gluegen-rt-natives-windows-i586.jar
joal-armeabi-v7a.apk
joal-armeabi-v7a-unsigned.apk
joal.jar
joal-natives-android-armv7.jar
joal-natives-linux-amd64.jar
joal-natives-linux-armv7hf.jar
joal-natives-linux-armv7.jar
joal-natives-linux-i586.jar
joal-natives-macosx-universal.jar
joal-natives-solaris-amd64.jar
joal-natives-solaris-i586.jar
joal-natives-windows-amd64.jar
joal-natives-windows-i586.jar
joal-test.jar
jocl-armeabi-v7a.apk
jocl-armeabi-v7a-unsigned.apk
jocl.jar
jocl-natives-android-armv7.jar
jocl-natives-linux-amd64.jar
jocl-natives-linux-armv7hf.jar
jocl-natives-linux-armv7.jar
jocl-natives-linux-i586.jar
jocl-natives-macosx-universal.jar
jocl-natives-solaris-amd64.jar
jocl-natives-solaris-i586.jar
jocl-natives-windows-amd64.jar
jocl-natives-windows-i586.jar
jogamp-android-launcher.apk
jogamp-android-launcher-unsigned.apk
jogl-all-android-armeabi-v7a.apk
jogl-all-android-armeabi-v7a-unsigned.apk
jogl-all.jar
jogl-all-mobile.jar
jogl-all-natives-android-armv7.jar
jogl-all-natives-linux-amd64.jar
jogl-all-natives-linux-armv7hf.jar
jogl-all-natives-linux-armv7.jar
jogl-all-natives-linux-i586.jar
jogl-all-natives-macosx-universal.jar
jogl-all-natives-solaris-amd64.jar
jogl-all-natives-solaris-i586.jar
jogl-all-natives-windows-amd64.jar
jogl-all-natives-windows-i586.jar
jogl-all-noawt.jar
jogl-test-android.apk
jogl-test-android-unsigned.apk
jogl-test.jar

If so, it would probably be best to do this now, before 2.0.
Reply | Threaded
Open this post in threaded view
|

Re: Jar file name pedantry

gouessej
Administrator
Hi

I don't understand what is wrong with current naming for you. Can you elaborate please? I already automatize the processing of JARs in my own builds with Ant.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Jar file name pedantry

Xerxes Rånby
Some jogl jars uses a mix of . and - to separate words inside the jar filename.
I think the suggestion is to only use - to separate words in the jar filenames like how all the gluegen jars are currently named.
To my understanding he would like to rename:
jogamp.android-launcher.apk to jogamp-android-launcher.apk ,
jogamp.android-launcher-unsigned.apk to jogamp-android-launcher-unsigned.apk ,
jogl.all-android-armeabi-v7a.apk to jogl-all-android-armeabi-v7a.apk ,
jogl.all-android-armeabi-v7a-unsigned.apk to jogl-all-android-armeabi-v7a-unsigned.apk ,
jogl.all.jar to jogl-all.jar ,
jogl.all-mobile.jar to jogl-all-mobile.jar ,
jogl.all-noawt.jar to jogl-all-noawt.jar,
jogl.test-android.apk to jogl-test-android.apk ,
jogl.test-android-unsigned.apk to jogl-test-android-unsigned.apk and
jogl.test.jar to jogl-test.jar .


2012-06-25 10:26, gouessej [via jogamp] skrev:
Hi

I don't understand what is wrong with current naming for you. Can you elaborate please? I already automatize the processing of JARs in my own builds with Ant.


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Jar-file-name-pedantry-tp4025305p4025309.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Jar file name pedantry

gouessej
Administrator
Thank you Xerxes. Maybe Sven knows why there is a mix of "." and "-" in jar names. Is such a mix useful?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Jar file name pedantry

tyro
In reply to this post by Xerxes Rånby
Yes, that's it. I'd like to see "-" used consistently.

I did speak to Sven briefly about it and he seemed to be in favour, but has yet to comment.
Reply | Threaded
Open this post in threaded view
|

Re: Jar file name pedantry

Sven Gothel
Administrator
On 06/25/2012 06:35 PM, tyro [via jogamp] wrote:
> Yes, that's it. I'd like to see "-" used consistently.
>
> I did speak to Sven briefly about it and he seemed to be in favour, but has
> yet to comment.

Sorry for my extended silence.

TO show the changes of filenames here is the diff:

--- ../../jogl-file-name-old.txt        2012-06-25 20:43:00.059353724 +0200
+++ ../../jogl-file-name-new.txt        2012-06-25 20:43:17.567084888 +0200
@@ -39,12 +39,12 @@
 jocl-natives-solaris-i586.jar
 jocl-natives-windows-amd64.jar
 jocl-natives-windows-i586.jar
-jogamp.android-launcher.apk
-jogamp.android-launcher-unsigned.apk
-jogl.all-android-armeabi-v7a.apk
-jogl.all-android-armeabi-v7a-unsigned.apk
-jogl.all.jar
-jogl.all-mobile.jar
+jogamp-android-launcher.apk
+jogamp-android-launcher-unsigned.apk
+jogl-all-android-armeabi-v7a.apk
+jogl-all-android-armeabi-v7a-unsigned.apk
+jogl-all.jar
+jogl-all-mobile.jar
 jogl-all-natives-android-armv7.jar
 jogl-all-natives-linux-amd64.jar
 jogl-all-natives-linux-armv7hf.jar
@@ -55,7 +55,7 @@
 jogl-all-natives-solaris-i586.jar
 jogl-all-natives-windows-amd64.jar
 jogl-all-natives-windows-i586.jar
-jogl.all-noawt.jar
-jogl.test-android.apk
-jogl.test-android-unsigned.apk
-jogl.test.jar
+jogl-all-noawt.jar
+jogl-test-android.apk
+jogl-test-android-unsigned.apk
+jogl-test.jar

Besides the Android launcher of GlueGen (which does not matter due to it's
special deployment), only the jogl.all* Java  Jar files differ.

Mark's (Tyro) motivation was beauty at first, i.e.
inconsistency of the file naming scheme.

I double checked our native JAR file loading mechanism,
which gives this change a technical motivation.

+++

JNILibLoaderBase:
  public static boolean addNativeJarLibs(Class<?> classFromJavaJar, String allNativeJarBaseName, String[] atomicNativeJarBaseNames) {..}

GLProfile's usage:
  JNILibLoaderBase.addNativeJarLibs(GLProfile.class, "jogl-all", { "nativewindow", "jogl" });

+++

The above indicates (which is true) that we derive the native JAR URL by:
  <URI path from 'classFromJavaJar'> + "/" + 'allNativeJarBaseName' + "-" + <os.and.arch> + ".jar"

The above does not allow us to change the JARs basename if required
as it is intrinsic when using maven, for example.
Of course, other situations may occur as well .. when dealing w/ custom user packaging.

For example in maven, Mark figured out how to use a naming scheme like:
  - jogl-all-<version>.jar
  - jogl-all-<version>-natives-<os.and.arch>.jar

@Mark: Please confirm the above!

Yes, this still would 'only' work for the 'all' java package names,
the atomic JAR naming scheme would still require the basename.
Maybe you have a good solution to this ?


The proposed jogl.all* Java name change would also lead to:

+++

JNILibLoaderBase:
  public static boolean addNativeJarLibs(Class<?> classFromJavaJar, String[] atomicNativeJarBaseNames) {..}

GLProfile's usage:
  JNILibLoaderBase.addNativeJarLibs(GLProfile.class, { "nativewindow", "jogl" });

+++

The above would imply that we derive the native JAR URL by:
  <URI from 'classFromJavaJar' w/o ".jar" suffix> + "-" + <os.and.arch> + ".jar"

+++

Note: It would be a bad workaround to attempt to load variations of
native JAR URLs, since this would impact the loading time.
Keep in mind that each attempt to load a URL might be a network connection.

+++

I know this change would ask people to change their project files
and us to change all our documentation and examples.
Hence it has a huge impact.

Question is, whether this remedy is worth the amount of work and
probably the confusion.

Please digest and give your statements.

In the end, I think this change is a good one.

~Sven



signature.asc (910 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jar file name pedantry

tyro
The diffs for the name changes look good.

- jogl-all-<version>.jar
- jogl-all-<version>-natives-<os.and.arch>.jar

... is definitely the format that we'll need in order to force Maven into doing the right thing. Because we've got requirements on the names of jar files (in order to locate them at runtime) and because Maven's got its own idea about what jar files should be called, I've had to try everything possible in order to get Maven to produce something that'll be acceptable. The above format is the best I've been able to get out of it.

(For anyone that knows Maven, the native jars are provided as "classified" jars).
Reply | Threaded
Open this post in threaded view
|

Re: Jar file name pedantry

Sven Gothel
Administrator
Bug# 598
<https://jogamp.org/bugzilla/show_bug.cgi?id=598>

Please lets continue there.

Since we desire to push Maven fwd,
I start impl. the changes in a gluegen/jogl branch 'maven'.

Please 'vote'.

~Sven



signature.asc (910 bytes) Download Attachment