Skip to content

Commit

Permalink
store downloads first in temp file and then rename and load maven dow…
Browse files Browse the repository at this point in the history
…nloads again in parallel
  • Loading branch information
michaeloffner committed Dec 20, 2024
1 parent 5ae46f5 commit d089db1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/src/main/java/lucee/runtime/mvn/POM.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,21 @@ private POM(Resource localDirectory, Collection<Repository> repositories, String
this.dependencyScope = dependencyScope;
this.log = log;

initXMLAsync();
cache.put(id(), this);

}

public void initXMLAsync() {
ThreadUtil.getThread(() -> {
synchronized (token) {
try {
initXML();
}
catch (IOException e) {
}
}
}, true).start();
}

void initXML() throws IOException {
Expand Down

0 comments on commit d089db1

Please sign in to comment.