[jbosstools-commits] JBoss Tools SVN: r35761 - trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Oct 18 09:23:43 EDT 2011


Author: fbricon
Date: 2011-10-18 09:23:43 -0400 (Tue, 18 Oct 2011)
New Revision: 35761

Modified:
   trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java
Log:
Fix wrong logic populating archetype properties

Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java	2011-10-18 13:19:56 UTC (rev 35760)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java	2011-10-18 13:23:43 UTC (rev 35761)
@@ -73,12 +73,14 @@
 		//This really is an extra-safe guard, as I believe we'll probably always
 		//redefine all required properties in project-examples-maven-xxx.xml
 		Properties defaultRequiredProperties = getRequiredProperties(archetype);
-		Properties properties = new Properties(archetypeModel.getArchetypeProperties());
+		Properties properties = new Properties();
+		for (Object key : archetypeModel.getArchetypeProperties().keySet()) {
+			properties.put(key, archetypeModel.getArchetypeProperties().get(key));
+		}
+		
 		//Add remaining requiredProperties not defined by default in the example project
 		for (Object key : defaultRequiredProperties.keySet()) {
-			if (!properties.containsKey(key)) {
-				properties.put(key, defaultRequiredProperties.get(key));
-			}
+			properties.put(key, defaultRequiredProperties.get(key));
 		}
 		archetype.setProperties(properties);
 		setArchetype(archetype);



More information about the jbosstools-commits mailing list