diff --git a/src/main/resources/hudson/plugins/promoted_builds/Promotion/index.jelly b/promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/Promotion/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/Promotion/index.jelly
rename to promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/Promotion/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/Promotion/index_es_ES.properties b/promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/Promotion/index_es_ES.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/Promotion/index_es_ES.properties
rename to promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/Promotion/index_es_ES.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-assignedLabelString.html b/promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-assignedLabelString.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-assignedLabelString.html
rename to promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-assignedLabelString.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-isVisible.html b/promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-isVisible.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-isVisible.html
rename to promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/help-isVisible.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/process-config.jelly b/promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/process-config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/process-config.jelly
rename to promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/process-config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionTrigger/config.jelly b/promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionTrigger/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionTrigger/config.jelly
rename to promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionTrigger/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PublisherImpl/config.jelly b/promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PublisherImpl/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PublisherImpl/config.jelly
rename to promoted-builds-plugin/src/main/resources/hudson/plugins/promoted_builds/PublisherImpl/config.jelly
diff --git a/src/main/resources/index.jelly b/promoted-builds-plugin/src/main/resources/index.jelly
similarity index 100%
rename from src/main/resources/index.jelly
rename to promoted-builds-plugin/src/main/resources/index.jelly
diff --git a/src/main/webapp/help.html b/promoted-builds-plugin/src/main/webapp/help.html
similarity index 100%
rename from src/main/webapp/help.html
rename to promoted-builds-plugin/src/main/webapp/help.html
diff --git a/src/test/java/hudson/plugins/promoted_builds/ConfigurationDoCheckTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/ConfigurationDoCheckTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/ConfigurationDoCheckTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/ConfigurationDoCheckTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/KeepBuildForeverActionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/KeepBuildForeverActionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/KeepBuildForeverActionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/KeepBuildForeverActionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumnTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumnTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumnTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumnTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotedBuildActionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotedBuildActionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotedBuildActionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotedBuildActionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotedBuildRebuildParameterProviderTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotedBuildRebuildParameterProviderTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotedBuildRebuildParameterProviderTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotedBuildRebuildParameterProviderTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotionBuildWrapperTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionBuildWrapperTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotionBuildWrapperTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionBuildWrapperTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotionConfigFilesTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionConfigFilesTest.java
similarity index 97%
rename from src/test/java/hudson/plugins/promoted_builds/PromotionConfigFilesTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionConfigFilesTest.java
index 34dddbae..521799b0 100644
--- a/src/test/java/hudson/plugins/promoted_builds/PromotionConfigFilesTest.java
+++ b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionConfigFilesTest.java
@@ -1,55 +1,55 @@
-package hudson.plugins.promoted_builds;
-
-import hudson.model.FreeStyleProject;
-import hudson.model.Result;
-import hudson.plugins.promoted_builds.conditions.SelfPromotionCondition;
-import org.jenkinsci.plugins.configfiles.GlobalConfigFiles;
-import org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep;
-import org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile;
-import org.jenkinsci.plugins.configfiles.custom.CustomConfig;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.jvnet.hudson.test.JenkinsRule;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-
-public class PromotionConfigFilesTest {
-
- private static final String CONFIG_ID = "ConfigFilesTestId";
-
- @Rule
- public JenkinsRule r = new JenkinsRule();
-
- @Test
- public void testPromotionConfigFilesAreRetrievedFromParentJobContext() throws Exception {
- GlobalConfigFiles store = r.getInstance().getExtensionList(GlobalConfigFiles.class).get(GlobalConfigFiles.class);
- Assert.assertTrue(store.getConfigs().isEmpty());
-
- CustomConfig config = new CustomConfig(CONFIG_ID, "name", "comment", "content");
- store.save(config);
-
- FreeStyleProject p = r.createFreeStyleProject();
-
- // promote if the downstream passes
- JobPropertyImpl promotion = new JobPropertyImpl(p);
- p.addProperty(promotion);
-
- PromotionProcess promo1 = promotion.addProcess("promo1");
- promo1.conditions.add(new SelfPromotionCondition(false));
- List managedFiles = new ArrayList<>();
- managedFiles.add(new ManagedFile(CONFIG_ID));
- promo1.getBuildSteps().add(new ConfigFileBuildStep(managedFiles));
-
- r.assertBuildStatusSuccess(p.scheduleBuild2(0));
- // internally, the promotion is still an asynchronous process. It just happens
- // right away after the build is complete.
- Thread.sleep(1000);
-
- Promotion pb = promo1.getBuilds().iterator().next();
- assertEquals(Result.SUCCESS, pb.getResult());
- }
-}
+package hudson.plugins.promoted_builds;
+
+import hudson.model.FreeStyleProject;
+import hudson.model.Result;
+import hudson.plugins.promoted_builds.conditions.SelfPromotionCondition;
+import org.jenkinsci.plugins.configfiles.GlobalConfigFiles;
+import org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep;
+import org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile;
+import org.jenkinsci.plugins.configfiles.custom.CustomConfig;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.jvnet.hudson.test.JenkinsRule;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+
+public class PromotionConfigFilesTest {
+
+ private static final String CONFIG_ID = "ConfigFilesTestId";
+
+ @Rule
+ public JenkinsRule r = new JenkinsRule();
+
+ @Test
+ public void testPromotionConfigFilesAreRetrievedFromParentJobContext() throws Exception {
+ GlobalConfigFiles store = r.getInstance().getExtensionList(GlobalConfigFiles.class).get(GlobalConfigFiles.class);
+ Assert.assertTrue(store.getConfigs().isEmpty());
+
+ CustomConfig config = new CustomConfig(CONFIG_ID, "name", "comment", "content");
+ store.save(config);
+
+ FreeStyleProject p = r.createFreeStyleProject();
+
+ // promote if the downstream passes
+ JobPropertyImpl promotion = new JobPropertyImpl(p);
+ p.addProperty(promotion);
+
+ PromotionProcess promo1 = promotion.addProcess("promo1");
+ promo1.conditions.add(new SelfPromotionCondition(false));
+ List managedFiles = new ArrayList<>();
+ managedFiles.add(new ManagedFile(CONFIG_ID));
+ promo1.getBuildSteps().add(new ConfigFileBuildStep(managedFiles));
+
+ r.assertBuildStatusSuccess(p.scheduleBuild2(0));
+ // internally, the promotion is still an asynchronous process. It just happens
+ // right away after the build is complete.
+ Thread.sleep(1000);
+
+ Promotion pb = promo1.getBuilds().iterator().next();
+ assertEquals(Result.SUCCESS, pb.getResult());
+ }
+}
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotionEnvironmentVariablesTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionEnvironmentVariablesTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotionEnvironmentVariablesTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionEnvironmentVariablesTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotionProcessTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionProcessTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotionProcessTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionProcessTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotionRebuildValidatorTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionRebuildValidatorTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotionRebuildValidatorTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionRebuildValidatorTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotionTargetActionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionTargetActionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotionTargetActionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionTargetActionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/PromotionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/PromotionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/PromotionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/RemoteApiTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/RemoteApiTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/RemoteApiTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/RemoteApiTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/TestingFrameworkTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/TestingFrameworkTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/TestingFrameworkTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/TestingFrameworkTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/DownstreamPassConditionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/DownstreamPassConditionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/DownstreamPassConditionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/DownstreamPassConditionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/FixedResultBuilder.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/FixedResultBuilder.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/FixedResultBuilder.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/FixedResultBuilder.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/GroovyConditionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/GroovyConditionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/GroovyConditionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/GroovyConditionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionBug22005.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionBug22005.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionBug22005.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionBug22005.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/ManualConditionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/DownstreamPassConditionInheritanceTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/DownstreamPassConditionInheritanceTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/DownstreamPassConditionInheritanceTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/DownstreamPassConditionInheritanceTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/ManualConditionInheritanceTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/ManualConditionInheritanceTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/ManualConditionInheritanceTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/ManualConditionInheritanceTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/SelfPromotionInheritanceTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/SelfPromotionInheritanceTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/SelfPromotionInheritanceTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/conditions/inheritance/SelfPromotionInheritanceTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectRule.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectRule.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectRule.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectRule.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectsPair.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectsPair.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectsPair.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/inheritance/helpers/InheritanceProjectsPair.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslManualConditionConverterTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslManualConditionConverterTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslManualConditionConverterTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslManualConditionConverterTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcessConverterTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcessConverterTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcessConverterTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcessConverterTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/PromotionsDslContextExtensionTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/PromotionsDslContextExtensionTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/PromotionsDslContextExtensionTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/integrations/jobdsl/PromotionsDslContextExtensionTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacroTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacroTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacroTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacroTest.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/util/ItemListenerHelper.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/util/ItemListenerHelper.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/util/ItemListenerHelper.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/util/ItemListenerHelper.java
diff --git a/src/test/java/hudson/plugins/promoted_builds/util/ItemPathResolverTest.java b/promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/util/ItemPathResolverTest.java
similarity index 100%
rename from src/test/java/hudson/plugins/promoted_builds/util/ItemPathResolverTest.java
rename to promoted-builds-plugin/src/test/java/hudson/plugins/promoted_builds/util/ItemPathResolverTest.java
diff --git a/src/test/resources/buildwrapper-example-dsl.groovy b/promoted-builds-plugin/src/test/resources/buildwrapper-example-dsl.groovy
similarity index 100%
rename from src/test/resources/buildwrapper-example-dsl.groovy
rename to promoted-builds-plugin/src/test/resources/buildwrapper-example-dsl.groovy
diff --git a/src/test/resources/complex-example-dsl.groovy b/promoted-builds-plugin/src/test/resources/complex-example-dsl.groovy
similarity index 100%
rename from src/test/resources/complex-example-dsl.groovy
rename to promoted-builds-plugin/src/test/resources/complex-example-dsl.groovy
diff --git a/src/test/resources/copyartifacts-example-dsl.groovy b/promoted-builds-plugin/src/test/resources/copyartifacts-example-dsl.groovy
similarity index 100%
rename from src/test/resources/copyartifacts-example-dsl.groovy
rename to promoted-builds-plugin/src/test/resources/copyartifacts-example-dsl.groovy
diff --git a/src/test/resources/example-dsl.groovy b/promoted-builds-plugin/src/test/resources/example-dsl.groovy
similarity index 100%
rename from src/test/resources/example-dsl.groovy
rename to promoted-builds-plugin/src/test/resources/example-dsl.groovy
diff --git a/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml b/promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml
similarity index 100%
rename from src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml
rename to promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml
diff --git a/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml b/promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml
similarity index 100%
rename from src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml
rename to promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml
diff --git a/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml b/promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml
similarity index 100%
rename from src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml
rename to promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml
diff --git a/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml b/promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml
similarity index 100%
rename from src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml
rename to promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml
diff --git a/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml b/promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml
similarity index 100%
rename from src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml
rename to promoted-builds-plugin/src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml
diff --git a/promotion-api-plugin/pom.xml b/promotion-api-plugin/pom.xml
new file mode 100644
index 00000000..bc58d866
--- /dev/null
+++ b/promotion-api-plugin/pom.xml
@@ -0,0 +1,194 @@
+
+ 4.0.0
+
+
+ org.jenkins-ci.plugins
+ plugin
+ 3.45
+
+
+ io.jenkins.plugins
+ promotion-api
+ 3.6-SNAPSHOT
+ hpi
+
+ Jenkins Promotion API plugin
+ Provides shared functionality for artifact and build promotion management in Jenkins
+ https://github.com/jenkinsci/promoted-builds-plugin
+
+
+
+ 2.121.1
+ 8
+ Max
+ 3.0
+
+
+
+
+ kohsuke
+ Kohsuke Kawaguchi
+
+
+ petehayes
+ Peter Hayes
+
+
+ oleg_nenashev
+ Oleg Nenashev
+
+
+
+
+ scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git
+ scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git
+ https://github.com/jenkinsci/${project.artifactId}-plugin
+ HEAD
+
+
+
+ MIT
+ http://opensource.org/licenses/MIT
+
+
+
+
+
+ repo.jenkins-ci.org
+ https://repo.jenkins-ci.org/public/
+
+
+
+
+ repo.jenkins-ci.org
+ https://repo.jenkins-ci.org/public/
+
+
+
+
+
+ org.jenkins-ci.main
+ maven-plugin
+ 3.2
+ true
+
+
+ commons-net
+ commons-net
+
+
+
+
+ org.jenkins-ci.plugins
+ apache-httpcomponents-client-4-api
+ 4.5.3-2.1
+
+
+ org.jenkins-ci.plugins
+ junit
+ 1.20
+
+
+ com.sonyericsson.hudson.plugins.rebuild
+ rebuild
+ 1.31
+ true
+
+
+ org.jenkins-ci.plugins
+ structs
+ 1.19
+
+
+ org.hamcrest
+ hamcrest-core
+ 2.1
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+ org.jenkins-ci.plugins
+ token-macro
+ 2.0
+ true
+
+
+ org.jenkins-ci.plugins
+ credentials
+ 2.1.4
+
+
+ org.jenkins-ci.plugins
+ ssh-credentials
+ 1.13
+
+
+ hudson.plugins
+ project-inheritance
+ 1.5.3
+ true
+
+
+ org.jenkins-ci.plugins
+ job-dsl
+ 1.74
+ true
+
+
+ org.codehaus.groovy
+ groovy-all
+
+
+
+
+ org.jenkins-ci.plugins
+ script-security
+ 1.54
+
+
+ org.jvnet.hudson
+ xstream
+ 1.4.7-jenkins-1
+ true
+
+
+ org.jenkins-ci.plugins
+ config-file-provider
+ 2.18
+ true
+
+
+
+ org.jenkins-ci.plugins
+ parameterized-trigger
+ 2.33
+ test
+
+
+ org.jenkins-ci.plugins
+ matrix-auth
+ 1.6
+ test
+
+
+
+ org.jenkins-ci.plugins.icon-shim
+ icon-set
+
+
+
+
+ org.jenkins-ci.plugins
+ matrix-project
+ 1.12
+ test
+
+
+
diff --git a/src/main/java/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/KeepBuildForeverAction.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/KeepBuildForeverAction.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/KeepBuildForeverAction.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/KeepBuildForeverAction.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/ManualPromotionBadge.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/ManualPromotionBadge.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/ManualPromotionBadge.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/ManualPromotionBadge.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotedBuildAction.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotedBuildAction.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/PromotedBuildAction.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotedBuildAction.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/Promotion.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/Promotion.java
similarity index 90%
rename from src/main/java/hudson/plugins/promoted_builds/Promotion.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/Promotion.java
index bb3a04f5..6f459c15 100644
--- a/src/main/java/hudson/plugins/promoted_builds/Promotion.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/Promotion.java
@@ -59,11 +59,14 @@
import org.kohsuke.stapler.StaplerResponse;
/**
- * Records a promotion process.
+ * Records a promotion process for {@link AbstractProject}s.
*
* @author Kohsuke Kawaguchi
*/
-public class Promotion extends AbstractBuild {
+public class Promotion extends AbstractBuild implements PromotionRun {
+
+ public static final PermissionGroup PERMISSIONS = new PermissionGroup(Promotion.class, Messages._Promotion_Permissions_Title());
+ public static final Permission PROMOTE = new Permission(PERMISSIONS, "Promote", Messages._Promotion_PromotePermission_Description(), Jenkins.ADMINISTER, PermissionScope.RUN);
public Promotion(PromotionProcess job) throws IOException {
super(job);
@@ -191,7 +194,7 @@ public EnvVars getEnvironment(TaskListener listener) throws IOException, Interru
}
// Allow the promotion status to contribute to build environment
- getStatus().buildEnvVars(this, e);
+ getStatus().buildEnvVars(this, e, listener);
return e;
}
@@ -268,6 +271,21 @@ public String getUserId() {
return User.getUnknown().getId();
}
+ @Nonnull
+ @Override
+ public Run, ?> getPromotedRun() {
+ return getTarget();
+ }
+
+
+ @Nonnull
+ @Override
+ public Run, ?> getPromotionRun() {
+ return this;
+ }
+
+ //TODO: move to a default method
+ @Override
public List getParameterValues(){
List values=new ArrayList();
ParametersAction parametersAction=getParametersActions(this);
@@ -498,9 +516,6 @@ private boolean preBuild(BuildListener listener, List steps) {
}
- public static final PermissionGroup PERMISSIONS = new PermissionGroup(Promotion.class, Messages._Promotion_Permissions_Title());
- public static final Permission PROMOTE = new Permission(PERMISSIONS, "Promote", Messages._Promotion_PromotePermission_Description(), Jenkins.ADMINISTER, PermissionScope.RUN);
-
@Override
public int hashCode() {
return this.getId().hashCode();
@@ -548,59 +563,4 @@ public static void buildParametersAction(@Nonnull List actions,
}
private static final Logger LOGGER = Logger.getLogger(Promotion.class.getName());
-
- /**
- * Action, which stores promotion parameters.
- * This class allows defining custom parameters filtering logic, which is
- * important for versions after the SECURITY-170 fix.
- * @since TODO
- */
- @Restricted(NoExternalUse.class)
- public static class PromotionParametersAction extends ParametersAction {
-
- private List unfilteredParameters;
-
- private PromotionParametersAction(List params) {
- // Pass the parameters upstairs
- super(params);
- unfilteredParameters = params;
- }
-
- @Override
- public List getParameters() {
- return Collections.unmodifiableList(filter(unfilteredParameters));
- }
-
- private List filter(List params) {
- // buildToBePromoted::getParameters() invokes the secured method, hence all
- // parameters from the promoted build are safe.
- return params;
- }
-
- public static PromotionParametersAction buildFor(
- @Nonnull AbstractBuild, ?> buildToBePromoted,
- @CheckForNull List promotionParams) {
- if (promotionParams == null) {
- promotionParams = new ArrayList();
- }
-
- List params = new ArrayList();
-
- //Add the target build parameters first, if the same parameter is not being provided by the promotion build
- List parameters = buildToBePromoted.getActions(ParametersAction.class);
- for (ParametersAction paramAction : parameters) {
- for (ParameterValue pvalue : paramAction.getParameters()) {
- if (!promotionParams.contains(pvalue)) {
- params.add(pvalue);
- }
- }
- }
-
- //Add all the promotion build parameters
- params.addAll(promotionParams);
-
- // Create list of actions to pass to scheduled build
- return new PromotionParametersAction(params);
- }
- }
}
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionBadge.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionBadge.java
similarity index 58%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionBadge.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionBadge.java
index 2a527cb6..79fee47c 100644
--- a/src/main/java/hudson/plugins/promoted_builds/PromotionBadge.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionBadge.java
@@ -2,8 +2,12 @@
import hudson.EnvVars;
import hudson.model.AbstractBuild;
+import hudson.model.Run;
+import hudson.model.TaskListener;
import org.kohsuke.stapler.export.ExportedBean;
+import javax.annotation.Nonnull;
+
/**
* Captures the information about how/when the promotion criteria is satisfied.
*
@@ -18,11 +22,22 @@ public abstract class PromotionBadge {
/**
* Called by {@link Status} to allow promotion badges to contribute environment variables.
*
- * @param build
- * The calling build. Never null.
+ * @param run
+ * The calling run.
* @param env
* Environment variables should be added to this map.
*/
+ public void buildEnvVars(@Nonnull Run,?> run, EnvVars env, TaskListener listener) {
+ // Default implementation when the method is not overridden
+ if (run instanceof AbstractBuild) {
+ buildEnvVars((AbstractBuild,?>)run, env);
+ }
+ }
+
+ /**
+ * @deprecated Use {@link #buildEnvVars(Run, EnvVars, TaskListener)}
+ */
+ @Deprecated
public void buildEnvVars(AbstractBuild,?> build, EnvVars env) {
// by default don't contribute any variables
}
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionCause.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionCause.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionCause.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionCause.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionCondition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionCondition.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionCondition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionCondition.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionConditionDescriptor.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionConditionDescriptor.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionConditionDescriptor.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionConditionDescriptor.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionPermissionHelper.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionPermissionHelper.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionPermissionHelper.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionPermissionHelper.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
similarity index 83%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
index af97adb0..2458da8f 100644
--- a/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
@@ -67,12 +67,15 @@
import javax.annotation.Nonnull;
/**
- * A dummy {@link AbstractProject} to carry out promotion operations.
+ * A dummy {@link AbstractProject} to carry out promotion operations for other {@link AbstractProject}s.
*
+ * @deprecated This class is used only for the Promoted Builds Plugin, as a compatibility layer for {@link PromotionCondition}s and other types.
+ * This class was significantly refactored, but the data and binary compatibility are mostly retained.
* @author Kohsuke Kawaguchi
*/
// BuildableItem, LazyBuildMixIn.LazyLoadingJob
, ParameterizedJobMixIn.ParameterizedJob
-public final class PromotionProcess extends AbstractProject implements Saveable, Describable, BuildableItemWithBuildWrappers {
+@Deprecated
+public abstract class PromotionProcess extends AbstractProject implements Saveable, Describable, BuildableItemWithBuildWrappers, PromotionTask {
/**
* {@link PromotionCondition}s. All have to be met for a build to be promoted.
@@ -81,8 +84,8 @@ public final class PromotionProcess extends AbstractProject(this);
/**
* The icon that represents this promotion process. This is the name of
- * the GIF icon that can be found in ${rootURL}/plugin/promoted-builds/icons/16x16/
- * and ${rootURL}/plugin/promoted-builds/icons/32x32/, e.g. "star-gold".
+ * the GIF icon that can be found in ${rootURL}/plugin/promotion-api/icons/16x16/
+ * and ${rootURL}/plugin/promotion-api/icons/32x32/, e.g. "star-gold".
*/
public String icon;
@@ -95,46 +98,11 @@ public final class PromotionProcess extends AbstractProject buildSteps = new ArrayList();
-
- private volatile DescribableList> buildWrappers;
- private static final AtomicReferenceFieldUpdater buildWrappersSetter
- = AtomicReferenceFieldUpdater.newUpdater(PromotionProcess.class,DescribableList.class,"buildWrappers");
-
- /*package*/ PromotionProcess(JobPropertyImpl property, String name) {
- super(property, name);
- }
/*package*/ PromotionProcess(ItemGroup parent, String name) {
super(parent, name);
}
- /**
- * Creates unconnected {@link PromotionProcess} instance from the JSON configuration.
- * This is mostly only useful for capturing its configuration in XML format.
- * @param req Request
- * @param o JSON object with source data
- * @throws FormException form submission issue, includes form validation
- * @throws IOException {@link PromotionProcess} creation issue
- * @return Parsed promotion process
- */
- public static PromotionProcess fromJson(StaplerRequest req, JSONObject o) throws FormException, IOException {
- String name = o.getString("name");
- try {
- Jenkins.checkGoodName(name);
- } catch (Failure f) {
- throw new Descriptor.FormException(f.getMessage(), name);
- }
- PromotionProcess p = new PromotionProcess(null,name);
- BulkChange bc = new BulkChange(p);
- try {
- p.configure(req, o); // apply configuration. prevent it from trying to save to disk while we do this
- } finally {
- bc.abort();
- }
- return p;
- }
-
@Override
public void doSetName(String name) {
super.doSetName(name);
@@ -144,8 +112,6 @@ public void doSetName(String name) {
// apply configuration
conditions.rebuild(req,c.optJSONObject("conditions"), PromotionCondition.all());
- buildSteps = (List)Descriptor.newInstancesFromHeteroList(
- req, c, "buildStep", (List) PromotionProcess.getAll());
getBuildWrappersList().rebuild(req, c, BuildWrappers.getFor(this));
icon = c.getString("icon");
if (c.optBoolean("hasAssignedLabel")) {
@@ -158,86 +124,31 @@ public void doSetName(String name) {
}
/**
- * Returns the root project value.
- *
- * @return the root project value.
- */
- @Override
- public AbstractProject getRootProject() {
- return getParent().getOwner().getRootProject();
- }
-
- @Override
- public JobPropertyImpl getParent() {
- return (JobPropertyImpl)super.getParent();
- }
-
- /**
- * Gets the owner {@link AbstractProject} that configured {@link JobPropertyImpl} as
- * a job property.
+ * Gets the owner {@link AbstractProject} that configured this promotion.
* @return Current owner project
*/
- public AbstractProject,?> getOwner() {
- return getParent().getOwner();
- }
+ public abstract AbstractProject,?> getOwner();
@Override public ACL getACL() {
return getOwner().getACL();
}
- /**
- * JENKINS-27716: Since 1.585, the promotion must explicitly indicate that
- * it can be disabled. Otherwise, promotions which trigger automatically
- * upon build completion will execute, even if they're archived.
- */
- @Override public boolean supportsMakeDisabled() {
- return true;
- }
-
- /**
- * Get the promotion condition by referencing it fully qualified class name
- * @param promotionClassName Class name of {@link Promotion}
- * @return Promotion condition if exists
- */
- @CheckForNull
- public PromotionCondition getPromotionCondition(String promotionClassName) {
- for (PromotionCondition condition : conditions) {
- if (condition.getClass().getName().equals(promotionClassName)) {
- return condition;
- }
- }
-
- return null;
- }
-
public DescribableList> getPublishersList() {
// TODO: extract from the buildsSteps field? Or should I separate builders and publishers?
return new DescribableList>(this);
}
- public AbstractProject,?> asProject() {
+ public final AbstractProject,?> asProject() {
return this;
}
- public Map,BuildWrapper> getBuildWrappers() {
+ public final Map,BuildWrapper> getBuildWrappers() {
return getBuildWrappersList().toMap();
}
- public DescribableList> getBuildWrappersList() {
- if(buildWrappers == null) {
- buildWrappersSetter.compareAndSet(this,null,new DescribableList>(this));
- }
- return buildWrappers;
- }
-
- protected Class getBuildClass() {
- return Promotion.class;
- }
-
- public List getBuildSteps() {
- return buildSteps;
- }
+ public abstract List getBuildSteps();
+ //TODO(oleg_nenashev): canRoam is the only difference from the current parent
/**
* Gets the textual representation of the assigned label as it was entered by the user.
* @return Assigned label string
@@ -254,6 +165,7 @@ public String getAssignedLabelString() {
}
}
+ //TODO(oleg_nenashev): canRoam is the only difference from the current parent
@Override public Label getAssignedLabel() {
// Really would like to run on the exact node that the promoted build ran on,
// not just the same label.. but at least this works if job is tied to one node:
@@ -262,24 +174,6 @@ public String getAssignedLabelString() {
return Jenkins.get().getLabel(assignedLabel);
}
- @Override public JDK getJDK() {
- return getOwner().getJDK();
- }
-
- /**
- * Gets the customWorkspace of the owner project.
- *
- * Support for FreeStyleProject only.
- * @return customWorkspace
- */
- @CheckForNull
- public String getCustomWorkspace() {
- AbstractProject, ?> p = getOwner();
- if (p instanceof FreeStyleProject)
- return ((FreeStyleProject) p).getCustomWorkspace();
- return null;
- }
-
/**
* Get the icon name, without the extension. It will always return a non null
* and non empty string, as "star-gold" is used for compatibility
@@ -316,6 +210,7 @@ public boolean isVisible(){
}
return true;
}
+
private static EnvVars getDefaultParameterValuesAsEnvVars(AbstractProject owner) {
EnvVars envVars = null;
ParametersDefinitionProperty parametersDefinitionProperty = (ParametersDefinitionProperty)owner.getProperty(ParametersDefinitionProperty.class);
diff --git a/src/main/java/hudson/plugins/promoted_builds/util/JenkinsHelper.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionRebuildValidator.java
similarity index 63%
rename from src/main/java/hudson/plugins/promoted_builds/util/JenkinsHelper.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionRebuildValidator.java
index 2683033f..4eb26ca2 100644
--- a/src/main/java/hudson/plugins/promoted_builds/util/JenkinsHelper.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionRebuildValidator.java
@@ -1,7 +1,7 @@
/*
* The MIT License
*
- * Copyright (c) 2016 Oleg Nenashev.
+ * Copyright 2017 CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -21,31 +21,27 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-package hudson.plugins.promoted_builds.util;
+package hudson.plugins.promoted_builds;
-import javax.annotation.Nonnull;
-import jenkins.model.Jenkins;
+import com.sonyericsson.rebuild.RebuildValidator;
+import hudson.Extension;
+import hudson.model.Run;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
/**
- * Util class, which provides helpers for {@link Jenkins}.
+ * Disables the rebuild button for {@link Promotion} objects since rebuilding
+ * is handled separately for them.
+ *
+ * @see Status
*/
-public class JenkinsHelper {
-
- private JenkinsHelper() {};
+@Extension(optional=true)
+@Restricted(NoExternalUse.class)
+public class PromotionRebuildValidator extends RebuildValidator {
- /**
- * @deprecated Use {@link Jenkins#get()}
- */
- @Deprecated
- @Nonnull
- @Restricted(NoExternalUse.class)
- public static Jenkins getInstance() throws IllegalStateException {
- Jenkins instance = Jenkins.getInstanceOrNull();
- if (instance == null) {
- throw new IllegalStateException("Jenkins has not been started, or was already shut down");
- }
- return instance;
+ @Override
+ public boolean isApplicable(Run build) {
+ return build instanceof Promotion;
}
+
}
diff --git a/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionRun.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionRun.java
new file mode 100644
index 00000000..ee5fa4ad
--- /dev/null
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionRun.java
@@ -0,0 +1,103 @@
+package hudson.plugins.promoted_builds;
+
+// TODO: implementation for Pipeline
+// TODO: add generics?
+
+import hudson.init.InitMilestone;
+import hudson.init.Initializer;
+import hudson.model.AbstractBuild;
+import hudson.model.Items;
+import hudson.model.ParameterValue;
+import hudson.model.ParametersAction;
+import hudson.model.Run;
+import hudson.security.Permission;
+import hudson.security.PermissionGroup;
+import hudson.security.PermissionScope;
+import jenkins.model.Jenkins;
+import org.kohsuke.accmod.Restricted;
+import org.kohsuke.accmod.restrictions.NoExternalUse;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nonnull;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @see Promotion
+ */
+public interface PromotionRun { // always a run?
+
+ // Run which we try to promote
+ @Nonnull
+ Run,?> getPromotedRun();
+
+ // Execution which does the promotion
+ @Nonnull
+ Run,?> getPromotionRun();
+
+ //TODO: Move implementation to a default method?
+ List getParameterValues();
+
+
+ @Initializer(before = InitMilestone.PLUGINS_STARTED)
+ public static void addAliases() {
+ // The class was promoted to upstream interface, but we still need to convert the data correctly
+ Items.XSTREAM2.addCompatibilityAlias("hudson.plugins.promoted_builds.Promotion.PromotionParametersAction", PromotionParametersAction.class);
+ }
+
+ /**
+ * Action, which stores promotion parameters.
+ * This class allows defining custom parameters filtering logic, which is
+ * important for versions after the SECURITY-170 fix.
+ * @since TODO
+ */
+ @Restricted(NoExternalUse.class)
+ public static class PromotionParametersAction extends ParametersAction {
+
+ private List unfilteredParameters;
+
+ private PromotionParametersAction(List params) {
+ // Pass the parameters upstairs
+ super(params);
+ unfilteredParameters = params;
+ }
+
+ @Override
+ public List getParameters() {
+ return Collections.unmodifiableList(filter(unfilteredParameters));
+ }
+
+ private List filter(List params) {
+ // buildToBePromoted::getParameters() invokes the secured method, hence all
+ // parameters from the promoted build are safe.
+ return params;
+ }
+
+ public static PromotionParametersAction buildFor(
+ @Nonnull AbstractBuild, ?> buildToBePromoted,
+ @CheckForNull List promotionParams) {
+ if (promotionParams == null) {
+ promotionParams = new ArrayList();
+ }
+
+ List params = new ArrayList();
+
+ //Add the target build parameters first, if the same parameter is not being provided by the promotion build
+ List parameters = buildToBePromoted.getActions(ParametersAction.class);
+ for (ParametersAction paramAction : parameters) {
+ for (ParameterValue pvalue : paramAction.getParameters()) {
+ if (!promotionParams.contains(pvalue)) {
+ params.add(pvalue);
+ }
+ }
+ }
+
+ //Add all the promotion build parameters
+ params.addAll(promotionParams);
+
+ // Create list of actions to pass to scheduled build
+ return new PromotionParametersAction(params);
+ }
+ }
+}
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionStatusColumn.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionStatusColumn.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionStatusColumn.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionStatusColumn.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java
diff --git a/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionTask.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionTask.java
new file mode 100644
index 00000000..762b8a51
--- /dev/null
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/PromotionTask.java
@@ -0,0 +1,37 @@
+package hudson.plugins.promoted_builds;
+
+import hudson.util.DescribableList;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nonnull;
+
+/**
+ * Contains a generic executable promotion definition.
+ * Provides equivalent of {@code PromotionProcess} API in the Promoted Builds plugin
+ * @since 4.0
+ */
+public interface PromotionTask {
+
+ /**
+ * Gets all conditions associated with the task
+ * @return List of conditions
+ */
+ @Nonnull
+ DescribableList getConditions();
+
+ /**
+ * Get the promotion condition by referencing it fully qualified class name
+ * @param promotionClassName Class name of the condition
+ * @return Promotion condition if exists
+ */
+ @CheckForNull
+ default PromotionCondition getPromotionCondition(String promotionClassName) {
+ for (PromotionCondition condition : getConditions()) {
+ if (condition.getClass().getName().equals(promotionClassName)) {
+ return condition;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/src/main/java/hudson/plugins/promoted_builds/Status.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/Status.java
similarity index 96%
rename from src/main/java/hudson/plugins/promoted_builds/Status.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/Status.java
index e4493ff6..97ba0591 100644
--- a/src/main/java/hudson/plugins/promoted_builds/Status.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/Status.java
@@ -9,6 +9,8 @@
import hudson.model.ParameterDefinition;
import hudson.model.ParameterValue;
import hudson.model.Result;
+import hudson.model.Run;
+import hudson.model.TaskListener;
import hudson.plugins.promoted_builds.conditions.ManualCondition;
import hudson.util.Iterators;
import net.sf.json.JSONArray;
@@ -133,7 +135,7 @@ public String getIcon(String size) {
}
baseName = p.getIcon();
}
- return Jenkins.RESOURCE_PATH+"/plugin/promoted-builds/icons/"+size+"/"+ baseName +".png";
+ return Jenkins.RESOURCE_PATH+"/plugin/promotion-api/icons/"+size+"/"+ baseName +".png";
}
//TODO: what is the Null status?
@@ -147,17 +149,29 @@ public AbstractBuild,?> getTarget() {
return _parent != null ? _parent.owner : null;
}
+
+
/**
* Called by {@link Promotion} to allow status to contribute environment variables.
*
- * @param build
- * The calling build. Never null.
+ * @param run
+ * The calling run
* @param env
* Environment variables should be added to this map.
*/
+ public void buildEnvVars(Run,?> run, EnvVars env, TaskListener listener) {
+ for (PromotionBadge badge : badges) {
+ badge.buildEnvVars(run, env, listener);
+ }
+ }
+
+ /**
+ * @deprecated Use {@link #buildEnvVars(Run, EnvVars, TaskListener)}
+ */
+ @Deprecated
public void buildEnvVars(AbstractBuild,?> build, EnvVars env) {
for (PromotionBadge badge : badges) {
- badge.buildEnvVars(build, env);
+ badge.buildEnvVars(build, env, TaskListener.NULL);
}
}
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyCondition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyCondition.java
similarity index 97%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/GroovyCondition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyCondition.java
index edfb4ae1..c8ea9fb5 100644
--- a/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyCondition.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyCondition.java
@@ -5,6 +5,8 @@
import hudson.PluginManager;
import hudson.Util;
import hudson.model.AbstractBuild;
+import hudson.model.Run;
+import hudson.model.TaskListener;
import hudson.plugins.promoted_builds.PromotionBadge;
import hudson.plugins.promoted_builds.PromotionCondition;
import hudson.plugins.promoted_builds.PromotionProcess;
@@ -120,8 +122,7 @@ public String getDisplayLabel() {
}
@Override
- public void buildEnvVars(final AbstractBuild, ?> build, final EnvVars env) {
- super.buildEnvVars(build, env);
+ public void buildEnvVars(final Run, ?> build, final EnvVars env, TaskListener listener) {
for (final Map.Entry entry :
variables.entrySet()) {
env.put(entry.getKey(), entry.getValue());
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyConditionDescriptor.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyConditionDescriptor.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/GroovyConditionDescriptor.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/GroovyConditionDescriptor.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/ManualCondition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/ManualCondition.java
similarity index 94%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/ManualCondition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/ManualCondition.java
index fd2c0929..40a069c6 100644
--- a/src/main/java/hudson/plugins/promoted_builds/conditions/ManualCondition.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/ManualCondition.java
@@ -7,16 +7,18 @@
import hudson.model.Descriptor;
import hudson.model.Hudson;
import hudson.model.InvisibleAction;
-import hudson.model.SimpleParameterDefinition;
import hudson.model.ParameterDefinition;
import hudson.model.ParameterValue;
+import hudson.model.Run;
+import hudson.model.TaskListener;
import hudson.model.User;
-import hudson.plugins.promoted_builds.PromotionPermissionHelper;
+import hudson.plugins.promoted_builds.Promotion;
import hudson.plugins.promoted_builds.PromotionBadge;
import hudson.plugins.promoted_builds.PromotionCondition;
import hudson.plugins.promoted_builds.PromotionConditionDescriptor;
-import hudson.plugins.promoted_builds.Promotion;
+import hudson.plugins.promoted_builds.PromotionPermissionHelper;
import hudson.plugins.promoted_builds.PromotionProcess;
+import hudson.plugins.promoted_builds.PromotionRun;
import java.io.IOException;
import java.util.ArrayList;
@@ -283,16 +285,19 @@ public List getParameterValues() {
return values != null ? values : Collections.emptyList();
}
+ //TODO, TBD: Refactor API to PromotionRun ?
@Override
- public void buildEnvVars(AbstractBuild, ?> build, EnvVars env) {
- if (!(build instanceof Promotion)) {
- throw new IllegalStateException ("Wrong build type. Expected a Promotion, but got "+build.getClass());
+ public void buildEnvVars(Run, ?> run, EnvVars env, TaskListener listener) {
+ // TODO: Refactor to support Pipeline Promotion types
+ if (!(run instanceof PromotionRun)) {
+ throw new IllegalStateException ("Wrong build type. Expected a PromotionRun, but got "+run.getClass());
}
-
- List params = ((Promotion) build).getParameterValues();
+
+ PromotionRun promotion = (PromotionRun)run;
+ List params = ((PromotionRun) run).getParameterValues();
if (params != null) {
for (ParameterValue value : params) {
- value.buildEnvVars(build, env);
+ value.buildEnvironment(promotion.getPromotionRun(), env);
}
}
}
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition.java
similarity index 99%
rename from src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition.java
index eab3f35e..37bbb1c6 100644
--- a/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition.java
+++ b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition.java
@@ -200,7 +200,7 @@ public String getDisplayName() {
@Override
public String getHelpFile() {
- return "/plugin/promoted-builds/parameter/promotion.html";
+ return "/plugin/promotion-api/parameter/promotion.html";
}
@Override
diff --git a/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildRebuildParameterProvider.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildRebuildParameterProvider.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildRebuildParameterProvider.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildRebuildParameterProvider.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacro.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacro.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacro.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacro.java
diff --git a/src/main/java/hudson/plugins/promoted_builds/util/ItemPathResolver.java b/promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/util/ItemPathResolver.java
similarity index 100%
rename from src/main/java/hudson/plugins/promoted_builds/util/ItemPathResolver.java
rename to promotion-api-plugin/src/main/java/hudson/plugins/promoted_builds/util/ItemPathResolver.java
diff --git a/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-dateFormat.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-dateFormat.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-dateFormat.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-dateFormat.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-timeZone.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-timeZone.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-timeZone.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/GlobalBuildPromotedBuilds/help-timeZone.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/JobPropertyImpl/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/JobPropertyImpl/config.jelly
similarity index 96%
rename from src/main/resources/hudson/plugins/promoted_builds/JobPropertyImpl/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/JobPropertyImpl/config.jelly
index 9125e3bf..4c6782ed 100644
--- a/src/main/resources/hudson/plugins/promoted_builds/JobPropertyImpl/config.jelly
+++ b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/JobPropertyImpl/config.jelly
@@ -1,6 +1,6 @@
-
+
diff --git a/src/main/resources/hudson/plugins/promoted_builds/KeepBuildForeverAction/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/KeepBuildForeverAction/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/KeepBuildForeverAction/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/KeepBuildForeverAction/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/column.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/columnHeader.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/LastBuildPromotionStatusColumn/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/ManualPromotionBadge/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/ManualPromotionBadge/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/ManualPromotionBadge/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/ManualPromotionBadge/index.jelly
diff --git a/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/Messages.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/Messages.properties
new file mode 100644
index 00000000..6fc970bf
--- /dev/null
+++ b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/Messages.properties
@@ -0,0 +1,30 @@
+# The MIT License
+#
+# Copyright (c) 2010, InfraDNA, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+KeepBuildForEverAction.descriptor.displayName=Keep Build Forever
+KeepBuildForEverAction.console.notPromotion=This build is not a promotion, how did we get here? Not keeping build.
+KeepBuildForEverAction.console.promotionNotGoodEnough=Promotion build result [{0}] is not good enough. Not keeping build.
+KeepBuildForEverAction.console.keepingBuild=Marking build to keep forever.
+
+PromotionCause.ShortDescription = Started by promotion {0} for project "{1}", build number {2}
+LastBuildPromotionStatusColumn.DisplayName = Last Build Promotion Status
+PromotionStatusColumn.DisplayName = Build Promotions
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/index.jelly
similarity index 95%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/index.jelly
index 26872997..9eb89e62 100644
--- a/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/index.jelly
+++ b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/index.jelly
@@ -4,7 +4,7 @@
-
+
@@ -17,7 +17,7 @@
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.jelly
similarity index 94%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.jelly
index 62910cbf..3df6c773 100644
--- a/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.jelly
+++ b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.jelly
@@ -9,7 +9,7 @@
-
+
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/column.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/columnHeader.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/PromotionStatusColumn/config.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/Badge/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/Badge/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/Badge/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/Badge/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/Badge/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/Badge/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/Badge/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/Badge/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/Badge/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/Badge/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/Badge/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/Badge/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/Messages.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/Messages.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/Messages.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/Messages.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/Badge/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/Badge/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/Badge/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/Badge/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/config.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/config.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/help.html b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/help.html
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/help.html
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/help.html
diff --git a/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config.jelly
similarity index 89%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config.jelly
index 59a2e2dc..8265cb50 100644
--- a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config.jelly
+++ b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config.jelly
@@ -29,10 +29,10 @@ THE SOFTWARE.
-
+
-
+
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_da.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_da.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_da.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_da.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_de.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_de.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_de.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_de.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_es.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_es.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_es.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_es.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_fr.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_fr.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_fr.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_fr.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ja.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ja.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ja.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ja.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_pt_BR.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_pt_BR.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_pt_BR.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_pt_BR.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ru.properties b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ru.properties
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ru.properties
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/config_ru.properties
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/index.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/index.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/index.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition/index.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue/value.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue/value.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue/value.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterValue/value.jelly
diff --git a/src/main/resources/hudson/plugins/promoted_builds/tokenmacro/help.jelly b/promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/tokenmacro/help.jelly
similarity index 100%
rename from src/main/resources/hudson/plugins/promoted_builds/tokenmacro/help.jelly
rename to promotion-api-plugin/src/main/resources/hudson/plugins/promoted_builds/tokenmacro/help.jelly
diff --git a/promotion-api-plugin/src/main/resources/index.jelly b/promotion-api-plugin/src/main/resources/index.jelly
new file mode 100644
index 00000000..0aa6630a
--- /dev/null
+++ b/promotion-api-plugin/src/main/resources/index.jelly
@@ -0,0 +1,4 @@
+
+
+ This plugin provides promotion API which can be used by other plugins to define the promotion logic.
+
\ No newline at end of file
diff --git a/src/main/webapp/css/promoted-builds.css b/promotion-api-plugin/src/main/webapp/css/promoted-builds.css
similarity index 100%
rename from src/main/webapp/css/promoted-builds.css
rename to promotion-api-plugin/src/main/webapp/css/promoted-builds.css
diff --git a/src/main/webapp/icons/16x16/star-blue-e.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-e.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-blue-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-e.gif
diff --git a/src/main/webapp/icons/16x16/star-blue-e.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-e.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-blue-e.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-e.png
diff --git a/src/main/webapp/icons/16x16/star-blue-w.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-w.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-blue-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-w.gif
diff --git a/src/main/webapp/icons/16x16/star-blue-w.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-w.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-blue-w.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-blue-w.png
diff --git a/src/main/webapp/icons/16x16/star-blue.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-blue.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-blue.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-blue.gif
diff --git a/src/main/webapp/icons/16x16/star-blue.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-blue.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-blue.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-blue.png
diff --git a/src/main/webapp/icons/16x16/star-gold-e.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-e.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-gold-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-e.gif
diff --git a/src/main/webapp/icons/16x16/star-gold-e.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-e.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-gold-e.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-e.png
diff --git a/src/main/webapp/icons/16x16/star-gold-w.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-w.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-gold-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-w.gif
diff --git a/src/main/webapp/icons/16x16/star-gold-w.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-w.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-gold-w.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-gold-w.png
diff --git a/src/main/webapp/icons/16x16/star-gold.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-gold.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-gold.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-gold.gif
diff --git a/src/main/webapp/icons/16x16/star-gold.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-gold.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-gold.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-gold.png
diff --git a/src/main/webapp/icons/16x16/star-green-e.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-green-e.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-green-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-green-e.gif
diff --git a/src/main/webapp/icons/16x16/star-green-e.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-green-e.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-green-e.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-green-e.png
diff --git a/src/main/webapp/icons/16x16/star-green-w.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-green-w.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-green-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-green-w.gif
diff --git a/src/main/webapp/icons/16x16/star-green-w.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-green-w.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-green-w.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-green-w.png
diff --git a/src/main/webapp/icons/16x16/star-green.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-green.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-green.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-green.gif
diff --git a/src/main/webapp/icons/16x16/star-green.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-green.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-green.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-green.png
diff --git a/src/main/webapp/icons/16x16/star-orange-e.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-e.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-orange-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-e.gif
diff --git a/src/main/webapp/icons/16x16/star-orange-e.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-e.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-orange-e.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-e.png
diff --git a/src/main/webapp/icons/16x16/star-orange-w.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-w.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-orange-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-w.gif
diff --git a/src/main/webapp/icons/16x16/star-orange-w.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-w.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-orange-w.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-orange-w.png
diff --git a/src/main/webapp/icons/16x16/star-orange.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-orange.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-orange.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-orange.gif
diff --git a/src/main/webapp/icons/16x16/star-orange.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-orange.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-orange.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-orange.png
diff --git a/src/main/webapp/icons/16x16/star-purple-e.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-e.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-purple-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-e.gif
diff --git a/src/main/webapp/icons/16x16/star-purple-e.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-e.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-purple-e.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-e.png
diff --git a/src/main/webapp/icons/16x16/star-purple-w.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-w.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-purple-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-w.gif
diff --git a/src/main/webapp/icons/16x16/star-purple-w.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-w.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-purple-w.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-purple-w.png
diff --git a/src/main/webapp/icons/16x16/star-purple.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-purple.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-purple.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-purple.gif
diff --git a/src/main/webapp/icons/16x16/star-purple.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-purple.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-purple.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-purple.png
diff --git a/src/main/webapp/icons/16x16/star-red-e.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-red-e.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-red-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-red-e.gif
diff --git a/src/main/webapp/icons/16x16/star-red-e.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-red-e.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-red-e.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-red-e.png
diff --git a/src/main/webapp/icons/16x16/star-red-w.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-red-w.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-red-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-red-w.gif
diff --git a/src/main/webapp/icons/16x16/star-red-w.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-red-w.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-red-w.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-red-w.png
diff --git a/src/main/webapp/icons/16x16/star-red.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-red.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-red.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-red.gif
diff --git a/src/main/webapp/icons/16x16/star-red.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-red.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-red.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-red.png
diff --git a/src/main/webapp/icons/16x16/star-silver-e.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-e.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-silver-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-e.gif
diff --git a/src/main/webapp/icons/16x16/star-silver-e.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-e.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-silver-e.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-e.png
diff --git a/src/main/webapp/icons/16x16/star-silver-w.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-w.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-silver-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-w.gif
diff --git a/src/main/webapp/icons/16x16/star-silver-w.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-w.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-silver-w.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-silver-w.png
diff --git a/src/main/webapp/icons/16x16/star-silver.gif b/promotion-api-plugin/src/main/webapp/icons/16x16/star-silver.gif
similarity index 100%
rename from src/main/webapp/icons/16x16/star-silver.gif
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-silver.gif
diff --git a/src/main/webapp/icons/16x16/star-silver.png b/promotion-api-plugin/src/main/webapp/icons/16x16/star-silver.png
similarity index 100%
rename from src/main/webapp/icons/16x16/star-silver.png
rename to promotion-api-plugin/src/main/webapp/icons/16x16/star-silver.png
diff --git a/src/main/webapp/icons/24x24/star-blue-e.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-e.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-blue-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-e.gif
diff --git a/src/main/webapp/icons/24x24/star-blue-e.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-e.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-blue-e.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-e.png
diff --git a/src/main/webapp/icons/24x24/star-blue-w.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-w.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-blue-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-w.gif
diff --git a/src/main/webapp/icons/24x24/star-blue-w.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-w.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-blue-w.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-blue-w.png
diff --git a/src/main/webapp/icons/24x24/star-blue.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-blue.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-blue.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-blue.gif
diff --git a/src/main/webapp/icons/24x24/star-blue.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-blue.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-blue.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-blue.png
diff --git a/src/main/webapp/icons/24x24/star-gold-e.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-e.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-gold-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-e.gif
diff --git a/src/main/webapp/icons/24x24/star-gold-e.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-e.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-gold-e.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-e.png
diff --git a/src/main/webapp/icons/24x24/star-gold-w.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-w.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-gold-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-w.gif
diff --git a/src/main/webapp/icons/24x24/star-gold-w.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-w.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-gold-w.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-gold-w.png
diff --git a/src/main/webapp/icons/24x24/star-gold.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-gold.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-gold.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-gold.gif
diff --git a/src/main/webapp/icons/24x24/star-gold.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-gold.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-gold.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-gold.png
diff --git a/src/main/webapp/icons/24x24/star-green-e.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-green-e.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-green-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-green-e.gif
diff --git a/src/main/webapp/icons/24x24/star-green-e.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-green-e.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-green-e.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-green-e.png
diff --git a/src/main/webapp/icons/24x24/star-green-w.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-green-w.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-green-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-green-w.gif
diff --git a/src/main/webapp/icons/24x24/star-green-w.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-green-w.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-green-w.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-green-w.png
diff --git a/src/main/webapp/icons/24x24/star-green.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-green.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-green.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-green.gif
diff --git a/src/main/webapp/icons/24x24/star-green.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-green.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-green.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-green.png
diff --git a/src/main/webapp/icons/24x24/star-orange-e.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-e.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-orange-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-e.gif
diff --git a/src/main/webapp/icons/24x24/star-orange-e.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-e.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-orange-e.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-e.png
diff --git a/src/main/webapp/icons/24x24/star-orange-w.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-w.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-orange-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-w.gif
diff --git a/src/main/webapp/icons/24x24/star-orange-w.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-w.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-orange-w.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-orange-w.png
diff --git a/src/main/webapp/icons/24x24/star-orange.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-orange.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-orange.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-orange.gif
diff --git a/src/main/webapp/icons/24x24/star-orange.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-orange.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-orange.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-orange.png
diff --git a/src/main/webapp/icons/24x24/star-purple-e.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-e.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-purple-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-e.gif
diff --git a/src/main/webapp/icons/24x24/star-purple-e.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-e.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-purple-e.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-e.png
diff --git a/src/main/webapp/icons/24x24/star-purple-w.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-w.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-purple-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-w.gif
diff --git a/src/main/webapp/icons/24x24/star-purple-w.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-w.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-purple-w.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-purple-w.png
diff --git a/src/main/webapp/icons/24x24/star-purple.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-purple.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-purple.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-purple.gif
diff --git a/src/main/webapp/icons/24x24/star-purple.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-purple.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-purple.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-purple.png
diff --git a/src/main/webapp/icons/24x24/star-red-e.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-red-e.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-red-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-red-e.gif
diff --git a/src/main/webapp/icons/24x24/star-red-e.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-red-e.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-red-e.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-red-e.png
diff --git a/src/main/webapp/icons/24x24/star-red-w.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-red-w.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-red-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-red-w.gif
diff --git a/src/main/webapp/icons/24x24/star-red-w.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-red-w.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-red-w.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-red-w.png
diff --git a/src/main/webapp/icons/24x24/star-red.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-red.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-red.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-red.gif
diff --git a/src/main/webapp/icons/24x24/star-red.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-red.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-red.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-red.png
diff --git a/src/main/webapp/icons/24x24/star-silver-e.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-e.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-silver-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-e.gif
diff --git a/src/main/webapp/icons/24x24/star-silver-e.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-e.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-silver-e.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-e.png
diff --git a/src/main/webapp/icons/24x24/star-silver-w.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-w.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-silver-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-w.gif
diff --git a/src/main/webapp/icons/24x24/star-silver-w.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-w.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-silver-w.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-silver-w.png
diff --git a/src/main/webapp/icons/24x24/star-silver.gif b/promotion-api-plugin/src/main/webapp/icons/24x24/star-silver.gif
similarity index 100%
rename from src/main/webapp/icons/24x24/star-silver.gif
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-silver.gif
diff --git a/src/main/webapp/icons/24x24/star-silver.png b/promotion-api-plugin/src/main/webapp/icons/24x24/star-silver.png
similarity index 100%
rename from src/main/webapp/icons/24x24/star-silver.png
rename to promotion-api-plugin/src/main/webapp/icons/24x24/star-silver.png
diff --git a/src/main/webapp/icons/32x32/star-blue-e.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-e.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-blue-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-e.gif
diff --git a/src/main/webapp/icons/32x32/star-blue-e.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-e.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-blue-e.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-e.png
diff --git a/src/main/webapp/icons/32x32/star-blue-w.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-w.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-blue-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-w.gif
diff --git a/src/main/webapp/icons/32x32/star-blue-w.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-w.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-blue-w.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-blue-w.png
diff --git a/src/main/webapp/icons/32x32/star-blue.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-blue.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-blue.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-blue.gif
diff --git a/src/main/webapp/icons/32x32/star-blue.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-blue.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-blue.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-blue.png
diff --git a/src/main/webapp/icons/32x32/star-gold-e.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-e.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-gold-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-e.gif
diff --git a/src/main/webapp/icons/32x32/star-gold-e.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-e.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-gold-e.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-e.png
diff --git a/src/main/webapp/icons/32x32/star-gold-w.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-w.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-gold-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-w.gif
diff --git a/src/main/webapp/icons/32x32/star-gold-w.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-w.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-gold-w.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-gold-w.png
diff --git a/src/main/webapp/icons/32x32/star-gold.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-gold.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-gold.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-gold.gif
diff --git a/src/main/webapp/icons/32x32/star-gold.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-gold.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-gold.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-gold.png
diff --git a/src/main/webapp/icons/32x32/star-green-e.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-green-e.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-green-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-green-e.gif
diff --git a/src/main/webapp/icons/32x32/star-green-e.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-green-e.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-green-e.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-green-e.png
diff --git a/src/main/webapp/icons/32x32/star-green-w.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-green-w.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-green-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-green-w.gif
diff --git a/src/main/webapp/icons/32x32/star-green-w.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-green-w.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-green-w.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-green-w.png
diff --git a/src/main/webapp/icons/32x32/star-green.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-green.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-green.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-green.gif
diff --git a/src/main/webapp/icons/32x32/star-green.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-green.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-green.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-green.png
diff --git a/src/main/webapp/icons/32x32/star-orange-e.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-e.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-orange-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-e.gif
diff --git a/src/main/webapp/icons/32x32/star-orange-e.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-e.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-orange-e.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-e.png
diff --git a/src/main/webapp/icons/32x32/star-orange-w.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-w.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-orange-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-w.gif
diff --git a/src/main/webapp/icons/32x32/star-orange-w.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-w.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-orange-w.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-orange-w.png
diff --git a/src/main/webapp/icons/32x32/star-orange.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-orange.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-orange.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-orange.gif
diff --git a/src/main/webapp/icons/32x32/star-orange.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-orange.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-orange.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-orange.png
diff --git a/src/main/webapp/icons/32x32/star-purple-e.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-e.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-purple-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-e.gif
diff --git a/src/main/webapp/icons/32x32/star-purple-e.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-e.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-purple-e.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-e.png
diff --git a/src/main/webapp/icons/32x32/star-purple-w.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-w.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-purple-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-w.gif
diff --git a/src/main/webapp/icons/32x32/star-purple-w.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-w.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-purple-w.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-purple-w.png
diff --git a/src/main/webapp/icons/32x32/star-purple.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-purple.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-purple.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-purple.gif
diff --git a/src/main/webapp/icons/32x32/star-purple.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-purple.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-purple.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-purple.png
diff --git a/src/main/webapp/icons/32x32/star-red-e.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-red-e.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-red-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-red-e.gif
diff --git a/src/main/webapp/icons/32x32/star-red-e.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-red-e.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-red-e.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-red-e.png
diff --git a/src/main/webapp/icons/32x32/star-red-w.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-red-w.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-red-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-red-w.gif
diff --git a/src/main/webapp/icons/32x32/star-red-w.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-red-w.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-red-w.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-red-w.png
diff --git a/src/main/webapp/icons/32x32/star-red.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-red.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-red.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-red.gif
diff --git a/src/main/webapp/icons/32x32/star-red.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-red.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-red.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-red.png
diff --git a/src/main/webapp/icons/32x32/star-silver-e.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-e.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-silver-e.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-e.gif
diff --git a/src/main/webapp/icons/32x32/star-silver-e.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-e.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-silver-e.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-e.png
diff --git a/src/main/webapp/icons/32x32/star-silver-w.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-w.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-silver-w.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-w.gif
diff --git a/src/main/webapp/icons/32x32/star-silver-w.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-w.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-silver-w.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-silver-w.png
diff --git a/src/main/webapp/icons/32x32/star-silver.gif b/promotion-api-plugin/src/main/webapp/icons/32x32/star-silver.gif
similarity index 100%
rename from src/main/webapp/icons/32x32/star-silver.gif
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-silver.gif
diff --git a/src/main/webapp/icons/32x32/star-silver.png b/promotion-api-plugin/src/main/webapp/icons/32x32/star-silver.png
similarity index 100%
rename from src/main/webapp/icons/32x32/star-silver.png
rename to promotion-api-plugin/src/main/webapp/icons/32x32/star-silver.png
diff --git a/src/main/webapp/parameter/help-job.html b/promotion-api-plugin/src/main/webapp/parameter/help-job.html
similarity index 100%
rename from src/main/webapp/parameter/help-job.html
rename to promotion-api-plugin/src/main/webapp/parameter/help-job.html
diff --git a/src/main/webapp/parameter/help-promotion.html b/promotion-api-plugin/src/main/webapp/parameter/help-promotion.html
similarity index 100%
rename from src/main/webapp/parameter/help-promotion.html
rename to promotion-api-plugin/src/main/webapp/parameter/help-promotion.html
diff --git a/src/main/webapp/parameter/promotion.html b/promotion-api-plugin/src/main/webapp/parameter/promotion.html
similarity index 100%
rename from src/main/webapp/parameter/promotion.html
rename to promotion-api-plugin/src/main/webapp/parameter/promotion.html