File tree Expand file tree Collapse file tree
src/main/java/org/apache/sling/feature/osgi/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 <sling .java.version>11</sling .java.version>
3232 </properties >
3333
34+ <repositories >
35+ <repository >
36+ <id >snapshots-repo</id >
37+ <url >https://oss.sonatype.org/content/repositories/snapshots</url >
38+ <releases >
39+ <enabled >false</enabled >
40+ </releases >
41+ <snapshots >
42+ <enabled >true</enabled >
43+ </snapshots >
44+ </repository >
45+ </repositories >
3446 <build >
3547 <plugins >
3648 <plugin >
4254 </archive >
4355 </configuration >
4456 </plugin >
45- <!--
4657 <plugin >
4758 <groupId >biz.aQute.bnd</groupId >
4859 <artifactId >bnd-maven-plugin</artifactId >
49- <version>4 .3.1 </version>
60+ <version >5 .3.0 </version >
5061 <executions >
5162 <execution >
5263 <goals >
5667 </executions >
5768 <configuration >
5869 <bnd ><![CDATA[
70+ Bundle-Activator: org.apache.sling.feature.osgi.impl.Activator
71+ Export-Package: org.osgi.service.feature
5972 -exportcontents: ${packages;VERSIONED}
6073 -removeheaders: Private-Package,Include-Resource
6174 ]]> </bnd >
6275 </configuration >
6376 </plugin >
64- -->
77+
6578 <plugin >
6679 <groupId >org.apache.rat</groupId >
6780 <artifactId >apache-rat-plugin</artifactId >
8396 </dependency >
8497 <dependency >
8598 <groupId >org.osgi</groupId >
86- <artifactId >osgi.core</artifactId >
87- <version >8.0.0</version >
99+ <artifactId >org.osgi.framework</artifactId >
100+ <version >1.8.0</version >
101+ <scope >provided</scope >
102+ </dependency >
103+ <dependency >
104+ <groupId >org.osgi</groupId >
105+ <artifactId >org.osgi.service.feature</artifactId >
106+ <version >1.0.0-SNAPSHOT</version >
88107 <scope >provided</scope >
89108 </dependency >
90109 <dependency >
Original file line number Diff line number Diff line change 1+ package org .apache .sling .feature .osgi .impl ;
2+
3+ import java .util .Dictionary ;
4+ import java .util .Hashtable ;
5+
6+ import org .osgi .framework .BundleActivator ;
7+ import org .osgi .framework .BundleContext ;
8+ import org .osgi .framework .Constants ;
9+ import org .osgi .framework .ServiceRegistration ;
10+ import org .osgi .service .feature .FeatureService ;
11+
12+ public class Activator implements BundleActivator {
13+
14+ private ServiceRegistration <FeatureService > reg = null ;
15+
16+ @ Override
17+ public void start (BundleContext context ) throws Exception {
18+
19+ Dictionary <String , Object > dict = new Hashtable <>();
20+ dict .put (Constants .SERVICE_VENDOR , "sling" );
21+
22+ reg = context .registerService (FeatureService .class , new FeatureServiceImpl (), dict );
23+ }
24+
25+ @ Override
26+ public void stop (BundleContext context ) throws Exception {
27+ reg .unregister ();
28+
29+ }
30+
31+ }
Original file line number Diff line number Diff line change 3939import org .osgi .service .feature .FeatureConfigurationBuilder ;
4040import org .osgi .service .feature .FeatureExtension ;
4141import org .osgi .service .feature .FeatureExtensionBuilder ;
42+ import org .osgi .service .feature .FeatureService ;
4243import org .osgi .service .feature .ID ;
4344
44- public class FeatureServiceImpl {
45+ public class FeatureServiceImpl implements FeatureService {
4546 private final BuilderFactoryImpl builderFactory = new BuilderFactoryImpl ();
4647
4748 public BuilderFactory getBuilderFactory () {
You can’t perform that action at this time.
0 commit comments