Skip to content

Duplication of "--enable-preview" tag in pom.xml #279

Open
@subhash-arabhi

Description

@subhash-arabhi

Error

The enable-preview tag that has been added using extension quick fix is getting duplicated on subsequent operations such as run main, create tests etc

Steps to Reproduce

  1. Create an new Maven project or use an existing one
  2. Use a preview feature, If you are using jdk22 you can use the below code
public class Test6 {
    Test6(){
        int i = 1;
        super();
    }
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
} 
  1. Use QuickAction Enable Preview to add CompilerArgs to your pom file
  2. Now Run Main or Create Tests to see another enable preview arg added to your pom file
  3. It only happens when you use QuickAction, No issues found If you manually edit your pom

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions