Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70409

Update dependency to dendency Luxon to latest version

      luxon-1.21.1.js

      luxon-1.21.1.min.js

       

      Both are High Findings in Whitesource.

      Is it possible to update the libs in the next release?

      Thanks in advance

       

          [JENKINS-70409] Update dependency to dendency Luxon to latest version

          Ulli Hafner added a comment - - edited

          The actual problem is that luxon.js is currently deployed as a fixed and checked in JS file that is part of the sources folder. We need to remove that file and deploy the automatically downloaded artifact right after npm install has been invoked. This is done for all other JS libraries of the data tables distribution but Luxon simply has been forgotten.

          Steps to fix the problem:

          1. Remove Luxon from https://github.com/jenkinsci/data-tables-api-plugin/tree/master/src/main/webapp/js
          2. Reference Luxon latest version in package.json
          3. Copy Luxon in the same way to the output JS folder as shown in https://github.com/jenkinsci/data-tables-api-plugin/blob/master/pom.xml#L130
          4. Create and deploy the plugin to your Jenkins instance to see if timestamps are still correctly shown in a table that uses Luxon

          Ulli Hafner added a comment - - edited The actual problem is that luxon.js is currently deployed as a fixed and checked in JS file that is part of the sources folder. We need to remove that file and deploy the automatically downloaded artifact right after npm install has been invoked. This is done for all other JS libraries of the data tables distribution but Luxon simply has been forgotten. Steps to fix the problem: 1. Remove Luxon from https://github.com/jenkinsci/data-tables-api-plugin/tree/master/src/main/webapp/js 2. Reference Luxon latest version in package.json 3. Copy Luxon in the same way to the output JS folder as shown in https://github.com/jenkinsci/data-tables-api-plugin/blob/master/pom.xml#L130 4. Create and deploy the plugin to your Jenkins instance to see if timestamps are still correctly shown in a table that uses Luxon

          Udit added a comment -

          I would like to work on this issue nicoleschultz 
          Currently I am understanding how implementation can be done according to Ulli Hafner's msg.

          Udit added a comment - I would like to work on this issue nicoleschultz   Currently I am understanding how implementation can be done according to Ulli Hafner's msg.

          Nicole added a comment -

          Thanks a lot for your help - how is it going on? Could you replace the lib?

          Nicole added a comment - Thanks a lot for your help - how is it going on? Could you replace the lib?

          Udit added a comment -

          I am getting issues in deploying the plugin on local instance, can you guide me? 

          I am giving github repo yo jenkins to build 

          What other essential parts I  should add to successfully build? 

          Udit added a comment - I am getting issues in deploying the plugin on local instance, can you guide me?  I am giving github repo yo jenkins to build  What other essential parts I  should add to successfully build? 

          Ulli Hafner added a comment - - edited

          You simply need to build the plugin with mvn verify. Then manually copy the created file as shown in the go.sh script:

          cp -fv target/data-tables-api.hpi $JENKINS_HOME/plugins/data-tables-api.jpi
          

           

          Ulli Hafner added a comment - - edited You simply need to build the plugin with mvn verify . Then manually copy the created file as shown in the go.sh script: cp -fv target/data-tables-api.hpi $JENKINS_HOME/plugins/data-tables-api.jpi  

          Udit added a comment -

          Do you mean to run mvn verify in my IDE terminal or through build job?
          Also can you explain me step 3? Do I need to add 

          <resource>
            <directory>${project.basedir}/node_modules/luxon/js</directory>
            <filtering>false</filtering>
            </resource>

          to pom.xml,right?

          Udit added a comment - Do you mean to run mvn verify in my IDE terminal or through build job? Also can you explain me step 3? Do I need to add  <resource>   <directory>${project.basedir}/node_modules/luxon/js</directory>   <filtering>false</filtering>   </resource> to pom.xml,right?

          Udit added a comment -

           
          [INFO] T E S T S [INFO] -------------------------------------------------------
           
          Error: Could not find or load main class YT\target\patch-modules\org-netbeans-insane-hook.jar Caused by: java.lang.ClassNotFoundException: YT\target\patch-modules\org-netbeans-insane-hook.jar Error: Could not find or load main class YT\target\patch-modules\org-netbeans-insane-hook.jar Caused by: java.lang.ClassNotFoundException: YT\target\patch-modules\org-netbeans-insane-hook.jar Error: Could not find or load main class YT\target\patch-modules\org-netbeans-insane-hook.jar Caused by: java.lang.ClassNotFoundException: YT\target\patch-modules\org-netbeans-insane-hook.jar [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

           

          Udit added a comment -   [INFO] T E S T S [INFO] -------------------------------------------------------   Error: Could not find or load main class YT\target\patch-modules\org-netbeans-insane-hook.jar Caused by: java.lang.ClassNotFoundException: YT\target\patch-modules\org-netbeans-insane-hook.jar Error: Could not find or load main class YT\target\patch-modules\org-netbeans-insane-hook.jar Caused by: java.lang.ClassNotFoundException: YT\target\patch-modules\org-netbeans-insane-hook.jar Error: Could not find or load main class YT\target\patch-modules\org-netbeans-insane-hook.jar Caused by: java.lang.ClassNotFoundException: YT\target\patch-modules\org-netbeans-insane-hook.jar [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0  

          Udit added a comment -

          consoleText.txt
          I have attached console logs of the build
          drulli Can you please look at it?

           

          Udit added a comment - consoleText.txt I have attached console logs of the build drulli Can you please look at it?  

          Ulli Hafner added a comment - - edited

          Also can you explain me step 3? Do I need to add

          <resource>
           	<directory>${project.basedir}/node_modules/luxon/js</directory>
           	<filtering>false</filtering>
          </resource>
          

          Yes. Just try and look if the Luxon files are copied to target/data-tables-api/js/
          The folder and JS file needs to mach the file name under the node folder.

          Ulli Hafner added a comment - - edited Also can you explain me step 3? Do I need to add <resource> <directory>${project.basedir}/node_modules/luxon/js</directory> <filtering> false </filtering> </resource> Yes. Just try and look if the Luxon files are copied to target/data-tables-api/js/ The folder and JS file needs to mach the file name under the node folder.

          Ulli Hafner added a comment -

          You can run the install with mvn verify -Pskip in order to bypass the tests. Maybe the build does not work with JDK 17 correctly yet. (You can try with Java 11, but the tests are not required for your change).

          Ulli Hafner added a comment - You can run the install with mvn verify -Pskip in order to bypass the tests. Maybe the build does not work with JDK 17 correctly yet. (You can try with Java 11, but the tests are not required for your change).

            drulli Ulli Hafner
            nicoleschultz Nicole
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: