Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

Content Navigator Plugin - how to set up a local development environment

  • 1.  Content Navigator Plugin - how to set up a local development environment

    Posted 09/20/23 07:41 AM

    Hello fellow IBM'rs,

    I have not quite understood how to efficiency develop Content Navigator Plugins;

    My problem is during development - When making code changes, I need to first compile code - then upload the class files to the server - Reload plugin from Navigator Admin client.

    For me this is very inefficient, somewhere in IBM it is sort of explained that you can load the plugin with "class file path" and "class name". Sure thats what I am doing, but I anyhow need to go into the Navigator Admin client and reload the plugin.

    To explain my development environment setup

    • I have created a docker starting my local Content Navigator application - attaching a folder on my local computer which is where the class files being compiled and seen by the docker.

    I am happy to explain more if I am not being clear :)

    How does your development environment look like?



    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------


  • 2.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 09/20/23 12:46 PM

    Hello Andreas,

    Have you tried using Hot Code Replace (HCR)? You'd need to start ICN in debug mode and connect to the debug port from your IDE.

    Regards,

    Andy



    ------------------------------
    ANDY Choi
    ------------------------------



  • 3.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 09/25/23 05:25 AM

    Hello Andreas, 

    if you are looking for deployment automation, we developed for our customer simple java console app for deployment. This app conntect to content navigator and invoke reload action by calling loadPlugin url.



    ------------------------------
    Gabriela Maráková
    ------------------------------



  • 4.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 09/25/23 03:55 PM

    Hello Gabriela, 

    If I understand you correctly, you're referring to deploying an ICN Plugin built as JAR?



    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------



  • 5.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 09/26/23 03:29 AM

    Yes, we work with .jar ICN plugins.



    ------------------------------
    Gabriela Maráková
    ------------------------------



  • 6.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 09/26/23 04:29 AM

    Hi @Gabriela Maráková,

    I understand - what I refer to is the development phase - before we have built a JAR.

    How to develop without the need of building the jar and deploy to test your changes



    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------



  • 7.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 09/25/23 04:08 PM

    Hello @ANDY Choi,

    So what type of HCR are you talking about?

    Can you explain how your setup looks?

    • how is ICN configured in regards of the plugin you develop
    • how is your ide configured?(intellij / eclipse / netbeans / anything else)?


    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------



  • 8.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 09/26/23 09:09 AM

    Hello Andreas,

    You'd first need to start the ICN in debug mode.

    https://www.ibm.com/support/pages/how-do-i-toggle-debug-mode-individual-websphere-application-server-instances

    Then, attach your IDE to the remote host and port. You can reference the IDE documentation on attaching your IDE to a remote server for more details.

    https://devblogs.microsoft.com/java/hot-code-replacement-for-java-comes-to-visual-studio-code/

    https://www.eclipse.org/community/eclipse_newsletter/2017/june/article1.php

    https://blog.jetbrains.com/idea/2019/04/debug-your-java-applications-in-docker-using-intellij-idea/

    Regards,

    Andy



    ------------------------------
    ANDY Choi
    ------------------------------



  • 9.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 10/26/23 02:30 PM

    Hi @ANDY Choi,

    But wouldnt that only let you debug the java part of this? would not work for adding new features, actions, services etc..?



    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------



  • 10.  RE: Content Navigator Plugin - how to set up a local development environment

    Posted 10/27/23 09:58 AM
    Edited by ANDY Choi 10/27/23 10:48 AM

    Hello Andreas,

    Isn't adding new features, actions, services, etc, also part of Java? As you may already know, you can debug JavaScript by loading ICN in debug mode (debug=true).

    You would need to restart ICN if you change the structure of Java classes by adding new classes, methods, etc.



    ------------------------------
    ANDY Choi
    ------------------------------