You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Donszelmann, Mark" <du...@slac.stanford.edu> on 2005/10/20 09:10:26 UTC

[M2] Does maven initialize sub-tags in the configuration?

Hi

I specify the following configuration in pom.xml for one of my plugins:

<configuration>
	<a>
		<debug>true</debug>
	</a>
	<b>
		<verbose>false</verbose>
	</b>
</configuration>

in the plugin I have both classes A.class and B.class with respective boolean
fields "debug" and "verbose".

Maven 2 seems to fill these fields appropriately from the pom.xml. So far so good.

Now, the documentation for these fiels in A and B seems to be ignored. That is,
specifying "default-value" or "expression" does not work. I assume this is because
these classes are not Mojos, but just helper classes. Is there a way to get them
processed by the plugin-description system, without them being Mojos?

When generating documentation for the Mojo (mvn site:site) only the Mojo and
its direct fields A and B are documented, but not the content of the classes A and B. 
Is that correct? Am I missing something, or would this be useful, for the configuration
of the more complicated Mojos?

Regards
Mark Donszelmann

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [M2] Does maven initialize sub-tags in the configuration?

Posted by Brett Porter <br...@apache.org>.
Hi Mark,

This behavious is as is currently expected. Currently a and b would be 
considered to be types, so expressions, etc inside the types would not 
be evaluated. However, I think we should link to the javadoc from the 
plugin documentation.

What is your exact use case for having complex configuration where a and 
b are not reusable types?

- Brett

Donszelmann, Mark wrote:
> Hi
> 
> I specify the following configuration in pom.xml for one of my plugins:
> 
> <configuration>
> 	<a>
> 		<debug>true</debug>
> 	</a>
> 	<b>
> 		<verbose>false</verbose>
> 	</b>
> </configuration>
> 
> in the plugin I have both classes A.class and B.class with respective boolean
> fields "debug" and "verbose".
> 
> Maven 2 seems to fill these fields appropriately from the pom.xml. So far so good.
> 
> Now, the documentation for these fiels in A and B seems to be ignored. That is,
> specifying "default-value" or "expression" does not work. I assume this is because
> these classes are not Mojos, but just helper classes. Is there a way to get them
> processed by the plugin-description system, without them being Mojos?
> 
> When generating documentation for the Mojo (mvn site:site) only the Mojo and
> its direct fields A and B are documented, but not the content of the classes A and B. 
> Is that correct? Am I missing something, or would this be useful, for the configuration
> of the more complicated Mojos?
> 
> Regards
> Mark Donszelmann
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org