Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5388 from bndtools/issue/5368
[external plugins] Added versioning support
- Loading branch information
Showing
12 changed files
with
213 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
biz.aQute.bndall.tests/src/biz/aQute/bndall/tests/plugin_1/CallablePlugin2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package biz.aQute.bndall.tests.plugin_1; | ||
|
||
import java.io.Closeable; | ||
import java.io.IOException; | ||
import java.util.Map; | ||
import java.util.concurrent.Callable; | ||
|
||
import aQute.bnd.service.Plugin; | ||
import aQute.bnd.service.externalplugin.ExternalPlugin; | ||
import aQute.service.reporter.Reporter; | ||
|
||
@ExternalPlugin(name = "hellocallable", objectClass = Callable.class, version = "2.0.0") | ||
public class CallablePlugin2 implements Callable<String>, Closeable, Plugin { | ||
boolean closed; | ||
String world = "world"; | ||
|
||
@Override | ||
public String call() throws Exception { | ||
if (closed) | ||
return "2goodbye, " + world; | ||
else | ||
return "2hello, " + world; | ||
} | ||
|
||
@Override | ||
public void close() throws IOException { | ||
System.out.println("closed"); | ||
closed = true; | ||
} | ||
|
||
@Override | ||
public void setProperties(Map<String, String> map) throws Exception { | ||
world = map.get("world"); | ||
} | ||
|
||
@Override | ||
public void setReporter(Reporter processor) { | ||
// ignore | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
*/ | ||
@Version("4.3.0") | ||
@Version("4.4.0") | ||
package aQute.bnd.build; | ||
|
||
import org.osgi.annotation.versioning.Version; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.