VSCode for iDempiere

566 views
Skip to first unread message

muri...@devcoffee.com.br

unread,
Aug 25, 2020, 8:11:45 AM8/25/20
to iDempiere
Hi community,

This is NOT A CALL for Eclipse replacement, but doing some tests we checked that we can use the VSCode editor to create a workspace for iDempiere development.

It's just an alternative, and some advantages are:

* easy adoption (good for marketing) for new developers that are more used to VSCode than Eclipse
* hability to package a fully functional ready to use container with an iDempiere development environment without the need of graphical environments and remote desktop software installed (we can use Code Server or Eclipse Theia for that)


Help and suggestions are welcome

Heng Sin Low

unread,
Aug 25, 2020, 8:31:27 AM8/25/20
to idem...@googlegroups.com
That's a nice alternative.

The biggest obstacle to use other IDE is the use of target platform. Would be a lot easier if we can get rid of that.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/10971006-ecdd-4857-a928-00a0ec6dfe15n%40googlegroups.com.

Chuck Boecking

unread,
Aug 25, 2020, 1:13:12 PM8/25/20
to iDempiere
Thank you for sharing!!

Orlando Curieles

unread,
Aug 25, 2020, 2:51:21 PM8/25/20
to iDempiere
I think is a great idea, eclipse is very complicated for beginners, thank you for share the instructions, I will try.

 Best Regards.

  Orlando.

yuanaw

unread,
Aug 26, 2020, 12:28:30 AM8/26/20
to iDempiere
Thank you for sharing 
A nice alternative to eclipse and will try it soon

Thanks

Heng Sin Low

unread,
Aug 26, 2020, 3:27:16 AM8/26/20
to idem...@googlegroups.com
it seems our wiki isn't index by Google ?

I try searching "Running iDempiere within VSCode" and "iDempiere VSCode" and the search result doesn't include https://wiki.idempiere.org/en/Running_iDempiere_within_VSCode


On Tue, Aug 25, 2020 at 8:11 PM muri...@devcoffee.com.br <muri...@devcoffee.com.br> wrote:
--

Heng Sin Low

unread,
Aug 26, 2020, 3:36:44 AM8/26/20
to idem...@googlegroups.com
Going through recent changes for wiki:

search works for "idempiere Marketing Committee Meeting 20200731" but doesn't for "idempiere Marketing Committee Meeting 20200807"

Carlos Antonio Ruiz Gomez

unread,
Aug 26, 2020, 9:50:49 AM8/26/20
to idem...@googlegroups.com
Google takes some time to index, I sent a request to the priority queue.

Regards,

Carlos Ruiz



El 26/08/20 a las 9:27 a. m., Heng Sin Low escribió:

Carlos Antonio Ruiz Gómez

unread,
Aug 27, 2020, 5:00:05 AM8/27/20
to iDempiere
It worked, the page is indexed now, however I'm getting strange results - you know, google has their way to "know" what you are looking for:

When I search "iDempiere VSCode" in google, in firefox or chromium - with or without session - with or without incognito - it doesn't show me the link to the wiki page.

The only way I managed to let google show me the wiki page as first result was with chromium incognito PLUS a VPN.

Regards,

Carlos Ruiz

Heng Sin Low

unread,
Aug 27, 2020, 5:28:50 AM8/27/20
to idem...@googlegroups.com
works for me too.

the strange thing is it still doesn't return anything for "idempiere Marketing Committee Meeting 20200807"

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.

Deepak Pansheriya (Logilite.com)

unread,
Aug 28, 2020, 12:24:00 AM8/28/20
to iDempiere
This will be good alternative. Thanks for sharing.

Pedro Rozo

unread,
Jan 25, 2023, 3:20:20 PM1/25/23
to iDempiere
Hi everyone ..

Playing with vscode adn Idempiere 9 and 10, i have a small issue to finish the complete build (from the IDE), Here a summary of my main two scenarios:

#1  Using a debian bulleye + JDK11 + maven (latest version) 

1.1 I got  idempiere 9 or 10 (tested both) (master branch from git) , bulding   just with maven (mvn verify) from the command line compilation and build (without eclipse) works flawlessly as expected  
1.2 I installed vscode (latest version)  inside the same server  
1.3  As indicated here:   https://wiki.idempiere.org/en/Running_iDempiere_within_VSCode    by Murillo and other contributors , I also  installed the suggested vscode extensions (java pack, osgi, eclipse pde),   
1.4 I opened the main folder of my idempiere environment from vscode,    (root folder where we have the pom file) .. vscode took some seconds and tried to recompiling with a lot of errors 
1,5 Then i looked to fix them reloading the target platform as indicated in the previos guide, but vscode did not perform anything (no rebuild, no recompile),  while something similar in eclipse trigger a rebuild and fix the errors .. here it is not triggering anything  

