NetXMS Support Forum

English Support => General Support => Topic started by: Sch.Donat on August 02, 2020, 03:10:29 AM

Title: Building NetXMS Console
Post by: Sch.Donat on August 02, 2020, 03:10:29 AM
Hi!

I'm trying to build the NetXMS Console without success. I'm following the wiki (https://wiki.netxms.org/wiki/How_to_setup_Eclipse/RAP), I tried with eclipse 4.15 and 4.16 (even 4.11) on linux. I get the following error:

/home/**********/Projects/workspace-4.16_3.2/.metadata/.plugins/org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/package.org.eclipse.pde.container.feature.linux.gtk.x86_64.xml:90: The following error occurred while executing this line:
/home/**********/Projects/workspace-4.16_3.2/.metadata/.plugins/org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/package.org.eclipse.pde.container.feature.linux.gtk.x86_64.xml:2624: The following error occurred while executing this line:
/home/**********/Downloads/eclipse-4.16/plugins/org.eclipse.pde.build_3.10.800.v20200410-1419/scripts/genericTargets.xml:241: A problem occured while invoking the director.
The following error occurred while executing this line:
/home/**********/Projects/workspace-4.16_3.2/.metadata/.plugins/org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/package.org.eclipse.pde.container.feature.linux.gtk.x86_64.xml:2624: The following error occurred while executing this line:
/home/**********/Downloads/eclipse-4.16/plugins/org.eclipse.pde.build_3.10.800.v20200410-1419/scripts/genericTargets.xml:241: A problem occured while invoking the director.


After some searching I enabled logging in genericTargets.xml, which gives me the following:

Property "p2.director.log" has not been set
[p2.director] Installing org.netxms.ui.eclipse.console.product 3.4.0.
[p2.director] Installation failed.
[p2.director] Cannot complete the install because one or more required items could not be found.
[p2.director] Software being installed: org.netxms.ui.eclipse.console.product 3.4.0
[p2.director] Missing requirement: Graphical Editing Framework Zest Core 2.0.7 (org.netxms.gef4.zest.core 2.0.7) requires 'osgi.bundle; org.eclipse.rap.rwt 3.4.0' but it could not be found
[p2.director] Cannot satisfy dependency:
[p2.director] From: org.netxms.ui.eclipse.console.product 3.4.0
[p2.director] To: org.eclipse.equinox.p2.iu; org.netxms.gef4.zest.core [2.0.7,2.0.7]
[p2.director] Cannot complete the install because one or more required items could not be found.
[p2.director] Software being installed: org.netxms.ui.eclipse.console.product 3.4.0
[p2.director] Missing requirement: Graphical Editing Framework Zest Core 2.0.7 (org.netxms.gef4.zest.core 2.0.7) requires 'osgi.bundle; org.eclipse.rap.rwt 3.4.0' but it could not be found
[p2.director] Cannot satisfy dependency:
A problem occured while invoking the director.
runDirector:  duration 0 seconds


The missing bundle is provided by RAP 3.12 software, so it shouldn't be missing.

Any help, or tips how to solve this would be much appretiated.

Regards
Title: Re: Building NetXMS Console
Post by: Filipp Sudanov on August 03, 2020, 12:40:09 PM
Hi!

Management console build is currently done using maven. Eclipse is used for running console during development, but not for preparing builds.
The following commands should be run in project's folder to build desktop version:

export PATH=/opt/apache-maven-3.6.2/bin:$PATH

jenv local 11.0                                                                             

mvn -f src/java/netxms-eclipse/pom.xml -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:update-pom -Pconsole

mvn -f src/java/netxms-eclipse/pom.xml clean package -Pconsole -Dtycho.disableP2Mirrors=true

Builds will be in src/java/netxms-eclipse/Product/target/products/
Title: Re: Building NetXMS Console
Post by: Sch.Donat on August 03, 2020, 01:58:00 PM
Hi!

Thanks for the reply! I tried your instruction (I don't have jenv, so I skipped that, but I'm using openjdk version 11.0.7). org.netxms.ui.eclipse.charts 3.4.0 fails to build with a lot of error messages like this: The import org.swtchart.ISeries cannot be resolvedbut swtchart 0.7.15 builds successfully and is a required bundle in the MANIFEST.MF file. I tried installing swtchart into local maven repo, but that didn't help. I don't know what am I missing.

Regards
Title: Re: Building NetXMS Console
Post by: Sch.Donat on August 03, 2020, 05:28:14 PM
Hi!

I was able to package the stable 3.2 version (which is what I need for the moment) on Windows with your instructions. I haven't tried 3.4 yet.
Is there a difference between Linux and Windows maven? Or maybe openjdk is not good in this case.

Either way, thanks for your help! And I realized that this question was duplicate (don't why I couldn't find the other one earlier), sorry about that.

Regards
Title: Re: Building NetXMS Console
Post by: Filipp Sudanov on August 04, 2020, 04:18:21 PM
There should be no difference in maven or java vs openjdk.
Title: Re: Building NetXMS Console
Post by: Sch.Donat on August 04, 2020, 07:08:43 PM
I successfully packaged it on Linux as well (I had to remove the .m2 repo from my home dir).

But I have another problem: I added a few lines to the about text part in src\java\netxms-eclipse\Product\nxmc.product file, but it doesn't show up in the console after I run maven. If I change the version in src\java\netxms-eclipse\Product\nxmc.product file, in first maven command it shows the new version, but in the second maven command it's the old version again (and it's gotten changed back in pom file as well). I'm guessing maven cached it somewhere, but deleting the .m2 directory in my home didn't have.

I don't what am I doing wrong, I'm guessing there are other maven caches?
Title: Re: Building NetXMS Console
Post by: Sch.Donat on August 04, 2020, 11:39:31 PM
I figured out. I had to edit the src/java/netxms-eclipse/Core/plugin.xml file (the aboutText property).