mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-57241: Can't run classes in a module that reference dependencies in "provided" scope.
This commit is contained in:
@@ -36,7 +36,10 @@ public abstract class OrderEnumerationHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean addCustomOutput(@NotNull ModuleOrderEntry orderEntry, boolean productionOnly, @NotNull Collection<String> urls) {
|
||||
public boolean addCustomOutput(@NotNull ModuleOrderEntry orderEntry,
|
||||
boolean productionOnly,
|
||||
boolean runtimeOnly,
|
||||
boolean compileOnly, @NotNull Collection<String> urls) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ abstract class OrderEnumeratorBase extends OrderEnumerator {
|
||||
if (myCustomHandlers != null) {
|
||||
for (OrderEnumerationHandler handler : myCustomHandlers) {
|
||||
final List<String> urls = new ArrayList<String>();
|
||||
final boolean added = handler.addCustomOutput(moduleOrderEntry, myProductionOnly, urls);
|
||||
final boolean added = handler.addCustomOutput(moduleOrderEntry, myProductionOnly, myRuntimeOnly, myCompileOnly, urls);
|
||||
for (String url : urls) {
|
||||
ContainerUtil.addIfNotNull(VirtualFileManager.getInstance().findFileByUrl(url), result);
|
||||
}
|
||||
@@ -298,7 +298,7 @@ abstract class OrderEnumeratorBase extends OrderEnumerator {
|
||||
boolean addCustomOutputUrls(ModuleOrderEntry moduleOrderEntry, Collection<String> result) {
|
||||
if (myCustomHandlers != null) {
|
||||
for (OrderEnumerationHandler handler : myCustomHandlers) {
|
||||
if (handler.addCustomOutput(moduleOrderEntry, myProductionOnly, result)) {
|
||||
if (handler.addCustomOutput(moduleOrderEntry, myProductionOnly, myRuntimeOnly, myCompileOnly, result)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -51,7 +51,7 @@ public class MavenOrderEnumeratorHandler extends OrderEnumerationHandler {
|
||||
@Override
|
||||
public boolean addCustomOutput(@NotNull ModuleOrderEntry orderEntry,
|
||||
boolean productionOnly,
|
||||
@NotNull Collection<String> urls) {
|
||||
boolean runtimeOnly, boolean compileOnly, @NotNull Collection<String> urls) {
|
||||
final Module ownerModule = orderEntry.getOwnerModule();
|
||||
final Module depModule = orderEntry.getModule();
|
||||
if (depModule == null) return false;
|
||||
@@ -65,7 +65,7 @@ public class MavenOrderEnumeratorHandler extends OrderEnumerationHandler {
|
||||
|
||||
for (MavenArtifact each : project.findDependencies(depProject)) {
|
||||
|
||||
if (productionOnly && MavenConstants.SCOPE_PROVIDEED.equals(each.getScope())) continue;
|
||||
if (productionOnly && runtimeOnly && MavenConstants.SCOPE_PROVIDEED.equals(each.getScope())) continue;
|
||||
if (productionOnly && MavenConstants.SCOPE_TEST.equals(each.getScope())) continue;
|
||||
|
||||
boolean isTestJar = MavenConstants.TYPE_TEST_JAR.equals(each.getType()) || "tests".equals(each.getClassifier());
|
||||
|
||||
Reference in New Issue
Block a user