Jaroslav Záruba
Jaroslav Záruba

Reputation: 4876

net.ltgt.gwt.maven:gwt-maven-plugin with Lombok

I am looking into migrating to net.ltgt.gwt.maven:gwt-maven-plugin, and I use Lombok. So in my projects I had to have following in the plugin configuration:

<extraJvmArgs>-javaagent:${org.projectlombok:lombok:jar}=ECJ</extraJvmArgs>

How does one achieve that with net.ltgt.gwt.maven:gwt-maven-plugin?

Upvotes: 3

Views: 583

Answers (2)

Lorenzo Vannucchi
Lorenzo Vannucchi

Reputation: 389

Or if you add dependency with maven in *-client module:

<dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.12</version>
      <scope>provided</scope>
</dependency>

You have to edit pom.xml in this way in plugins settings:

<plugin>
      <groupId>net.ltgt.gwt.maven</groupId>
      <artifactId>gwt-maven-plugin</artifactId>
      <version>1.0.0</version>
      <extensions>true</extensions>
      <configuration>
        <sourceLevel>1.8</sourceLevel>
        <failOnError>true</failOnError>
        <jvmArgs>
          <arg>-javaagent:${settings.localRepository}/org/projectlombok/lombok/1.18.12/lombok-1.18.12.jar=ECJ</arg>
        </jvmArgs>
      </configuration>
 </plugin>

Upvotes: 0

Thomas Broyer
Thomas Broyer

Reputation: 64541

Use jvmArgs:

<jvmArgs>
  <arg>-javaagent:${org.projectlombok:lombok:jar}=ECJ</arg>
</jvmArgs>

Upvotes: 5

Related Questions