Skip to content

The Unified and Autonomous Development Platform

Only check missed dependencies on plugin projects.

robinbe94392ba5b6
diff --git a/archetype.artifact/src/main/resources/archetype-resources/pom.xml b/archetype.artifact/src/main/resources/archetype-resources/pom.xml
index 2d801f1e74..8b315557c3 100644
--- a/archetype.artifact/src/main/resources/archetype-resources/pom.xml
+++ b/archetype.artifact/src/main/resources/archetype-resources/pom.xml
@@ -5,7 +5,7 @@
<groupId>$groupId</groupId>
#end
<artifactId>$artifactId</artifactId>
-#if ($version != "1.0.0")
+#if ($version != "1.0.1")
<version>$version</version>
#end
<parent>
diff --git a/archetype.plugin/src/main/resources/archetype-resources/pom.xml b/archetype.plugin/src/main/resources/archetype-resources/pom.xml
index 2bdbc42e6d..6454252e8a 100644
--- a/archetype.plugin/src/main/resources/archetype-resources/pom.xml
+++ b/archetype.plugin/src/main/resources/archetype-resources/pom.xml
@@ -5,7 +5,7 @@
<groupId>${groupId}</groupId>
#end
<artifactId>${artifactId}</artifactId>
-#if (${version} != "1.0.0")
+#if (${version} != "1.0.1")
<version>${version}</version>
#end
<parent>
diff --git a/archetype.plugin/src/main/resources/archetype-resources/src/main/resources/archetype-resource/pom.xml b/archetype.plugin/src/main/resources/archetype-resources/src/main/resources/archetype-resource/pom.xml
index 3bdf060c6d..61908808ea 100644
--- a/archetype.plugin/src/main/resources/archetype-resources/src/main/resources/archetype-resource/pom.xml
+++ b/archetype.plugin/src/main/resources/archetype-resources/src/main/resources/archetype-resource/pom.xml
@@ -5,7 +5,7 @@
<groupId>\${groupId}</groupId>
#end
<artifactId>\${artifactId}</artifactId>
-#if (\${version} != "1.0.0")
+#if (\${version} != "1.0.1")
<version>\${version}</version>
#end
<parent>
diff --git a/archetype.product/src/main/resources/archetype-resources/pom.xml b/archetype.product/src/main/resources/archetype-resources/pom.xml
index d8657c5179..930a6c24b9 100644
--- a/archetype.product/src/main/resources/archetype-resources/pom.xml
+++ b/archetype.product/src/main/resources/archetype-resources/pom.xml
@@ -143,7 +143,7 @@
<executables>bin/*.sh, bin/wrapper-*</executables>
<bootstrapClass>com.pmease.commons.bootstrap.Bootstrap</bootstrapClass>
<moduleClass>${package}.PluginModule</moduleClass>
- <aggregation>false</aggregation>
+ <aggregation>true</aggregation>
</properties>
</project>
\ No newline at end of file
diff --git a/parent.general/pom.xml b/parent.general/pom.xml
index ec0ac413e6..62c0c06b02 100644
--- a/parent.general/pom.xml
+++ b/parent.general/pom.xml
@@ -156,7 +156,7 @@
<plugin>
<groupId>com.pmease</groupId>
<artifactId>plugin.maven</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1</version>
<executions>
<execution>
<id>check-project-dependencies</id>
diff --git a/plugin.maven/pom.xml b/plugin.maven/pom.xml
index cb083a6d42..5f11b96ada 100644
--- a/plugin.maven/pom.xml
+++ b/plugin.maven/pom.xml
@@ -4,7 +4,7 @@
<groupId>com.pmease</groupId>
<artifactId>plugin.maven</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1</version>
<packaging>maven-plugin</packaging>
<prerequisites>
diff --git a/plugin.maven/src/main/java/com/pmease/plugin/maven/CheckProjectDependenciesMojo.java b/plugin.maven/src/main/java/com/pmease/plugin/maven/CheckProjectDependenciesMojo.java
index 0ecb206ad4..d5a8aea317 100644
--- a/plugin.maven/src/main/java/com/pmease/plugin/maven/CheckProjectDependenciesMojo.java
+++ b/plugin.maven/src/main/java/com/pmease/plugin/maven/CheckProjectDependenciesMojo.java
@@ -74,9 +74,21 @@ public class CheckProjectDependenciesMojo extends AbstractMojo {
dependencyKeys.add(artifact.getGroupId() + "." + artifact.getArtifactId());
}
- for (Map.Entry<String, String> entry : projectVersions.entrySet()) {
- if (!dependencyKeys.contains(entry.getKey()))
- errors.add("Missed dependency to project '" + entry.getKey() + "'.");
+ Set<String> pluginKeys = new HashSet<String>();
+ for (File projectDir : workspaceDir.listFiles()) {
+ if (!projectDir.equals(project.getBasedir())) {
+ File propsFile = new File(projectDir, "target/classes/"
+ + PluginConstants.PLUGIN_PROPERTY_FILE);
+ if (propsFile.exists()) {
+ Properties props = PluginUtils.loadProperties(propsFile);
+ pluginKeys.add(props.getProperty("id"));
+ }
+ }
+ }
+
+ for (String pluginKey: pluginKeys) {
+ if (!dependencyKeys.contains(pluginKey))
+ errors.add("Missed dependency to project '" + pluginKey + "'.");
}
Map<String, Set<String>> artifactVersions = new HashMap<String, Set<String>>();