[Geoserver-devel] Maven profiles errorprone8 and IntelliJ

I started this email back in … May. I keep hoping to have some insight into how to make working with GeoServer not horrible in IntelliJ.

Our notes on how to work with IntelliJ are not holding up: https://docs.geoserver.org/stable/en/developer/quickstart/intellij.html

Since I am probably not the only one struggling I am collecting some notes here we can use to update the docs.

Trying things out:

  1. Compile once on the command line for the generated sources directories to be present. The option to “generate sources and update folders for all projects” does not seem to work consistently.

  2. Review the profiles, enabling any I plan to work on, and then use “reload all maven projects”.

  3. Build, by default this produces an internal java compiler error

  4. Install IntelliJ error prone plugin https://plugins.jetbrains.com/plugin/7349-error-prone-compiler

Allows to build projects using Error Prone Java compiler to catch common Java mistakes at compile-time. To use the compiler, go to ‘File | Settings/Preferences | Build, Execution, Deployment | Compiler | Java Compiler’ and select ‘Javac with error-prone’ in ‘Use compiler’ box.

  1. Changing compiler to "errorprone " allows build to proceed, but there are two failures:
    Mitigation:

  2. When working with Java 8 errorprone8 is selected by default, unselecting this profile and building again … still produces the failures above.

  3. Commenting out errorprone profiles from pom.xml and src/wcs1_1/pom.xml allow the system to compile, but the results does not run


Jody Garnett

It is also picking up some small things like:

But by far the biggest trouble is interaction with errorProne, which seems to engage even if the profile is not active.

···


Jody Garnett

Hi Jody,
I’m wondering if you’re using an outdated maven version, or it’s just IntelliJ that hasn’t caught up
with how activations with multiple conditions are supposed to work? See here:
https://issues.apache.org/jira/browse/MNG-4565

Oh, looks like it’s an IDEA bug indeed:
https://youtrack.jetbrains.com/issue/IDEA-177935

Commented on it. Maybe if many of us add votes or comments it will move faster… or, since
the community edition is an opens source project, maybe doing a PR.

Cheers
Andrea

On Mon, Jul 19, 2021 at 2:15 AM Jody Garnett <jody.garnett@anonymised.com> wrote:

I started this email back in … May. I keep hoping to have some insight into how to make working with GeoServer not horrible in IntelliJ.

Our notes on how to work with IntelliJ are not holding up: https://docs.geoserver.org/stable/en/developer/quickstart/intellij.html

Since I am probably not the only one struggling I am collecting some notes here we can use to update the docs.

Trying things out:

  1. Compile once on the command line for the generated sources directories to be present. The option to “generate sources and update folders for all projects” does not seem to work consistently.

  2. Review the profiles, enabling any I plan to work on, and then use “reload all maven projects”.

  3. Build, by default this produces an internal java compiler error

  4. Install IntelliJ error prone plugin https://plugins.jetbrains.com/plugin/7349-error-prone-compiler

Allows to build projects using Error Prone Java compiler to catch common Java mistakes at compile-time. To use the compiler, go to ‘File | Settings/Preferences | Build, Execution, Deployment | Compiler | Java Compiler’ and select ‘Javac with error-prone’ in ‘Use compiler’ box.

  1. Changing compiler to "errorprone " allows build to proceed, but there are two failures:
    Mitigation:

  2. When working with Java 8 errorprone8 is selected by default, unselecting this profile and building again … still produces the failures above.

  3. Commenting out errorprone profiles from pom.xml and src/wcs1_1/pom.xml allow the system to compile, but the results does not run


Jody Garnett


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

That specific IntelliJ issue is still open, but for some reason everything is working really well now after an update.

It is maddening, but I am glad to be back and productive.


Jody Garnett

On Mon, 19 Jul 2021 at 04:40, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi Jody,
I’m wondering if you’re using an outdated maven version, or it’s just IntelliJ that hasn’t caught up
with how activations with multiple conditions are supposed to work? See here:
https://issues.apache.org/jira/browse/MNG-4565

Oh, looks like it’s an IDEA bug indeed:
https://youtrack.jetbrains.com/issue/IDEA-177935

Commented on it. Maybe if many of us add votes or comments it will move faster… or, since
the community edition is an opens source project, maybe doing a PR.

Cheers
Andrea

On Mon, Jul 19, 2021 at 2:15 AM Jody Garnett <jody.garnett@anonymised.com> wrote:

I started this email back in … May. I keep hoping to have some insight into how to make working with GeoServer not horrible in IntelliJ.

Our notes on how to work with IntelliJ are not holding up: https://docs.geoserver.org/stable/en/developer/quickstart/intellij.html

Since I am probably not the only one struggling I am collecting some notes here we can use to update the docs.

Trying things out:

  1. Compile once on the command line for the generated sources directories to be present. The option to “generate sources and update folders for all projects” does not seem to work consistently.

  2. Review the profiles, enabling any I plan to work on, and then use “reload all maven projects”.

  3. Build, by default this produces an internal java compiler error

  4. Install IntelliJ error prone plugin https://plugins.jetbrains.com/plugin/7349-error-prone-compiler

Allows to build projects using Error Prone Java compiler to catch common Java mistakes at compile-time. To use the compiler, go to ‘File | Settings/Preferences | Build, Execution, Deployment | Compiler | Java Compiler’ and select ‘Javac with error-prone’ in ‘Use compiler’ box.

  1. Changing compiler to "errorprone " allows build to proceed, but there are two failures:
    Mitigation:

  2. When working with Java 8 errorprone8 is selected by default, unselecting this profile and building again … still produces the failures above.

  3. Commenting out errorprone profiles from pom.xml and src/wcs1_1/pom.xml allow the system to compile, but the results does not run


Jody Garnett


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel