Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#5395] -export failure deadlock] #5398

Merged
merged 1 commit into from Nov 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 27 additions & 18 deletions biz.aQute.bndlib/src/aQute/bnd/build/Project.java
Expand Up @@ -1966,30 +1966,34 @@ public File[] buildLocal(boolean underTest) throws Exception {
return null;
}

Map<File, Resource> exports = builder.doExports(selectedRunFiles);

getInfo(builder);

if (!isOk()) {
return null;
}

for (Map.Entry<File, Resource> ee : exports.entrySet()) {
try (Resource resource = ee.getValue()) {
File outputFile = ee.getKey();
File actual = write(resource::write, outputFile);
if (!selectedRunFiles.isEmpty()) {
Map<File, Resource> exports = builder.doExports(selectedRunFiles);

if (actual != null) {
buildFilesSet.add(actual);
} else {
error("Could not save %s", outputFile);
getInfo(builder);

if (isOk()) {

for (Map.Entry<File, Resource> ee : exports.entrySet()) {
try (Resource resource = ee.getValue()) {
File outputFile = ee.getKey();
File actual = write(resource::write, outputFile);

if (actual != null) {
buildFilesSet.add(actual);
} else {
error("Could not save %s", outputFile);
}
}
}
}
}

if (!isOk()) {
return null;
}

boolean bfsWrite = !bfs.exists() || (lastModified > bfs.lastModified());
if (buildfiles != null) {
Expand Down Expand Up @@ -2622,7 +2626,8 @@ public Jar getValidJar(Jar jar, String id) throws Exception {
return jar;
}

public String _project(@SuppressWarnings("unused") String args[]) {
public String _project(@SuppressWarnings("unused")
String args[]) {
return IO.absolutePath(getBase());
}

Expand Down Expand Up @@ -2713,7 +2718,8 @@ public void action(String command, Object... args) throws Exception {
/**
* Run all before command plugins
*/
void before(@SuppressWarnings("unused") Project p, String a) {
void before(@SuppressWarnings("unused")
Project p, String a) {
List<CommandPlugin> testPlugins = getPlugins(CommandPlugin.class);
for (CommandPlugin testPlugin : testPlugins) {
testPlugin.before(this, a);
Expand All @@ -2723,7 +2729,8 @@ void before(@SuppressWarnings("unused") Project p, String a) {
/**
* Run all after command plugins
*/
void after(@SuppressWarnings("unused") Project p, String a, Throwable t) {
void after(@SuppressWarnings("unused")
Project p, String a, Throwable t) {
List<CommandPlugin> testPlugins = getPlugins(CommandPlugin.class);
for (int i = testPlugins.size() - 1; i >= 0; i--) {
testPlugins.get(i)
Expand All @@ -2737,7 +2744,8 @@ public void refreshAll() {
}

@SuppressWarnings("unchecked")
public void script(@SuppressWarnings("unused") String type, String script) throws Exception {
public void script(@SuppressWarnings("unused")
String type, String script) throws Exception {
script(type, script, new Object[0]);
}

Expand All @@ -2760,7 +2768,8 @@ public void script(String type, String script, Object... args) throws Exception
.eval((Map) p, new StringReader(script));
}

public String _repos(@SuppressWarnings("unused") String args[]) throws Exception {
public String _repos(@SuppressWarnings("unused")
String args[]) throws Exception {
List<RepositoryPlugin> repos = getPlugins(RepositoryPlugin.class);
List<String> names = new ArrayList<>();
for (RepositoryPlugin rp : repos)
Expand Down