You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2009/06/08 03:55:11 UTC
POM verbosity
So, I have a plugin, I need several executions of it, and each one
looks like what follows. It's getting long in a hurry. I could make
this a little more concise by using a map instead of a Properties in
my plugin, bu there's still a lot of it, and I'll have, oh, 16 of
these by the time I'm done. Is there any mechanism I'm missing (other
than deciding that driving this process via Maven is using a
dictionary to swat gnats)?
<profile>
<id>enModel</id>
<build>
<defaultGoal>compile</defaultGoal>
<plugins>
<plugin>
<groupId>com.basistech</groupId>
<artifactId>maven-rex2009task-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>en</id>
<goals>
<goal>rex2009tasks</goal>
</goals>
<configuration>
<taskFile>src/main/tasks/en.xml</taskFile>
<taskBeanNames>
<taskBeanName>tasks</taskBeanName>
</taskBeanNames>
<properties>
<property>
<name>trainCorpus</name>
<value>${en.trainCorpus}</value>
</property>
<property>
<name>testCorpus</name>
<value>${en.testCorpus}</value>
</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: POM verbosity
Posted by Anders Hammar <an...@hammar.net>.
Yes, you could define the configuation (tag) outside of the executions
(tag). Then you only need it once.
/Anders
On Mon, Jun 8, 2009 at 03:55, Benson Margulies<bi...@gmail.com> wrote:
> So, I have a plugin, I need several executions of it, and each one
> looks like what follows. It's getting long in a hurry. I could make
> this a little more concise by using a map instead of a Properties in
> my plugin, bu there's still a lot of it, and I'll have, oh, 16 of
> these by the time I'm done. Is there any mechanism I'm missing (other
> than deciding that driving this process via Maven is using a
> dictionary to swat gnats)?
>
> <profile>
> <id>enModel</id>
> <build>
> <defaultGoal>compile</defaultGoal>
> <plugins>
> <plugin>
> <groupId>com.basistech</groupId>
> <artifactId>maven-rex2009task-plugin</artifactId>
> <version>${project.version}</version>
> <executions>
> <execution>
> <id>en</id>
> <goals>
> <goal>rex2009tasks</goal>
> </goals>
> <configuration>
> <taskFile>src/main/tasks/en.xml</taskFile>
> <taskBeanNames>
> <taskBeanName>tasks</taskBeanName>
> </taskBeanNames>
> <properties>
> <property>
> <name>trainCorpus</name>
> <value>${en.trainCorpus}</value>
> </property>
> <property>
> <name>testCorpus</name>
> <value>${en.testCorpus}</value>
> </property>
> </properties>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </profile>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: POM verbosity
Posted by Martin Höller <ma...@xss.co.at>.
On Monday 08 June 2009 Benson Margulies wrote:
> So, I have a plugin, I need several executions of it, and each one
> looks like what follows. It's getting long in a hurry.
Don't know if this is an option for you, but have a look at the
maven-yamlpom-plugin [0]. The plugin allows specifying the POM in YAML
which is less verbose than XML.
hth,
- martin
[0] http://wiki.github.com/mrdon/maven-yamlpom-plugin
Re: POM verbosity
Posted by Benson Margulies <bi...@gmail.com>.
I know, I know. I plead terminal sloth.
On Thu, Jun 18, 2009 at 6:27 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> It's your plugin, change it to a Map and then convert the map to a
> Properties
>
> 2009/6/18 Benson Margulies <bi...@gmail.com>:
> > It can't, sadly. The underlying property in the plugin is a
> > Properties, not a Map. Properties won't take that syntax. I've opened
> > a JIRA asking for it.
> >
> > On Thu, Jun 18, 2009 at 5:07 PM, Zac Thompson<za...@gmail.com>
> wrote:
> >>> <properties>
> >>> <property>
> >>> <name>trainCorpus</name>
> >>>
> <value>${en.trainCorpus}</value>
> >>> </property>
> >>> <property>
> >>> <name>testCorpus</name>
> >>>
> <value>${en.testCorpus}</value>
> >>> </property>
> >>> </properties>
> >>
> >> It's a small improvement, but I think the above could be written as:
> >>
> >> <properties>
> >>
> >> <trainCorpus>${en.trainCorpus}</trainCorpus>
> >>
> <testCorpus>${en.testCorpus}</testCorpus>
> >> </properties>
> >>
> >> Zac
> >>
> >
>
Re: POM verbosity
Posted by Stephen Connolly <st...@gmail.com>.
It's your plugin, change it to a Map and then convert the map to a Properties
2009/6/18 Benson Margulies <bi...@gmail.com>:
> It can't, sadly. The underlying property in the plugin is a
> Properties, not a Map. Properties won't take that syntax. I've opened
> a JIRA asking for it.
>
> On Thu, Jun 18, 2009 at 5:07 PM, Zac Thompson<za...@gmail.com> wrote:
>>> <properties>
>>> <property>
>>> <name>trainCorpus</name>
>>> <value>${en.trainCorpus}</value>
>>> </property>
>>> <property>
>>> <name>testCorpus</name>
>>> <value>${en.testCorpus}</value>
>>> </property>
>>> </properties>
>>
>> It's a small improvement, but I think the above could be written as:
>>
>> <properties>
>>
>> <trainCorpus>${en.trainCorpus}</trainCorpus>
>> <testCorpus>${en.testCorpus}</testCorpus>
>> </properties>
>>
>> Zac
>>
>
Re: POM verbosity
Posted by Benson Margulies <bi...@gmail.com>.
It can't, sadly. The underlying property in the plugin is a
Properties, not a Map. Properties won't take that syntax. I've opened
a JIRA asking for it.
On Thu, Jun 18, 2009 at 5:07 PM, Zac Thompson<za...@gmail.com> wrote:
>> <properties>
>> <property>
>> <name>trainCorpus</name>
>> <value>${en.trainCorpus}</value>
>> </property>
>> <property>
>> <name>testCorpus</name>
>> <value>${en.testCorpus}</value>
>> </property>
>> </properties>
>
> It's a small improvement, but I think the above could be written as:
>
> <properties>
>
> <trainCorpus>${en.trainCorpus}</trainCorpus>
> <testCorpus>${en.testCorpus}</testCorpus>
> </properties>
>
> Zac
>
Re: POM verbosity
Posted by Zac Thompson <za...@gmail.com>.
> <properties>
> <property>
> <name>trainCorpus</name>
> <value>${en.trainCorpus}</value>
> </property>
> <property>
> <name>testCorpus</name>
> <value>${en.testCorpus}</value>
> </property>
> </properties>
It's a small improvement, but I think the above could be written as:
<properties>
<trainCorpus>${en.trainCorpus}</trainCorpus>
<testCorpus>${en.testCorpus}</testCorpus>
</properties>
Zac