Groups | Search | Server Info | Login | Register
Groups > de.comp.lang.java > #13460
| From | Peter Müller <invalid@invalid.invalid> |
|---|---|
| Newsgroups | de.comp.lang.java |
| Subject | [maven-plugin¨] Arrays einlesen |
| Date | 2023-10-15 19:19 +0200 |
| Message-ID | <kp2l8sFagsuU1@mid.individual.net> (permalink) |
Ich will ein Maven-Plugin verschiedene Werte einlesen. Der folgende Code
gibt aber nur "ddd" aus.
<plugin>
<groupId>com.peter</groupId>
<artifactId>my-plugin</artifactId>
<version>1.0.10-SNAPSHOT</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>myGoal</goal>
</goals>
<inherited>false</inherited>
<configuration>
<hellos>
<hello>aaa</hello>
<hello>bbb</hello>
</hellos>
<hellos>ccc</hellos>
<hellos>ddd</hellos>
</configuration>
</execution>
</executions>
</plugin>
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("*****************************************");
}
}
Back to de.comp.lang.java | Previous | Next — Next in thread | Find similar
[maven-plugin¨] Arrays einlesen Peter Müller <invalid@invalid.invalid> - 2023-10-15 19:19 +0200
Re: [maven-plugin] Arrays einlesen Peter Müller <invalid@invalid.invalid> - 2023-10-15 19:37 +0200
Re: [maven-plugin¨] Arrays einlesen Patrick Roemer <sangamon@netcologne.de> - 2023-10-15 22:06 +0200
Re: [maven-plugin¨] Arrays einlesen Peter Müller <invalid@invalid.invalid> - 2023-10-15 22:44 +0200
Re: [maven-plugin¨] Arrays einlesen Patrick Roemer <sangamon@netcologne.de> - 2023-10-16 12:57 +0200
Re: [maven-plugin¨] Arrays einlesen Peter Müller <invalid@invalid.invalid> - 2023-10-16 14:31 +0200
Re: [maven-plugin¨] Arrays einlesen Patrick Roemer <sangamon@netcologne.de> - 2023-10-16 20:00 +0200
csiph-web