lsp4j icon indicating copy to clipboard operation
lsp4j copied to clipboard

Modernize build system (Gradle -> Maven, no more p2 sites)

Open jonahgraham opened this issue 3 months ago • 4 comments

In various comments recently the active contributors have made mention that this is the only project they use that is Gradle based. That is the case for me too, and additionally I am frustrated because every time I try to do something build related I feel like I have to jump through too many hoops.

Here are some of the things that would be (would have been) simpler for me to do if we used maven which seems more standard.

  • Getting JPMS back in before 1.0.0 #894
  • Handle migration with OSSRH done #887
  • Add JMH #929
  • Resolve warnings due to settings #923
  • Resolve warnings due to settings part 2 #936
  • Update japicmp

In addition, using standard Maven technology it should make the project more accessible for other Java developers as Maven is the standard. For example:

  • no longer need to learn a new command line
  • no special setup steps like https://github.com/eclipse-lsp4j/lsp4j/blob/main/CONTRIBUTING.md#eclipse
  • more support available

In addition, in the past we had to make a p2 site for LSP4J so that LSP4E and other Eclipse Plug-in consumers could consume them. But now Eclipse Plug-in consumers can widely support importing from maven coordinates. This means most of the stuff in releng can be removed. This will also simplify publishing releases and snapshots as we won't need the extra steps in deploy-build script.

Before I invest time to progress this I would appreciate a +1 (or a -1 if you think this is a bad idea)

jonahgraham avatar Nov 25 '25 00:11 jonahgraham

In addition, using standard Maven technology it should make the project more accessible for other Java developers as Maven is the standard. For example:

This is really subjective. In my slice of the world all java projects I work/used to work with are gradle-based. And I had literally the same problem when my team mates decided to convert maven project to gradle because it's more simple and convenient (for us).

Gradle adds a flexibility to the build process but I would say that in the most cases in modern gradle ecosystem if you want to write imperative gradle code you do something wrong. As any tool it has its own learning curve and after some time you know a set of plugins or a way to configure projects that suits your needs and works best for you.

But in the end maintainers have their own experience. Working in the eclipse ecosystem also adds complexities. As an end user of the library I would like to have maintainers not struggling with their daily operations. And if maven is a build system that works better for you in the case of lsp4j, then for sure you should migrate/simplify your build scripts using maven.

With <3 from 1c-syntax community.

nixel2007 avatar Nov 25 '25 03:11 nixel2007

For Eclipse IDE-related projects, the standard is clearly Maven+Tycho, not Gradle. That explains why most of Eclipse committers/contributors have limited experience with Gradle. And, given that producing p2 sites is no longer a requirement, it looks like LSP4J could move to plain Maven (rather than Maven+Tycho as was once proposed in #542), which should simplify releng even more. Therefore, despite it being a significant effort obviously, I think that moving to Maven would make much sense strategically for LSP4J.

pisv avatar Nov 25 '25 11:11 pisv

Thanks @nixel2007 and @pisv for your input - I'm going to assume no other people weigh in here.

I plan to do the migration in the coming days. Watch this space.

jonahgraham avatar Dec 01 '25 02:12 jonahgraham

Watch this space.

Keep watching - still in my queue.

If someone is super motivated to work on this before I get there, go ahead and do that - please just leave a comment here first so that we don't duplicate effort too much.

jonahgraham avatar Dec 08 '25 14:12 jonahgraham