I tried with both files:   org.idempiere.p2.targetplatform -> org.idempiere.p2.targetplatform.target file,             and also  org.idempiere.p2.targetplatform -> org.idempiere.p2.repository.target 

I also tried cleaning and rebuilding the project manually but still the same errors are there 

Last attempt was to force/define the workspace JDK settings

{
    "java.configuration.runtimes": [
        {
                "name": "JavaSE-11",
                "path": "/usr/local/openjdk-11",
                "sources" : "/usr/local/openjdk-11/lib/src.zip",
                "javadoc" : "https://docs.oracle.com/en/java/javase/11/docs/api",
                "default":  true
         }
        ],
        "java.debug.settings.onBuildFailureProceed": true
             
}

A then clean and rebuild,  reload target platform but I got the same issue (error were not cleaned)

#2 same steps than before but using OpenJDK 17

I tried with JDK17)  because some forums describe that vscode with jdk11 does not work well some times  (some extensions)    but  (same issue where nothing is triggered reloading the target platform )

Any suggestions ?    I am also testing my config inside remote containers (debian and so on)  inside pure open source with podman (instead of docker) so you help will be great,  if we can fix it, this work can increase the productivity of our normal idempiere development a lot (not just from the vscode workflow, but also with the container/ssh integration from vscode to the remote idempiere environments) ..

Greetings 


Pedro R.

Heng Sin Low

unread,
Jan 25, 2023, 5:44:05 PM1/25/23
to idem...@googlegroups.com
Make sure you are using jdk11 and the latest eclipse pde extension for vscode. The last time I tried, it worked just fine.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.

muri...@devcoffee.com.br

unread,
Jan 27, 2023, 8:46:12 AM1/27/23
to iDempiere
Hi Pedro,

I quickly tried to set up an environment (master branch, with java 11 and the latest versions of vscode and extensions) and actually a dependency error in the org.idempiere.test plugin ended up appearing:

Captura de Tela 2023-01-27 às 10.43.37.png

I didn't have time to identify and solve it, however, when running install.app and server.product, just ignore these errors and you can use the system normally:
Captura de Tela 2023-01-27 às 10.43.37.png

as soon as I can it I will check these errors and, if necessary, send a correction

Orlando Curieles

unread,
Jan 27, 2023, 2:34:51 PM1/27/23
to idem...@googlegroups.com
Hi team, I am playing with vsCode and working very well, i have a question, how can you choose my custom plugins to run on vsCode ?

Thanks in advance.

  Orlando.

Pedro Rozo

unread,
Jan 28, 2023, 11:52:13 AM1/28/23
to iDempiere
Hi murillo and team 

It looks like my reply from Yesterday was removed by the server  .. so here my reply from Yesterday"   .. 

I found the source of the issues about why the results of my tests are a bit different,  I was using the ssh extension of vscode, where vscode is running on windows (client) and using ssh and the server side vscode ssh extension,  it performs everything in a remote (virtual machine or container) with ubuntu linux  (git, source, jdk, maven and so on it is running on the server side).

When I performed the same full test inside a completely isolated fedora linux with KDE, and vscode is running everything here (no ssh ).. the results are consistent with your observations (non- blocking asserts errors) and I was able to run the installer  .. (GUI)   thanks for your confirmation.    However the process is not 100% reliable, I notice sometime the build/reload platform trigger a massive amount of errors (in fedora works flawlessly as I mentioned before), and exactly the same process in ubuntu 22, JDK11, vs code and so on) fails  .. with the exact branch (release-10)  .....weird ... any ways I continue testing   

On the other side,   In theory, this vscode SSH extension should be exactly the same as running vscode on the same box for java projects (i tested simple java projects with maven and that works) .. but it seems is not 100% ready for OSGI plugins/dependencies  ... something is different during the compilation  and fails on that mode ...

BTW: vscode extension for container management from docker and podman did not work neither, (just in case someone else want to test) 

To be precise, I guess something in the classpath resolution of the OSGI plugins,  provided by the redhat extension pack for java, does not detect classpath libraries during the compilation on teh server side (ssh) as you can see here

It seems that something is still missing to resolve/download those libraries/classpath in the org.adempiere.base (and all the remaining plugins compilation  fails because of that)  

I also tried, from the JAVA PROJECTS TAB, org.adempiere.base  project, right click rebuild all, (after Reload Target platform) but no changes so far ..and I still have blocking errors that does not allow the install.app or main server project to run. when I used the ssh extension

image.png

Anyways, I would be great to have that running with the ssh, because that client (vscode)  and server model (ssh and vscode agent on the server/container) take advantage of the server power for builds and so on .. but it looks the behavior of these java extension for OSGI plugins (resolution of classpath) might not be ready yet. . if someone else want to test .. let me know I can share more about it later on .. so far this build is not working with vscode ssh or container extensions 

