[jira] (ARCHETYPE-274) Conditionally include or exclude a file from archetype during generation

2012-02-25 Thread Marcelo Romulo Fernandes (JIRA)

[ 
https://jira.codehaus.org/browse/ARCHETYPE-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=292761#comment-292761
 ] 

Marcelo Romulo Fernandes commented on ARCHETYPE-274:


My suggestion: create "conditionalProperty" attribute/tag of fileSet. 
It should contain the name of property whose value should be "true"/"y" in 
order to process the fileSet.
If "conditionalProperty" is empty, the fileSet should be processed.

Using the example above, could be somethink like:


  src/main/java
  
**/ExtraSupport.java
  


> Conditionally include or exclude a file from archetype during generation
> 
>
> Key: ARCHETYPE-274
> URL: https://jira.codehaus.org/browse/ARCHETYPE-274
> Project: Maven Archetype
>  Issue Type: Improvement
>  Components: Generator
>Affects Versions: 2.0-alpha-4
>Reporter: Dan Allen
>
> I would like to be able to control which files are placed into the generated 
> project based on the value of a property that is defined during 
> archetype:generate. For instance, I forsee the following prompt:
> Define value for groupId: : com.example
> Define value for artifactId: : myproject
> Define value for package:  com.example: :
> Define value for extraSupport: : y
> Based on the value of extraSupport, I want to include (or not include) a file 
> in the generated project. If the user does not want the extra support, I 
> don't want to clutter up the generated project with unnecessary files.
> It's all about customization of the project based on what the developer 
> intends to use. While I could create a whole other archetype, sometimes the 
> changes are so slight that it would be easier to include/exclude a file.
> Is there a way to control this behavior using the archetype-metadata.xml 
> descriptor?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (ARCHETYPE-196) Default value like property 'version' at 2.0-alpha-3

2008-07-17 Thread Marcelo Romulo Fernandes (JIRA)
Default value like property 'version' at 2.0-alpha-3


 Key: ARCHETYPE-196
 URL: http://jira.codehaus.org/browse/ARCHETYPE-196
 Project: Maven Archetype
  Issue Type: New Feature
 Environment: windows xp sp2; java sun 1.6.0_07; maven 2.0.9
Reporter: Marcelo Romulo Fernandes


 If I define a requiredProperty at archetype-metadata.xml without a 
defaultValue (example: ), the value of the 
property is prompted when I run mvn 
org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate. If I 
input nothing (just hit an enter), the process fails.
 If I define a requiredProperty at archetype-metadata.xml with a 
defaultValue (example: ), when I run mvn 
org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate the value 
of the property is not prompted anymore and process assumes the defaultValue.
 I wish a way to the command mvn 
org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate prompt a 
value to the requiredProperty and a default value is assumed if nothing is 
typed (just hit an enter). At version 2.0-alpha-3, this happens with property 
'version': if i just press enter, the process assumes the value '1.0-SNAPSHOT'.


-- 
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




[jira] Created: (ARCHETYPE-195) Enumeration of allowed values of requiredProperty

2008-07-17 Thread Marcelo Romulo Fernandes (JIRA)
Enumeration of allowed values of requiredProperty
-

 Key: ARCHETYPE-195
 URL: http://jira.codehaus.org/browse/ARCHETYPE-195
 Project: Maven Archetype
  Issue Type: New Feature
 Environment: windows xp sp2; java sun 1.6.0_07; maven2.0.9 
Reporter: Marcelo Romulo Fernandes


Can we define an enumeration of allowed values of requiredProperty?
Example: 
requiredProperty: databaseType 
enumeration: {postgresql, mysql, oracle}

-- 
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




[jira] Created: (ARCHETYPE-194) conditional requiredProperty

2008-07-17 Thread Marcelo Romulo Fernandes (JIRA)
conditional requiredProperty


 Key: ARCHETYPE-194
 URL: http://jira.codehaus.org/browse/ARCHETYPE-194
 Project: Maven Archetype
  Issue Type: New Feature
  Components: Generator
Affects Versions: 2.0-alpha-3
 Environment: windows xp sp2; java sun 1.6.0_07; maven2.0.9
Reporter: Marcelo Romulo Fernandes


Can we ask the user for some requiredProperties depending of the values of 
others requiredProperties? Do we have conditional requiredProperty?

-- 
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




[jira] Created: (ARCHETYPE-193) Description of requiredProperty

2008-07-17 Thread Marcelo Romulo Fernandes (JIRA)
Description of requiredProperty
---

 Key: ARCHETYPE-193
 URL: http://jira.codehaus.org/browse/ARCHETYPE-193
 Project: Maven Archetype
  Issue Type: New Feature
  Components: Generator
Affects Versions: 2.0-alpha-3
 Environment: windows xp sp2; java sun 1.6.0_07; maven 2.0.9
Reporter: Marcelo Romulo Fernandes


Could we show a description of the requiredProperty to the user instead of 
their name at generator prompt? 
I think it could be more user friendly! I have to provide an extra readme.txt 
to explain how to use the requiredProperties.

-- 
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




[jira] Created: (ARCHETYPE-149) archetype generate -DarchetypeRepository not working

2008-03-14 Thread Marcelo Romulo Fernandes (JIRA)
archetype generate -DarchetypeRepository not working


 Key: ARCHETYPE-149
 URL: http://jira.codehaus.org/browse/ARCHETYPE-149
 Project: Maven Archetype
  Issue Type: Bug
  Components: Generator
Affects Versions: 2.0-alpha-2
 Environment: windows xp sp2, java sun 1.6.0_05, maven 8
Reporter: Marcelo Romulo Fernandes
Priority: Critical
 Attachments: message.txt.txt

 When I try to run:

mvn -X archetype:generate 
-DarchetypeRepository=http://basegen.sourceforge.net/maven2 
-DarchetypeGroupId=org.basegen.plugins 
-DarchetypeArtifactId=basegenapp-maven-plugin -DarchetypeVersion=3.0.0

Why the basegen plugin isnĀ“t downloaded? The option -DarchetypeRepository 
working? This command only works when i install this plugin locally!

Thanks in advance.

-- 
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