Lombok still doesn't work compile-time

This commit is contained in:
Norbi Peti 2017-07-04 03:14:10 +02:00
parent a401eaac11
commit 9d0525571b
2 changed files with 46 additions and 3 deletions

33
pom.xml
View file

@ -11,7 +11,8 @@
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<build> <build>
<sourceDirectory>src/main/java</sourceDirectory> <sourceDirectory>target/generated-sources/delombok</sourceDirectory>
<testSourceDirectory>target/generated-test-sources/delombok</testSourceDirectory>
<resources> <resources>
<resource> <resource>
<directory>src</directory> <directory>src</directory>
@ -89,6 +90,36 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.16.16.0</version>
<executions>
<execution>
<id>delombok</id>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
<configuration>
<addOutputDirectory>false</addOutputDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
<verbose>true</verbose>
</configuration>
</execution>
<execution>
<id>test-delombok</id>
<phase>generate-test-sources</phase>
<goals>
<goal>testDelombok</goal>
</goals>
<configuration>
<addOutputDirectory>false</addOutputDirectory>
<sourceDirectory>src/test/java</sourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

View file

@ -1,6 +1,15 @@
package buttondevteam.discordplugin; package buttondevteam.discordplugin;
import org.bukkit.entity.*; import java.util.Set;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionAttachment;
import org.bukkit.permissions.PermissionAttachmentInfo;
import org.bukkit.plugin.Plugin;
import org.bukkit.projectiles.ProjectileSource; import org.bukkit.projectiles.ProjectileSource;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -9,7 +18,10 @@ import sx.blah.discord.handle.obj.IChannel;
import sx.blah.discord.handle.obj.IUser; import sx.blah.discord.handle.obj.IUser;
public class DiscordPlayerSender extends DiscordSenderBase implements Player { public class DiscordPlayerSender extends DiscordSenderBase implements Player {
private @Delegate(excludes = ProjectileSource.class) Player player;
protected @Delegate(excludes = ProjectileSource.class) Player player;
// protected @Delegate(excludes = { ProjectileSource.class, Permissible.class }) Player player;
// protected @Delegate(excludes = { ProjectileSource.class, CommandSender.class }) Player player;
public DiscordPlayerSender(IUser user, IChannel channel, Player player) { public DiscordPlayerSender(IUser user, IChannel channel, Player player) {
super(user, channel); super(user, channel);