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

Decoration phase2 #5263

Merged
merged 2 commits into from May 24, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions biz.aQute.bndlib/src/aQute/bnd/build/Project.java
Expand Up @@ -619,8 +619,7 @@ public List<Container> getBundles(Strategy strategyx, String spec, String source
Parameters bundles = parseHeader(spec);
if (source != null) {
Instructions decorator = new Instructions(mergeProperties(source + "+"));
// TODO change the decorated call to remove the second arg.
decorator.decorate(bundles, true);
decorator.decorate(bundles);
decorator = new Instructions(mergeProperties(source + "++"));
decorator.decorate(bundles, true);
}
Expand Down
12 changes: 4 additions & 8 deletions biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
Expand Up @@ -402,8 +402,7 @@ public boolean hasSources() {
@Override
protected Jar getExtra() throws Exception {
Parameters conditionals = getMergedParameters(CONDITIONAL_PACKAGE);
// TODO change the decorated call to remove the second arg.
conditionals.putAll(decorated(CONDITIONALPACKAGE, true));
conditionals.putAll(decorated(CONDITIONALPACKAGE));
if (conditionals.isEmpty())
return null;
logger.debug("do Conditional Package {}", conditionals);
Expand Down Expand Up @@ -629,11 +628,9 @@ private void doExpand(Jar dot) throws Exception {
}

Parameters private_package = getParameters(PRIVATE_PACKAGE);
// TODO change the decorated call to remove the second arg.
Parameters privatepackage = decorated(PRIVATEPACKAGE, true);
Parameters privatepackage = decorated(PRIVATEPACKAGE);
Parameters testpackage = new Parameters();
// TODO change the decorated call to remove the second arg.
Parameters includepackage = decorated(INCLUDEPACKAGE, true);
Parameters includepackage = decorated(INCLUDEPACKAGE);

if (buildInstrs.undertest()) {
String h = mergeProperties(Constants.TESTPACKAGES, "test;presence:=optional");
Expand Down Expand Up @@ -905,8 +902,7 @@ private Instruction matches(Instructions instructions, String pack, Set<Instruct
private void doIncludeResources(Jar jar) throws Exception {
Parameters includes = parseHeader(getProperty("Bundle-Includes"));
if (includes.isEmpty()) {
// TODO change the decorated call to remove the second arg.
includes = decorated(Constants.INCLUDERESOURCE, true);
includes = decorated(Constants.INCLUDERESOURCE);
includes.putAll(getMergedParameters(Constants.INCLUDE_RESOURCE));
} else {
warning("Please use -includeresource instead of Bundle-Includes");
Expand Down
2 changes: 1 addition & 1 deletion cnf/build.bnd
Expand Up @@ -38,7 +38,7 @@ Bundle-Version: ${base.version}.${tstamp}-SNAPSHOT
"org.osgi.namespace.*";~version=latest;~maven-scope=provided,\
"org.osgi.service.*.annotations";~version=latest;~maven-scope=provided

-conditionalpackage+: \
-conditionalpackage++: \
=!aQute.lib.exceptions.*

-testpath+: \
Expand Down