Author: snjeza
Date: 2012-01-11 14:49:37 -0500 (Wed, 11 Jan 2012)
New Revision: 37776
Modified:
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
Log:
JBIDE-10616 Allow project examples to use examples in maven artifacts
Modified:
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2012-01-11
18:48:02 UTC (rev 37775)
+++
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2012-01-11
19:49:37 UTC (rev 37776)
@@ -174,6 +174,23 @@
return projectNames;
}
}
+ List<String> includedProjects = projectDescription
+ .getIncludedProjects();
+ if (includedProjects != null && includedProjects.size() > 0) {
+ List<MavenProjectInfo> newInfos = new ArrayList<MavenProjectInfo>();
+ for (MavenProjectInfo info : infos) {
+ Model model = info.getModel();
+ if (model != null && model.getArtifactId() != null
+ && model.getArtifactId().trim().length() > 0) {
+ for (String includedProject : includedProjects) {
+ if (model.getArtifactId().equals(includedProject)) {
+ newInfos.add(info);
+ }
+ }
+ }
+ }
+ infos = newInfos;
+ }
MavenPlugin.getProjectConfigurationManager().importProjects(infos,
importConfiguration, monitor);
for (MavenProjectInfo info : infos) {
Show replies by date