Skip to content

Commit

Permalink
Deprecate mvnd.builder.rule* and mvnd.builder.rules.provider.* features
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Dec 15, 2020
1 parent 02fe681 commit 8fbb6a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions daemon/src/main/java/org/mvndaemon/mvnd/builder/SmartBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public synchronized void build(final MavenSession session, final ReactorContext
String providerUrl = session.getTopLevelProject().getProperties()
.getProperty(MVND_BUILDER_RULES_PROVIDER_URL);
if (providerUrl != null) {
logger.warn(MVND_BUILDER_RULES_PROVIDER_URL
+ " property is deprecated and the support for it will be removed in mvnd 0.3. See https://github.com/mvndaemon/mvnd/issues/264");

URL url;
try {
url = new URL(providerUrl);
Expand Down Expand Up @@ -141,6 +144,9 @@ public synchronized void build(final MavenSession session, final ReactorContext
.getProperty(MVND_BUILDER_RULES_PROVIDER_SCRIPT);
}
if (providerScript != null) {
logger.warn(MVND_BUILDER_RULES_PROVIDER_SCRIPT
+ " property is deprecated and the support for it will be removed in mvnd 0.3. See https://github.com/mvndaemon/mvnd/issues/264");

Binding binding = new Binding();
GroovyShell shell = new GroovyShell(binding);
binding.setProperty("session", session);
Expand All @@ -160,12 +166,16 @@ public synchronized void build(final MavenSession session, final ReactorContext
String topRule = session.getTopLevelProject().getProperties()
.getProperty(MVND_BUILDER_RULES);
if (topRule != null) {
logger.warn(MVND_BUILDER_RULES
+ " property is deprecated and the support for it will be removed in mvnd 0.3. See https://github.com/mvndaemon/mvnd/issues/264");
list.add(topRule);
}

session.getAllProjects().forEach(p -> {
String rule = p.getProperties().getProperty(MVND_BUILDER_RULE);
if (rule != null) {
logger.warn(MVND_BUILDER_RULE
+ " property is deprecated and the support for it will be removed in mvnd 0.3. See https://github.com/mvndaemon/mvnd/issues/264");
rule = rule.trim();
if (!rule.isEmpty()) {
rule = mvndRuleSanitizerPattern.matcher(rule).replaceAll(",");
Expand Down

0 comments on commit 8fbb6a7

Please sign in to comment.