From 38d0262cdafc9330352fcea59750f2034eeb80c3 Mon Sep 17 00:00:00 2001 From: Piotr Orleanski Date: Wed, 8 Aug 2018 12:25:07 +0200 Subject: [PATCH] new OSGi annotations - validation --- core/validation/pom.xml | 25 +++++++++++++++++-- .../ValidationResultBuilderFactoryImpl.java | 11 +++----- pom.xml | 15 +++++++++++ 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/core/validation/pom.xml b/core/validation/pom.xml index 3a39b813d..c939d5c39 100644 --- a/core/validation/pom.xml +++ b/core/validation/pom.xml @@ -41,9 +41,18 @@ - org.apache.felix - org.apache.felix.scr.annotations + org.osgi + org.osgi.service.component.annotations + + org.osgi + org.osgi.annotation + + + org.osgi + org.osgi.service.metatype.annotations + + org.apache.commons commons-lang3 @@ -81,6 +90,18 @@ + + + + org.apache.felix + maven-scr-plugin + + + generate-scr-descriptor + none + + + diff --git a/core/validation/src/main/java/com/cognifide/aet/validation/impl/ValidationResultBuilderFactoryImpl.java b/core/validation/src/main/java/com/cognifide/aet/validation/impl/ValidationResultBuilderFactoryImpl.java index e7bb2585a..645cd35ab 100644 --- a/core/validation/src/main/java/com/cognifide/aet/validation/impl/ValidationResultBuilderFactoryImpl.java +++ b/core/validation/src/main/java/com/cognifide/aet/validation/impl/ValidationResultBuilderFactoryImpl.java @@ -17,16 +17,11 @@ import com.cognifide.aet.validation.ValidationResultBuilder; import com.cognifide.aet.validation.ValidationResultBuilderFactory; -import org.apache.felix.scr.annotations.Component; -import org.apache.felix.scr.annotations.Service; +import org.osgi.service.component.annotations.Component; -@Service -@Component( - label = "AET Validation Result Builder Factory", - description = "AET Validation Result Builder Factory") +@Component public class ValidationResultBuilderFactoryImpl implements ValidationResultBuilderFactory { - - @Override + public ValidationResultBuilder createInstance() { return new ValidationResultBuilderImpl(); } diff --git a/pom.xml b/pom.xml index 0d78e339e..210b691e5 100644 --- a/pom.xml +++ b/pom.xml @@ -198,6 +198,21 @@ 1.8.16 provided + + org.osgi + org.osgi.service.component.annotations + 1.3.0 + + + org.osgi + org.osgi.annotation + 6.0.0 + + + org.osgi + org.osgi.service.metatype.annotations + 1.3.0 +