<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>598</bug_id>
          
          <creation_ts>2012-06-25 21:46:05 +0200</creation_ts>
          <short_desc>JOGL ALL JAR File Change incl. it&apos;s Native Jar URL Derivation</short_desc>
          <delta_ts>2012-07-05 22:47:26 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>gouessej</cc>
    
    <cc>org.jogamp</cc>
    
    <cc>rami.santina</cc>
    
    <cc>sgothel</cc>
    
    <cc>xixsimplicityxix</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>gluegen 9a71703904ebfec343fb2c7266343d37a2e4c3db
jogl a393e45613d87101dbb13763df263c2f9291d2d0
jogl-demos 1d1b473d08612d01d274642113ea37a7052daceb
joal faefb3ed4e9876dd1f756500caed3904604a11cf
jocl 95bf6160c908364fbce2f82df85063d12c9b279c
jocl-demos 0e6bf2a0a9b3df729d6984bdc1a857889a3c1bdf</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1663</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-25 21:46:05 +0200</bug_when>
    <thetext>Currently JOGL uses an inconsistent &apos;all&apos; JAR file name:

- jogl.all.jar
- jogl.all-mobile.jar
- jogl-all-natives-&lt;os.and.arch&gt;.jar

where all other &apos;all&apos; JAR file names, including the native JAR files
are:

- &lt;module&gt;.jar
- &lt;module&gt;-natives-&lt;os.and.arch&gt;.jar

Mark Raynsford is currently working on our Maven repository
and pointed out it&apos;s inconsistency.
&lt;http://forum.jogamp.org/Jar-file-name-pedantry-td4025305.html&gt;

+++

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

+++

GlueGen - JNILibLoaderBase:
  public static boolean addNativeJarLibs(Class&lt;?&gt; classFromJavaJar, String allNativeJarBaseName, String[] atomicNativeJarBaseNames) {..}

JOGL - GLProfile&apos;s usage:
  JNILibLoaderBase.addNativeJarLibs(GLProfile.class, &quot;jogl-all&quot;, { &quot;nativewindow&quot;, &quot;jogl&quot; });

+++

The above indicates (which is true) that we derive the native JAR URL by:
  &lt;URI path from &apos;classFromJavaJar&apos;&gt; + &quot;/&quot; + &apos;allNativeJarBaseName&apos; + &quot;-&quot; + &lt;os.and.arch&gt; + &quot;.jar&quot;

+++

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-&lt;version&gt;.jar
  - jogl-all-&lt;version&gt;-natives-&lt;os.and.arch&gt;.jar

Mark confirmed that this format is acceptable for us to use w/ Maven,
providing the native jars as &quot;classified&quot; jars. 
  &lt;http://forum.jogamp.org/Jar-file-name-pedantry-tp4025305p4025320.html&gt;

+++

Yes, this still would &apos;only&apos; work for the &apos;all&apos; java package names,
the atomic JAR naming scheme would still require the basenames.
Maybe you have a good solution to this ?
However, the &apos;all&apos; JAR targets cover 99% of all of our use cases.

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

+++

GlueGen - JNILibLoaderBase:
  public static boolean addNativeJarLibs(Class&lt;?&gt; classFromJavaJar, String[] atomicNativeJarBaseNames) {..}

JOGL - GLProfile&apos;s usage:
  JNILibLoaderBase.addNativeJarLibs(GLProfile.class, { &quot;nativewindow&quot;, &quot;jogl&quot; });

+++

The above would imply that we derive the native JAR URL by:
  &lt;URI from &apos;classFromJavaJar&apos; w/o &quot;.jar&quot; suffix&gt; + &quot;-&quot; + &lt;os.and.arch&gt; + &quot;.jar&quot;

+++

Yes, this change will also affect GlueGen and all other modules code. 
But since their names are consistent, it would not impact it&apos;s users,
i.e. changing JAR names etc.

+++

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 and required one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2012-06-25 21:55:21 +0200</bug_when>
    <thetext>Hi

You should do it as early as possible or give it up in order to minimize the impact on all projects that rely on JogAmp. We cannot abandon Maven support, several contributors of thir party libraries really want us to provide it (Nifty GUI, Jzy3D, Ardor3D, etc...).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1666</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-25 22:13:50 +0200</bug_when>
    <thetext>(In reply to comment #1)
&gt; Hi
&gt; 
&gt; You should do it as early as possible or give it up in order to minimize the
&gt; impact on all projects that rely on JogAmp. We cannot abandon Maven support,
&gt; several contributors of thir party libraries really want us to provide it
&gt; (Nifty GUI, Jzy3D, Ardor3D, etc...).

Thank you for your agreement. I will do it now in branch &apos;maven&apos; (gluegen, jogl).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1670</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-26 10:57:05 +0200</bug_when>
    <thetext>pushed maven branch of gluegen, jogl and jogl-demos - pls review.

I have tested a few jar file scenarios manually (linux x86_64),
  - all existing all native JARs 
  - missing all naytive JARs
  - all atomic [native] JARs
works here.

Further more a few optimization went into the GlueGen code
avoiding repetitive ClassLoader look-ups and native JAR load attempts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1671</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-26 11:26:24 +0200</bug_when>
    <thetext>(In reply to comment #3)
&gt; pushed maven branch of gluegen, jogl and jogl-demos - pls review.
&gt; 
&gt; I have tested a few jar file scenarios manually (linux x86_64),
&gt;   - all existing all native JARs 
&gt;   - missing all naytive JARs
&gt;   - all atomic [native] JARs
&gt; works here.
&gt; 
&gt; Further more a few optimization went into the GlueGen code
&gt; avoiding repetitive ClassLoader look-ups and native JAR load attempts.

The GlueGen commit 9a71703904ebfec343fb2c7266343d37a2e4c3db
handles the &apos;all&apos; case, as well the &apos;atomic&apos; JAR case.
Hence the original disclaimer (no atomic) is invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1672</commentid>
    <comment_count>5</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-26 11:33:19 +0200</bug_when>
    <thetext>Got the OK from Rami as well.
Hence we have 4 core people who agree on the change (incl. Mark).

Will merge to master to push joal and jocl as well and kick-off testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1673</commentid>
    <comment_count>6</comment_count>
    <who name="Rami Santina">rami.santina</who>
    <bug_when>2012-06-26 11:41:34 +0200</bug_when>
    <thetext> this looks as a good standard with performance advantages, i vote for it...

Regards,
Rami</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1678</commentid>
    <comment_count>7</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-30 14:34:04 +0200</bug_when>
    <thetext>locally tested w/ signed JARs, jogl &amp; jogl-demos test applets and webstart</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679</commentid>
    <comment_count>8</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-06-30 14:34:31 +0200</bug_when>
    <thetext>(In reply to comment #7)
&gt; locally tested w/ signed JARs, jogl &amp; jogl-demos test applets and webstart
.. and maven</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699</commentid>
    <comment_count>9</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-07-05 22:47:26 +0200</bug_when>
    <thetext>*** Bug 562 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>