Код: Выделить всё
-startup
plugins/org.eclipse.equinox.launcher_1.6.800.v20240513-1750.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.1000.v20240507-1834
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-
1530/jre/bin
-vmargs
-javaagent:C:/Users/me/eclipse/2024-03/lombok.jar
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclientjava
-Dosgi.requiredJavaVersion=21
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-Dosgi.dataAreaRequiresExplicitInit=true
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
-Declipse.e4.inject.javax.warning=false
-Dsun.java.command=Eclipse
-Xms256m
-Xmx2048m
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Djava.security.manager=allow
У меня есть ломбок .jar в моем базовом каталоге eclipse.
Я запускаю eclipse, дважды щелкнув файл eclipse.exe.
Вот простейший пример класса
Код: Выделить всё
@Builder
@AllArgsConstructor
@Data
public class ClientAccount {
@Size(max = 30)
private String accountName;
@Size(max = 50)
private String accountReference;
@NotNull
@Size(max = 32)
private String clientId;
@NotNull
@Size(max = 64)
private String clientSecretKey;
private LocalDateTime keyLastUpdated;
}

Если я запускаю maven в командной строке, он генерирует правильный код (чтобы убедиться в этом, я использовал декомпилятор)
Код: Выделить всё
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.time.LocalDateTime;
import lombok.Generated;
public class ClientAccount {
@Size(
max = 30
)
private String accountName;
@Size(
max = 50
)
private String accountReference;
@NotNull
@Size(
max = 32
)
private String clientId;
@NotNull
@Size(
max = 64
)
private String clientSecretKey;
private LocalDateTime keyLastUpdated;
@Generated
public static com.pancredit.equifax.model.ClientAccount.ClientAccountBuilder builder() {
return new com.pancredit.equifax.model.ClientAccount.ClientAccountBuilder();
}
@Generated
public ClientAccount(final String accountName, final String accountReference, final String clientId, final String clientSecretKey, final LocalDateTime keyLastUpdated) {
this.accountName = accountName;
this.accountReference = accountReference;
this.clientId = clientId;
this.clientSecretKey = clientSecretKey;
this.keyLastUpdated = keyLastUpdated;
}
@Generated
public String getAccountName() {
return this.accountName;
}
@Generated
public String getAccountReference() {
return this.accountReference;
}
@Generated
public String getClientId() {
return this.clientId;
}
@Generated
public String getClientSecretKey() {
return this.clientSecretKey;
}
@Generated
public LocalDateTime getKeyLastUpdated() {
return this.keyLastUpdated;
}
@Generated
public void setAccountName(final String accountName) {
this.accountName = accountName;
}
@Generated
public void setAccountReference(final String accountReference) {
this.accountReference = accountReference;
}
@Generated
public void setClientId(final String clientId) {
this.clientId = clientId;
}
@Generated
public void setClientSecretKey(final String clientSecretKey) {
this.clientSecretKey = clientSecretKey;
}
@Generated
public void setKeyLastUpdated(final LocalDateTime keyLastUpdated) {
this.keyLastUpdated = keyLastUpdated;
}

но везде, где бы он ни использовался, я получаю ошибки компиляции.
Метод getClientId() не определен для типа ClientAccount, строка 43. Проблема Java
или
Метод builder() не определен для типа ClientAccount, строка 12. Проблема Java
Подробнее здесь: https://stackoverflow.com/questions/786 ... bok-plugin
Мобильная версия