Skip to content

A non-deprecated path to set a compiler option #965

@eric-maziade-tac

Description

@eric-maziade-tac

New feature, improvement proposal

I'm using the latest 3.x maven compiler plugin.

I need a non-deprecated path to set a compiler option - in this case, -properties= to ecj.

We're currently using to pass the -properties= compiler argument to ecj - this is currently the only path to get a key=value compiler custom argument.

Since this method is deprecated, no paths are left to set free form arguments to the compiler (we can get to key=null or key=value=null - which does not work in this case)

I'm looking for a valid path to get the compiler argument in without challenging the decision to deprecate compilerArguments.

The solution I am proposing (for which I have a working solution, if the idea floats) - is to add to the Compiler Mojo.

If specified, that would get passed along as the -properties compiler argument. Its straightforward, but its specific for ecj, so I don't really like it all that much.

The more abstract designs I can think of really is just the same as either re-implementing compilerArguments with a different name... or just not deprecate it.

For context, we have a long list of ecj compiler properties that are reused and maintained through multiple projects and tools - it is, by far, the simplest method for us to manage these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions