We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
///usr/bin/env jbang "$0" "$@" ; exit $? //JAVA 17+ //FILES application.properties=aggregatePom.properties //DEPS io.quarkus:quarkus-bom:${quarkus.version:2.11.2.Final}@pom //DEPS io.quarkus:quarkus-picocli //DEPS io.quarkus:quarkus-qute import static java.nio.file.Files.*; import java.io.IOException; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.util.ArrayList; import java.util.List; import javax.enterprise.context.Dependent; import javax.inject.Inject; import org.jboss.logging.Logger; import io.quarkus.qute.Qute; import picocli.CommandLine; import picocli.CommandLine.Option; @CommandLine.Command(description = "Generate an aggregate POM file for direct sub-folders", version = "aggregatePom 0.1") public class main implements Runnable { @Option(names = { "--groupId" }, description = "The groupId", defaultValue = "org.acme") String groupId; @Option(names = { "--artifactId" }, description = "The artifactId", defaultValue = "artifactId") String artifactId; @Option(names = { "--version" }, description = "The version", defaultValue = "999-SNAPSHOT") String version; @Inject Logger log; String pomTemplate = """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <groupId>{GroupId}</groupId> <artifactId>{ArtifactId}</artifactId> <version>{Version}</version> <packaging>pom</packaging> <modelVersion>4.0.0</modelVersion> <modules> {#each Modules} <module>{it}</module> {/each} </modules> </project> """; @Override public void run() { try { modules = new ArrayList<>(); list(Path.of(".")).forEach(p -> { if (isDirectory(p) && exists(p.resolve("pom.xml"))) { modules.add(p.getFileName().toString()); } }); writeString(Path.of("pom.xml"), Qute.fmt(pomTemplate) .data("GroupId", groupId) .data("ArtifactId", artifactId) .data("Version", version) .data("Modules", modules).render(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); } catch (IOException e) { log.fatal(e); } } }
try do organize imports and see the static import being removed.
2 issues:
The text was updated successfully, but these errors were encountered:
possibly duplicate of #2294
Sorry, something went wrong.
Does it happen with or without jbang-vscode?
This issue can't be reproduced in Eclipse. eclipse-jdtls/eclipse.jdt.ls#2396 fixes it.
The issue described at #2294 can be reproduced in Eclipse and IntelliJ IDEA
should not remove static imports
You can add
"java.sources.organizeImports.staticStarThreshold": 1
if it was to remove static imports; at least fix the existing references to them.
"java.sources.organizeImports.staticStarThreshold": 99
snjeza
Successfully merging a pull request may close this issue.
try do organize imports and see the static import being removed.
2 issues:
The text was updated successfully, but these errors were encountered: