Repository: vackosar/gitflow-incremental-builder (java)
Issue: Rename excludeTransitiveModulesPackagedAs to excludeDownstreamModulesPackagedAs
We use "downstream" everywhere else, not "transitive."
Pull request description: Issue #149: rename excludeTransitiveModulesPackagedAs -> excludeDownstream*
Resolves #149 

Patch:
diff --git a/README.md b/README.md
index ed3abd7..e1c1a38 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ This extension is **not limited to Git Flow setups!** The [extensive configurati
   - [gib.skipTestsForUpstreamModules](#gibskiptestsforupstreammodules)
   - [gib.argsForUpstreamModules](#gibargsforupstreammodules)
   - [gib.forceBuildModules](#gibforcebuildmodules)
-  - [gib.excludeTransitiveModulesPackagedAs](#gibexcludetransitivemodulespackagedas)
+  - [gib.excludeDownstreamModulesPackagedAs](#gibexcludedownstreammodulespackagedas)
 
 - [Explicitly selected projects](#explicitly-selected-projects)
 
@@ -281,7 +281,7 @@ Maven pom properties configuration with default values is below:
     <gib.skipTestsForUpstreamModules>false</gib.skipTestsForUpstreamModules>              <!-- or <gib.stfum>... -->
     <gib.argsForUpstreamModules></gib.argsForUpstreamModules>                             <!-- or <gib.afum>... -->
     <gib.forceBuildModules></gib.forceBuildModules>                                       <!-- or <gib.fbm>... -->
-    <gib.excludeTransitiveModulesPackagedAs></gib.excludeTransitiveModulesPackagedAs>     <!-- or <gib.etmpa>... -->
+    <gib.excludeDownstreamModulesPackagedAs></gib.excludeDownstreamModulesPackagedAs>     <!-- or <gib.edmpa>... -->
     <gib.failOnMissingGitDir>true</gib.failOnMissingGitDir>                               <!-- or <gib.fomgd>... -->
     <gib.failOnError>true</gib.failOnError>                                               <!-- or <gib.foe>... -->
 </properties>
@@ -460,13 +460,14 @@ Each of these modules is subject to `argsForUpstreamModules` and `skipTestsForUp
 
 This property has no effect in case `buildAll` is enabled.
 
-### gib.excludeTransitiveModulesPackagedAs
+### gib.excludeDownstreamModulesPackagedAs
 
 Defines the packaging (e.g. `jar`) of modules that depend on changed modules but shall not be built.
 
 One possible use case for this is mainly working in an IDE, fixing all compile errors etc. and then just quickly building the least possible amount of modules
 which are needed to (hot-)deploy the changes via `mvn` on the command line.
-In this scenario, by defining `-Dgib.excludeTransitiveModulesPackagedAs=jar,pom`, only the directly changed `jar` modules and the dependent `war` and/or `ear` deployment modules will be built. 
+In this scenario, by defining `-Dgib.excludeDownstreamModulesPackagedAs=jar,pom`, only the directly changed `jar` modules and the dependent `war` and/or `ear`
+deployment modules will be built.
 
 This property has no effect in case `buildAll` is enabled and an exclusion might be overriden by `gib.forceBuildModules`.
 
diff --git a/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/Configuration.java b/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/Configuration.java
index dabf8de..75a030a 100644
--- a/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/Configuration.java
+++ b/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/Configuration.java
@@ -49,7 +49,7 @@ public class Configuration {
     public final boolean skipTestsForUpstreamModules;
     public final Map<String, String> argsForUpstreamModules;
     public final List<Pattern> forceBuildModules;
-    public final List<String> excludeTransitiveModulesPackagedAs;
+    public final List<String> excludeDownstreamModulesPackagedAs;
 
     public final boolean failOnMissingGitDir;
     public final boolean failOnError;
@@ -87,7 +87,7 @@ public class Configuration {
                 .map(str -> compilePattern(str, Property.forceBuildModules))
                 .collect(collectingAndThen(toList(), Collections::unmodifiableList));
 
-        excludeTransitiveModulesPackagedAs = parseDelimited(Property.excludeTransitiveModulesPackagedAs.getValue(projectProperties), ",")
+        excludeDownstreamModulesPackagedAs = parseDelimited(Property.excludeDownstreamModulesPackagedAs.getValue(projectProperties), ",")
                 .collect(collectingAndThen(toList(), Collections::unmodifiableList));
 
         // error handling config
diff --git a/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemover.java b/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemover.java
index c23123a..4566abf 100644
--- a/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemover.java
+++ b/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemover.java
@@ -207,7 +207,7 @@ class UnchangedProjectsRemover {
         return Stream.concat(
             Stream.of(project),
             mavenSession.getProjectDependencyGraph().getDownstreamProjects(project, true).stream()
-                    .filter(proj -> !configProvider.get().excludeTransitiveModulesPackagedAs.contains(proj.getPackaging())));
+                    .filter(proj -> !configProvider.get().excludeDownstreamModulesPackagedAs.contains(proj.getPackaging())));
     }
 
     private Stream<MavenProject> streamUpstreamProjects(MavenProject project) {
diff --git a/src/main/java/com/vackosar/gitflowincrementalbuild/control/Property.java b/src/main/java/com/vackosar/gitflowincrementalbuild/control/Property.java
index 616b6bb..434f5f1 100644
--- a/src/main/java/com/vackosar/gitflowincrementalbuild/control/Property.java
+++ b/src/main/java/com/vackosar/gitflowincrementalbuild/control/Property.java
@@ -30,20 +30,15 @@ public enum Property {
     buildDownstream("always", "bd", true),
     buildUpstream("derived", "bu", true),
     buildUpstreamMode("changed", "bum"),
-    skipTestsForUpstreamModules("false", "stfum", true) {
-        @Override
-        public String deprecatedFullName() {
-            return PREFIX + "skipTestsForNotImpactedModules";
-        }
-    },
-    argsForUpstreamModules("", "afum") {
+    skipTestsForUpstreamModules("false", "stfum", true),
+    argsForUpstreamModules("", "afum"),
+    forceBuildModules("", "fbm"),
+    excludeDownstreamModulesPackagedAs("", "edmpa"){
         @Override
         public String deprecatedFullName() {
-            return PREFIX + "argsForNotImpactedModules";
+            return PREFIX + "excludeTransitiveModulesPackagedAs";
         }
     },
-    forceBuildModules("", "fbm"),
-    excludeTransitiveModulesPackagedAs("", "etmpa"),
 
     failOnMissingGitDir("true", "fomgd", true),
     failOnError("true", "foe", true);


Test patch:
diff --git a/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/ConfigurationTest.java b/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/ConfigurationTest.java
index e511780..4946691 100644
--- a/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/ConfigurationTest.java
+++ b/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/ConfigurationTest.java
@@ -107,23 +107,23 @@ public class ConfigurationTest {
         assertEquals(ImmutableMap.of("x", "true", "a", "false"), configuration.argsForUpstreamModules);
     }
 
-    // deprecated old name of argsForUpstreamModules
     @Test
-    public void argsForNotImpactedModules() {
-        System.setProperty(Property.argsForUpstreamModules.deprecatedFullName(), "x=true a=false");
+    public void excludeDownstreamModulesPackagedAs() {
+        System.setProperty(Property.excludeDownstreamModulesPackagedAs.fullName(), "ear,war");
 
         Configuration configuration = new Configuration.Provider(mavenSessionMock).get();
 
-        assertEquals(ImmutableMap.of("x", "true", "a", "false"), configuration.argsForUpstreamModules);
+        assertEquals(Arrays.asList("ear", "war"), configuration.excludeDownstreamModulesPackagedAs);
     }
 
+    // deprecated old name of excludeDownstreamModulesPackagedAs
     @Test
     public void excludeTransitiveModulesPackagedAs() {
-        System.setProperty(Property.excludeTransitiveModulesPackagedAs.fullName(), "ear,war");
+        System.setProperty(Property.excludeDownstreamModulesPackagedAs.deprecatedFullName(), "ear,war");
 
         Configuration configuration = new Configuration.Provider(mavenSessionMock).get();
 
-        assertEquals(Arrays.asList("ear", "war"), configuration.excludeTransitiveModulesPackagedAs);
+        assertEquals(Arrays.asList("ear", "war"), configuration.excludeDownstreamModulesPackagedAs);
     }
 
     @Test
diff --git a/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemoverTest.java b/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemoverTest.java
index a71f7fd..d944119 100644
--- a/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemoverTest.java
+++ b/src/test/java/com/vackosar/gitflowincrementalbuild/boundary/UnchangedProjectsRemoverTest.java
@@ -395,13 +395,13 @@ public class UnchangedProjectsRemoverTest extends BaseUnchangedProjectsRemoverTe
     }
 
     @Test
-    public void singleChanged_excludeTransitiveModulesPackagedAs_oneTransitive_oneExcluded() throws GitAPIException, IOException {
+    public void singleChanged_excludeDownstreamModulesPackagedAs_oneTransitive_oneExcluded() throws GitAPIException, IOException {
         MavenProject changedProjectMock = addModuleMock(AID_MODULE_B, true);
         MavenProject dependentWar = addModuleMock(AID_MODULE_B_DEP_WAR, false, "war");
 
         setDownstreamProjects(changedProjectMock, dependentWar);
 
-        projectProperties.put(Property.excludeTransitiveModulesPackagedAs.fullName(), "war");
+        projectProperties.put(Property.excludeDownstreamModulesPackagedAs.fullName(), "war");
 
         underTest.act();
 
@@ -410,14 +410,14 @@ public class UnchangedProjectsRemoverTest extends BaseUnchangedProjectsRemoverTe
     }
 
     @Test
-    public void singleChanged_excludeTransitiveModulesPackagedAs_twoTransitive_oneExcluded() throws GitAPIException, IOException {
+    public void singleChanged_excludeDownstreamModulesPackagedAs_twoTransitive_oneExcluded() throws GitAPIException, IOException {
         MavenProject changedProjectMock = addModuleMock(AID_MODULE_B, true);
         MavenProject dependentWar = addModuleMock(AID_MODULE_B_DEP_WAR, false, "war");
         MavenProject dependentJar = addModuleMock(AID_MODULE_B + "-dependent-jar", false);
 
         setDownstreamProjects(changedProjectMock, dependentWar, dependentJar);
 
-        projectProperties.put(Property.excludeTransitiveModulesPackagedAs.fullName(), "war");
+        projectProperties.put(Property.excludeDownstreamModulesPackagedAs.fullName(), "war");
 
         underTest.act();
 
@@ -426,14 +426,14 @@ public class UnchangedProjectsRemoverTest extends BaseUnchangedProjectsRemoverTe
     }
 
     @Test
-    public void singleChanged_excludeTransitiveModulesPackagedAs_twoTransitive_twoExcluded() throws GitAPIException, IOException {
+    public void singleChanged_excludeDownstreamModulesPackagedAs_twoTransitive_twoExcluded() throws GitAPIException, IOException {
         MavenProject changedProjectMock = addModuleMock(AID_MODULE_B, true);
         MavenProject dependentWar = addModuleMock(AID_MODULE_B_DEP_WAR, false, "war");
         MavenProject dependentEar = addModuleMock(AID_MODULE_B + "-dependent-ear", false, "ear");
 
         setDownstreamProjects(changedProjectMock, dependentWar, dependentEar);
 
-        projectProperties.put(Property.excludeTransitiveModulesPackagedAs.fullName(), "war,ear");
+        projectProperties.put(Property.excludeDownstreamModulesPackagedAs.fullName(), "war,ear");
 
         underTest.act();
 
@@ -442,13 +442,13 @@ public class UnchangedProjectsRemoverTest extends BaseUnchangedProjectsRemoverTe
     }
 
     @Test
-    public void singleChanged_excludeTransitiveModulesPackagedAs_oneTransitive_buildAll() throws GitAPIException, IOException {
+    public void singleChanged_excludeDownstreamModulesPackagedAs_oneTransitive_buildAll() throws GitAPIException, IOException {
         MavenProject changedProjectMock = addModuleMock(AID_MODULE_B, true);
         MavenProject dependentWar = addModuleMock(AID_MODULE_B_DEP_WAR, false, "war");
 
         setDownstreamProjects(changedProjectMock, dependentWar);
 
-        projectProperties.put(Property.excludeTransitiveModulesPackagedAs.fullName(), "war");
+        projectProperties.put(Property.excludeDownstreamModulesPackagedAs.fullName(), "war");
         projectProperties.put(Property.buildAll.fullName(), "true");
 
         underTest.act();
@@ -458,13 +458,13 @@ public class UnchangedProjectsRemoverTest extends BaseUnchangedProjectsRemoverTe
     }
 
     @Test
-    public void singleChanged_excludeTransitiveModulesPackagedAs_oneTransitive_forceBuildModules() throws GitAPIException, IOException {
+    public void singleChanged_excludeDownstreamModulesPackagedAs_oneTransitive_forceBuildModules() throws GitAPIException, IOException {
         MavenProject changedProjectMock = addModuleMock(AID_MODULE_B, true);
         MavenProject dependentWar = addModuleMock(AID_MODULE_B_DEP_WAR, false, "war");
 
         setDownstreamProjects(changedProjectMock, dependentWar);
 
-        projectProperties.put(Property.excludeTransitiveModulesPackagedAs.fullName(), "war");
+        projectProperties.put(Property.excludeDownstreamModulesPackagedAs.fullName(), "war");
         projectProperties.put(Property.forceBuildModules.fullName(), dependentWar.getArtifactId());
 
         underTest.act();
@@ -474,13 +474,13 @@ public class UnchangedProjectsRemoverTest extends BaseUnchangedProjectsRemoverTe
     }
 
     @Test
-    public void twoChanged_excludeTransitiveModulesPackagedAs_changedNotExcluded() throws GitAPIException, IOException {
+    public void twoChanged_excludeDownstreamModulesPackagedAs_changedNotExcluded() throws GitAPIException, IOException {
         MavenProject changedProjectMock = addModuleMock(AID_MODULE_B, true);
         MavenProject dependentWar = addModuleMock(AID_MODULE_B_DEP_WAR, true, "war");
 
         // war module is changed, must be retained!
 
-        projectProperties.put(Property.excludeTransitiveModulesPackagedAs.fullName(), "war");
+        projectProperties.put(Property.excludeDownstreamModulesPackagedAs.fullName(), "war");
 
         underTest.act();
 
@@ -489,14 +489,14 @@ public class UnchangedProjectsRemoverTest extends BaseUnchangedProjectsRemoverTe
     }
 
     @Test
-    public void twoChanged_excludeTransitiveModulesPackagedAs_changedNotExcluded_transitive() throws GitAPIException, IOException {
+    public void twoChanged_excludeDownstreamModulesPackagedAs_changedNotExcluded_transitive() throws GitAPIException, IOException {
         MavenProject changedProjectMock = addModuleMock(AID_MODULE_B, true);
         MavenProject dependentWar = addModuleMock(AID_MODULE_B_DEP_WAR, true, "war");
 
         // war module is changed, must be retained - even if depending on changedProjectMock!
         setDownstreamProjects(changedProjectMock, dependentWar);
 
-        projectProperties.put(Property.excludeTransitiveModulesPackagedAs.fullName(), "war");
+        projectProperties.put(Property.excludeDownstreamModulesPackagedAs.fullName(), "war");
 
         underTest.act();