SDN-R ODLUX does require compilation of Javascript and Typescript files as runnable code for the Web-Clients. 

A specific compilation environment is created, that requires an extension of the actual version of "frontend-maven-plugin".

Dependency is like the code below. Example is in pom of odlux framework in ONAP gerrit: "ccsdk/features":"/sdnr/wt/odlux/framework/pom.xml"


<plugins>
     <plugin>
       <groupId>de.jacksitlab</groupId>
       <artifactId>frontend-maven-plugin</artifactId>
       <version>1.7.1</version>

       Some PLUGIN - CONFIGURATION       

     </plugin>
...

The extension for ONAP SDN-R is published in github repository https://github.com/jacksitlab/frontend-maven-plugin.

Usage in ODLUX pom files

In ONAP ODLUX the plugin is used as already pre-compiled plugin.

For getting it from public available repository, the follwong additonal repository was added to the related ODLUX pom files:

<pluginRepository> 
  <id>highstreet repo</id> 
  <url>https://cloud-highstreet-technologies.com/mvn/</url>
  <snapshots> 
     <enabled>true</enabled> 
     <updatePolicy>always</updatePolicy> 
  </snapshots> 
</pluginRepository>

How to compile locally

A further option is to download the source code to a local server and compile to the local ".m2" maven repository.

For compiling the version 1.7.1 of the frontend plugin the environment is

Download repo

  • clone the jacksitlab/frontend-maven-plugin using the github link

Compile plugin

  • cd into frontend-maven-plugin
  • mvn clean install -DskipTests

After executing the compile the plugin should be in the local repository and can be used.

Example below with user herbert showing result in local ".m2" repository:


herbert@dev-herbert:~/.m2/repository/de/jacksitlab$ ls -l
total 16
drwxr-xr-x 3 herbert herbert 4096 May 15 12:06 frontend-maven-plugin
drwxr-xr-x 3 herbert herbert 4096 May 15 12:00 frontend-plugin-core
drwxr-xr-x 3 herbert herbert 4096 May 15 12:00 frontend-plugins
-rw-r--r-- 1 herbert herbert 240 May 15 12:06 maven-metadata-local.xml



  • No labels

2 Comments

  1. Herbert Eiselt

    I am facing issue to compile CCSDK/features/sdnr/wt/odlux elalto-fluorine branch

    [INFO] --- frontend-maven-plugin:1.7.1:install-node-and-yarn (install node and yarn) @ odlux-framework ---
    [INFO] Installing node version v8.10.0
    [DEBUG] Creating install directory /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node
    [DEBUG] Creating temporary directory /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp
    [INFO] Unpacking /home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz into /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp
    
    [ERROR] Failed to execute goal de.jacksitlab:frontend-maven-plugin:1.7.1:install-node-and-yarn (install node and yarn) on project odlux-framework: 
    Could not extract the Node archive: 
    Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz': 
    Expanding node-v8.10.0-linux-x64/ would create file outside of /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp -> [Help 1]
    
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.jacksitlab:frontend-maven-plugin:1.7.1:install-node-and-yarn (install node and yarn) on project odlux-framework: 
    Could not extract the Node archive: 
    Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz'
    
    Caused by: org.apache.maven.plugin.MojoFailureException: 
    Could not extract the Node archive: 
    Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz'
    
    Caused by: com.github.eirslett.maven.plugins.frontend.lib.InstallationException: 
    Could not extract the Node archive
    
    Caused by: com.github.eirslett.maven.plugins.frontend.lib.ArchiveExtractionException: 
    Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz'
    
    Caused by: java.io.IOException: Expanding node-v8.10.0-linux-x64/ would create file outside of /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp


    Similar issue was reported at : https://github.com/eirslett/frontend-maven-plugin/issues/813 and seems to be fixed on 5th Sept.

    But as per this wiki ODLUX is using plugin from a forked repo https://github.com/jacksitlab/frontend-maven-plugin


    Do you own the forked repo, or knows who own that?

    Please help in having the code fix from eirslett to jacksitlab.

  2. Hi Kapil, we have add the fix to the code and pushed it to our server as version 1.7.2-SNAPSHOT. I tested to compile odlux locally and in our Jenkins environment.

    So please try to change the plugin version in the following pom files and tell me if it's working. 
        odlux/framework/pom.xml
        odlux/apps/*App/pom.xml

    I'm also available in the ONAP RocketChat. Maybe that's the faster way to communicate and bring this to work if there are more problems.

    Here the list of files that need to be adapted:

    ./sdnr/wt/odlux/framework/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/performanceHistoryApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/demoApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/helpApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/configurationApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/connectApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/faultApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/mediatorApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/minimumApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/inventoryApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/maintenanceApp/pom.xml: <version>1.7.2-SNAPSHOT</version>
    ./sdnr/wt/odlux/apps/apiDemo/pom.xml: <version>1.7.2-SNAPSHOT</version>

    The version number:

    <plugin>
    <groupId>de.jacksitlab</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>1.7.2-SNAPSHOT</version>
    <executions>
    <execution> ......