Thanks again for your feedback ..

Regards/

Pedro R.

Pedro Rozo

unread,
Jan 28, 2023, 11:57:23 AM1/28/23
to iDempiere
This is a very good question Orlando... My guess is that, having in mind we do not have the eclipse runtime configuration in vscode (to activate/deactivate plugins) , vscode  should have other way to config runtime configs  .. or perhaps a target platform file where we need to add the custom plugins ?   

@hensin or @Murillo

Have you tested this scenario ? or could you suggest the best approach to control/configure these runtime config for the OSGI plugins with vscode, ?

Regards 

Pedro R 

Pedro Rozo

unread,
Jan 28, 2023, 2:53:44 PM1/28/23
to iDempiere
Glad to share that finally vscode with JDK11 and idempiere release-10  is  working flawlessly in debian bullseye(tested previously with fedora) , both GUI distros (inside a full virtualbox appliance with a standard debian /gnome) but also inside wsl2 which is 10-20 times faster than virtualbox .. and use the client (vscode running in windows + an Xserver ) /server (extension running in debian's wsl2 container )  ..

Previous tests: Positive with fedora 36 (full with KDE inside virtualbox) , Negative with ubuntu 22 (full with gnome inside v.box) + it raises a lot of errors that Reloading the target platforms and rebuilding do not fix.

This hybrid development workflow allows to have both windows apps and pure debian linux integrated (all idempiere scripts and so on),   so we can use all the unix scripts and so on in windows with losing the windows apps required for people like me ) also improving the performance of the UI for vscode.

Combined with open source container management (podman) we would have Interesting features: 

-> The postgres engine can be located inside windows, debian (wsl2) or podman containers because they can share the same network,  allowing to switch quickly from db or IDE environment  without touching/affecting the hosts configuration (windows) to much ..

Last thought (common patterns for cloud native developers), instead of wsl2 you can use MacOS as host (vscode as client), and the similar flexibility can be used with podan containers for server development environment.

The key point now would be to add custom plugins (as Orlando mentioned before), to have a good (an perhaps more user friendly) alternative to Eclipse..., once I complet that step I plan to share a complementary document to @Murillo's guide

Regards,

Pedro R
vscode-wsl2-debian-gui.JPG

muri...@devcoffee.com.br

unread,
Jan 28, 2023, 3:13:13 PM1/28/23
to iDempiere
To run custom plugins you just need to save your working idempiere folder on vscode as an workspace, and after that import your custom plugins folder inside this workspace  ( https://code.visualstudio.com/docs/editor/multi-root-workspaces). Below an example using the kanban plugin as an custom plugin added to the core workspace:

Captura de Tela 2023-01-28 às 17.05.35.png

After importing the folder, you just need to edit your server.product.lauch file before run/debug PDE application to include your new plugin and define the start level:

Captura de Tela 2023-01-28 às 17.10.12.png

After that your plugins should get up and running and you can check details at the osgi console.

Heng Sin Low

unread,
Jan 28, 2023, 10:16:38 PM1/28/23
to idem...@googlegroups.com
To avoid problems with git versioning, don't edit server.product.launch, instead duplicate it and add in whatever plugin you need.

Pedro Rozo

unread,
Jan 30, 2023, 9:35:05 AM1/30/23
to iDempiere
Thanks Murillo and Hengsin,  to finalize the typical processes to deploy custom plugins with vscode, for old plugins where we did no use maven,   I used to use eclipse GUI wizard  (META-INF/manifest.mf   -> export wizard) to export the .jar file of that plugin, is there any work around to generate the jar file of each plugin without performing a full conversion to maven perhaps ?   

If not, what is the best example of up-to-date custom plugins with maven for idempiere 10  without adding unnecessary complexity ? (I understand some times is required a new target platform definition, some times not (just use the idempiere target platform) rigth ? 

Regards, 

Pedro Rozo

nilskm

unread,
Oct 8, 2024, 3:06:15 AM10/8/24
to iDempiere
Hi! 

So, about VS Code, are most people moving to VS Code or is eclipse still the way to go? 

Best regards

Nils

Heng Sin Low

unread,
Oct 8, 2024, 3:15:59 AM10/8/24
to idem...@googlegroups.com

nilskm

unread,
Oct 8, 2024, 3:48:07 AM10/8/24
to iDempiere
Thank you, I like clear and concise answers! :D 

Orlando Curieles

unread,
Oct 8, 2024, 7:52:17 AM10/8/24
to idem...@googlegroups.com
I would like to use IntelliJ, Eclipse is extremely slow and outdated

:)

Reply all
Reply to author
Forward
0 new messages