Skip to content

Commit 3966924

Browse files
author
Dave Syer
committed
Tweak parent-child classpath computation
It makes sense to assume that the profiles only apply to the child archive.
1 parent 291882b commit 3966924

File tree

8 files changed

+1685
-5
lines changed

8 files changed

+1685
-5
lines changed

launcher/src/main/java/org/springframework/boot/loader/thin/PathResolver.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,13 @@ private void addRootArchive(List<Archive> archives, Archive archive) {
182182

183183
private List<Dependency> extract(Archive parent, Archive archive, String name,
184184
String[] profiles) {
185-
Properties properties = getProperties(archive, name, profiles);
186185
Resource parentPom = getPom(parent);
187-
List<Dependency> parentDependencies = engine.dependencies(parentPom, properties);
186+
// Assume the profiles only apply to child
187+
List<Dependency> parentDependencies = engine.dependencies(parentPom,
188+
getProperties(archive, name, new String[0]));
188189
Resource childPom = getPom(archive);
189-
List<Dependency> childDependencies = engine.dependencies(childPom, properties);
190+
List<Dependency> childDependencies = engine.dependencies(childPom,
191+
getProperties(archive, name, profiles));
190192
Map<String, Dependency> lookup = new HashMap<>();
191193
for (Dependency dependency : parentDependencies) {
192194
lookup.put(coordinates(dependency), dependency);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[
2+
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
["hidden.org.apache.maven.plugin.MavenPluginManager","hidden.com.google.inject.internal.CircularDependencyProxy"]
3+
]

0 commit comments

Comments
 (0)