#1 Add JSS's dependencies to the classpath of 389-console
Merged 5 years ago by cipherboy. Opened 5 years ago by cipherboy.
cipherboy/389-console add-jss-deps  into  master

file modified
+1 -1
@@ -40,7 +40,7 @@ 

  # Launch the Console

  #

  java \

-     -cp @jssjar@:@ldapjdkjar@:$CLASSDEST/@basejar@:$CLASSDEST/@mccjar@:$CLASSDEST/@mcclangjar@:$CLASSDEST/@nmclfjar@:$CLASSDEST/@nmclflangjar@:$CLASSDEST/@themejar@ \

+     -cp @apachecodecjar@:@apachelangjar@:@slf4jjar@:@jssjar@:@ldapjdkjar@:$CLASSDEST/@basejar@:$CLASSDEST/@mccjar@:$CLASSDEST/@mcclangjar@:$CLASSDEST/@nmclfjar@:$CLASSDEST/@nmclflangjar@:$CLASSDEST/@themejar@ \

      -Djava.util.prefs.systemRoot="$HOME/.@prefsdir@" \

      -Djava.util.prefs.userRoot="$HOME/.@prefsdir@" \

      $LIBDIR \

file modified
+3
@@ -34,5 +34,8 @@ 

  console.mcc.name=idm-console-mcc

  console.nmclf.name=idm-console-nmclf

  

+ apache.codec.jar.name=apache-commons-codec.jar

+ apache.lang.jar.name=apache-commons-lang.jar

  jss.jar.name=jss4.jar

  ldapjdk.jar.name=ldapjdk.jar

+ slf4j.jar.name=slf4j-api.jar

file modified
+30
@@ -37,6 +37,9 @@ 

      <!-- Override these properties to use components from other system locations -->

      <property name="ldapjdk.local.location" value="/usr/share/java"/>

      <property name="jss.local.location"     value="/usr/lib/java"/>

+     <property name="apache.codec.local.location"     value="/usr/share/java"/>

+     <property name="apache.lang.local.location"     value="/usr/share/java"/>

+     <property name="slf4j.local.location"     value="/usr/share/java/slf4j"/>

      <property name="console.local.location" value="/usr/share/java"/>

      <property name="lib.dir"                value="/usr/lib"/>

      <property name="need_libdir"            value=""/>
@@ -62,6 +65,30 @@ 

          </not>

        </condition>

      </fail>

+     <fail message="Apache Commons Codec (${apache.codec.jar.name}) does not exist in ${apache.codec.local.location}">

+       Please set the correct location with -Dapache.codec.local.location=[path]

+       <condition>

+         <not>

+           <available file="${apache.codec.local.location}/${apache.codec.jar.name}"/>

+         </not>

+       </condition>

+     </fail>

+     <fail message="Apache Commons Lang (${apache.lang.jar.name}) does not exist in ${apache.lang.local.location}">

+       Please set the correct location with -Dapache.lang.local.location=[path]

+       <condition>

+         <not>

+           <available file="${apache.lang.local.location}/${apache.lang.jar.name}"/>

+         </not>

+       </condition>

+     </fail>

+     <fail message="SLF4J (${slf4j.jar.name}) does not exist in ${slf4j.local.location}">

+       Please set the correct location with -Dslf4j.local.location=[path]

+       <condition>

+         <not>

+           <available file="${slf4j.local.location}/${slf4j.jar.name}"/>

+         </not>

+       </condition>

+     </fail>

      <fail message="Console base jar (${console.base.name}.jar) does not exist in ${console.local.location}">

        Please set the correct location with -Dconsole.local.location=[path]

        <condition>
@@ -108,6 +135,9 @@ 

      <replace file="${built.dir}/389-console">

        <replacefilter token="@classdest@" value="${classdest}"/>

        <replacefilter token="@jssjar@" value="${jss.local.location}/${jss.jar.name}"/>

+       <replacefilter token="@apachecodecjar@" value="${apache.codec.local.location}/${apache.codec.jar.name}"/>

+       <replacefilter token="@apachelangjar@" value="${apache.lang.local.location}/${apache.lang.jar.name}"/>

+       <replacefilter token="@slf4jjar@" value="${slf4j.local.location}/${slf4j.jar.name}"/>

        <replacefilter token="@ldapjdkjar@" value="${ldapjdk.local.location}/${ldapjdk.jar.name}"/>

        <replacefilter token="@basejar@" value="${console.base.name}.jar"/>

        <replacefilter token="@mccjar@" value="${console.mcc.name}.jar"/>

Recently JSS added three dependencies:

These three dependencies shipped in v4.5.0; the current version in Fedora 28 is jss-4.5.0-1.fc28.x86_64. To use this version of jss, these dependencies need to be included in classpath of the calling application alongside the jss4.jar.

This commit adds these dependencies to the build system for 389-console but does not publish a new release of 389-console.

Signed-off-by: Alexander Scheel ascheel@redhat.com

Merging as I validated this affects the build process in the way I'd like and that the results link include the correct jars in the classpath.

Thanks @mreynolds for the review! :)

Pull-Request has been merged by cipherboy

5 years ago