[ http://jira.codehaus.org/browse/ARCHETYPE-58?page=all ]

Mikko Koponen updated ARCHETYPE-58:
-----------------------------------

    Attachment: ARCHETYPE-58-a-slightly-different-kind-of-patch

Some sort of source formatting has been applied to the 
"properties_and_conditions.patch". 

As this makes it waaayyy difficult to apply any more patches 
"ARCHETYPE-58-a-slightly-different-kind-of-patch" is a patch where the custom 
property code has been inserted into the 1.0-alpha4 -version without source 
formatting. As the conditional property logic apparently wasn't fully 
implemented in the "properties_and_conditions.patch", none of that is in this 
patch.

> Allows for additional properties in velocity context and also conditional 
> processing of source, resources etc
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-58
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-58
>             Project: Maven Archetype
>          Issue Type: New Feature
>          Components: Generator
>    Affects Versions: 1.0-alpha-4
>            Reporter: Philip Dodds
>         Attachments: ARCHETYPE-58-a-slightly-different-kind-of-patch, 
> properties_and_conditions.patch
>
>
> Need the ability to add new properties to the velocity context during the 
> processing of an archetype through archetype-core.
> Also need the ability to determine whether to optionally include a resource, 
> source etc based on a conditional test on a property.
> Consider for example adding properties and optional tests as follows:
> <archetype>
>   <id>servicemix-se</id>
>   <sources>
>     <conditional>
>       <source>src/main/java/MyBootstrap.java</source>
>         <propertyEqual property="generateBootstrap" value="true"/>
>     </conditional>
>     <source>src/main/java/MyComponent.java</source>
>     <source>src/main/java/MyEndpoint.java</source>
>   </sources>
>   <testSources>
>     <source>src/test/java/MySpringComponentTest.java</source>
>   </testSources>
>   <testResources>
>     <resource>src/test/resources/spring.xml</resource>
>     <resource>src/test/resources/log4j.properties</resource>
>   </testResources>
>   <contextProperties>
>       <property name="pluginRepositoryId" value="apache.snapshots"/>
>       <property name="pluginRepositoryName" value="Maven Central Plugins 
> Development Repository"/>
>       <property name="pluginRepositoryUrl" 
> value="http://cvs.apache.org/maven-snapshot-repository"/>                  
>       <property name="pluginRepositorySnapshotsEnabled" value="true"/>
>       <property name="pluginRepositoryReleasesEnabled" value="true"/>
>       <property name="generateBootstrap" value="false"/>
>   </contextProperties>
> </archetype>
> The example above shows that we want to be able to gather additional 
> properties and then in the sources conditionally determine whether we want to 
> include it.
> I will attach a patch that already implements the contextProperties as shown 
> above and has 80% of the code in place for the conditional inclusion of files.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to