"Place the java source code with lombok annotations in src/main/lombok
(instead of src/main/java)."
Why src/main/lombok and not src/main/java? Is there a way to configure
maven-lombok-plugin to process src/main/java instead of src/main/
lombok?
Hth,
Nick Stolwijk
[1] http://awhitford.github.com/lombok.maven/maven-lombok-plugin/delombok-mojo.html#sourceDirectory
> --
> You received this message because you are subscribed to the Google
> Groups group for http://projectlombok.org/
>
> To post to this group, send email to project...@googlegroups.com
> To unsubscribe from this group, send email to
> project-lombo...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/project-lombok?hl=en
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>0.10.4.0</version>
<executions>
<execution>
<id>delombok</id>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
<configuration>
<verbose>true</verbose>
<sourceDirectory>${project.basedir}/src/main/java</
sourceDirectory>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</plugin>
When I invoke maven, I get a lot of "duplicate class" errors. It is
because maven is trying to build from src/main/java and target/
generated-sources/delombok at the same time. Do you know if there is a
way to change the source directory, so that the compile:compile goal
will only use the generated sources directory?
I've tried using build-helper-maven-plugin. There is the option for
adding sources (which happens automatically in lombok-maven-plugin I
suppose), but there is no option for removing sources.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-
sources/delombok</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Best regards,
Dawid Chodura
On 6 Gru, 14:10, Nick Stolwijk <nick.stolw...@gmail.com> wrote:
> You can adjust this directory by overriding the sourceDirectory
> parameter[1]. The rationale behind this split up is unknown to me.
>
> Hth,
>
> Nick Stolwijk
>
> [1]http://awhitford.github.com/lombok.maven/maven-lombok-plugin/delombok...
>
>
>
>
>
>
>
> On Mon, Dec 5, 2011 at 10:30 PM, tafit3 <dawid.chod...@gmail.com> wrote:
> > If I want to delombok the source code I need to move it from src/main/
> > java to src/main/lombok. It is stated on the bottom of the page
> >http://awhitford.github.com/lombok.maven/maven-lombok-plugin/
>
> > "Place the java source code with lombok annotations in src/main/lombok
> > (instead of src/main/java)."
>
> > Why src/main/lombok and not src/main/java? Is there a way to configure
> > maven-lombok-plugin to process src/main/java instead of src/main/
> > lombok?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups group forhttp://projectlombok.org/
Groups group for http://projectlombok.org/