Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Hoffmann <m.hoffmann@data-in-motion.biz>
  • Loading branch information
maho7791 committed Aug 29, 2023
1 parent fc42cf7 commit b56a9eb
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ generated/
.metadata
bin/
build/
bin_test/
2 changes: 1 addition & 1 deletion cnf/ext/rsa.mvn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ net.bytebuddy:byte-buddy-agent:1.12.6
org.objenesis:objenesis:3.2

org.apache.felix:org.apache.felix.configadmin:1.9.22
org.apache.felix:org.apache.felix.configurator:1.0.14
org.apache.felix:org.apache.felix.converter:1.0.14
org.apache.felix:org.apache.felix.coordinator:1.0.2
org.apache.felix:org.apache.felix.eventadmin:1.6.2
Expand Down Expand Up @@ -139,3 +138,4 @@ org.bouncycastle:bcpkix-jdk15on:1.70
org.bouncycastle:bcprov-jdk15on:1.70
org.bouncycastle:bctls-jdk15on:1.70
org.bouncycastle:bcutil-jdk15on:1.70
org.apache.felix:org.apache.felix.configurator:1.0.18
4 changes: 4 additions & 0 deletions maven/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target/
.settings/
.project
.classpath
2 changes: 1 addition & 1 deletion org.gecko.playground.ds.config/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
{
"name": "Happy",
"year": 2010,
"album": "I wanna be shappy"
"album": "I wanna be happy"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.osgi.service.component.annotations.Component;

@Component(property = "lang=RE")
@Component(property = "lang=DE")
public class GrussImpl implements GreeterService {

@Override
Expand Down
2 changes: 1 addition & 1 deletion org.gecko.playground.saxon/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ lib.version: 12.3.0
net.sf.saxon:Saxon-HE;version=${lib.version}

-includeresource: \
OSGI-OPT/src=@${repo;net.sf.saxon:Saxon-HE:jar:sources;${lib.version};EXACT},\
@${repo;net.sf.saxon:Saxon-HE:jar;${lib.version};EXACT}!/META-INF/services/*
# OSGI-OPT/src=@${repo;net.sf.saxon:Saxon-HE:jar:sources;${lib.version};EXACT},\

Bundle-Version: ${lib.version}
Bundle-Name: Saxon Re-packaged JAR
Expand Down
1 change: 0 additions & 1 deletion org.gecko.playground.xslt/launch-saxon.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
org.osgi.util.function;version='[1.2.0,1.2.1)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
org.gecko.playground.saxon;version=snapshot,\
org.apache.aries.spifly.dynamic.framework.extension;version='[1.3.6,1.3.7)',\
org.apache.xerces;version='[2.12.2,2.12.3)',\
org.apache.xml.resolver;version='[1.2.0,1.2.1)',\
org.gecko.playground.xmlresolver;version=snapshot,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,17 @@ public class ExampleXSLT {
@Activate
public void activate(BundleContext ctx) {
System.out.println("Transform some book XML into HTML");
// TransformerFactory tf = new TransformerFactoryImpl();
// Alternative 1
// tf = new TransformerFactoryImpl();
// BundleContext ctx = ...
Optional<Bundle> saxon = Arrays.stream(ctx.getBundles()).
filter(b->"org.gecko.playground.saxon".equals(b.getSymbolicName())).
findFirst();
saxon.ifPresent(b->{
BundleWiring wiring = b.adapt(BundleWiring.class);
// Alternative 2
// tf = Class.forName("net.sf.saxon.BasicTransformerFactory", false, wiring.getClassLoader());
// Alternative 3
tf = TransformerFactory.newInstance("net.sf.saxon.BasicTransformerFactory", wiring.getClassLoader());
});
if (Objects.isNull(tf)) {
Expand Down

0 comments on commit b56a9eb

Please sign in to comment.