Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: =?UTF-8?Q?Peter_M=c3=bcller?= Newsgroups: de.comp.lang.java Subject: =?UTF-8?Q?[maven-plugin=c2=a8]_Arrays_einlesen?= Date: Sun, 15 Oct 2023 19:19:23 +0200 Lines: 62 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net EuwlsPUHwyIndVtkOavf2QyEPIju+QQxVC/Wnp+2gAaQyiarRk Cancel-Lock: sha1:FAFcnY7xR51pub9z+42oOz8QCVM= sha256:ag/lL0uQm0VPF8TmwTxpyDxlqNHf+JBvkLJXGRlaOPU= X-Mozilla-News-Host: news://news.individual.de User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Xref: csiph.com de.comp.lang.java:13460 Ich will ein Maven-Plugin verschiedene Werte einlesen. Der folgende Code gibt aber nur "ddd" aus. com.peter my-plugin 1.0.10-SNAPSHOT validate myGoal false aaa bbb ccc ddd Ich habe verschiedene Sachen ausprobiert, dies ist der aktuelle Code: @Mojo(name = "myGoal") public class MyPlugin extends AbstractMojo { // (property = "hellos") @Parameter(property = "hellos") private String[] hellos; @Override public void execute() throws MojoExecutionException { getLog().info("*****************************************"); getLog().info("*****************************************"); getLog().info("Hello, world."); for (String hello : hellos) { getLog().info(hello); } getLog().info("*****************************************"); getLog().info("*****************************************"); } public void setHellos(String[] hellos) { this.hellos = hellos; getLog().info("*****************************************"); getLog().info("*****************************************"); getLog().info("Hallo, Welt."); for (String hello : hellos) { getLog().info(hello); } getLog().info("*****************************************"); getLog().info("*****************************************"); } }