Skip to content

Commit b7e084d

Browse files
committed
Fix MavenPrepareCommand
1 parent 74e1e05 commit b7e084d

File tree

1 file changed

+8
-5
lines changed
  • java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/maven

1 file changed

+8
-5
lines changed

java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/maven/MavenPrepareCommand.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import io.quarkus.logging.Log;
3333
import picocli.CommandLine;
3434

35+
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
36+
3537
/**
3638
* A simple preprocessor that attempts to fix problematic maven build files.
3739
* <p>
@@ -128,13 +130,14 @@ private boolean handlePlugins(List<Plugin> plugins, boolean topLevel)
128130

129131
if (disabledPlugins != null) {
130132
for (String s : disabledPlugins) {
131-
String[] ga = s.split(":");
133+
if (isNotEmpty(s)) {
134+
String[] ga = s.split(":");
132135

133-
if (ga.length != 2) {
134-
throw new IOException("Error parsing groupId/artifactId: " + s);
136+
if (ga.length != 2) {
137+
throw new IOException("Error parsing groupId/artifactId: " + s);
138+
}
139+
toRemove.add(new PluginInfo(ga[0], ga[1]));
135140
}
136-
137-
toRemove.add(new PluginInfo(ga[0], ga[1]));
138141
}
139142
}
140143

0 commit comments

Comments
 (0)