diff --git a/scrplugin/annotations/changelog.txt b/scrplugin/annotations/changelog.txt
index 5c60008..d833929 100644
--- a/scrplugin/annotations/changelog.txt
+++ b/scrplugin/annotations/changelog.txt
@@ -7,6 +7,7 @@
 
 ** Improvement
     * [FELIX-2939] - Maven SCR Plugin is not (marked as) thread-safe for parallel builds
+    * [FELIX-2908] - Use same mechanism to get single annotation values as for multiple annotation values
 
 
 Changes from 1.4.0 to 1.5.0
diff --git a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
index cb400ca..fc86865 100644
--- a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
+++ b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
@@ -46,11 +46,11 @@
         this.annotation = new Component() {
 
             public boolean componentAbstract() {
-                return Util.getBooleanValue(annotation, "componentAbstract", Component.class);
+                return Util.getBooleanValue(annotation, desc, "componentAbstract", Component.class);
             }
 
             public boolean createPid() {
-                return Util.getBooleanValue(annotation, "createPid", Component.class);
+                return Util.getBooleanValue(annotation, desc, "createPid", Component.class);
             }
 
             public String description() {
@@ -58,7 +58,7 @@
             }
 
             public boolean ds() {
-                return Util.getBooleanValue(annotation, "ds", Component.class);
+                return Util.getBooleanValue(annotation, desc, "ds", Component.class);
             }
 
             public String specVersion() {
@@ -66,7 +66,7 @@
             }
 
             public boolean enabled() {
-                return Util.getBooleanValue(annotation, "enabled", Component.class);
+                return Util.getBooleanValue(annotation, desc, "enabled", Component.class);
             }
 
             public String factory() {
@@ -74,11 +74,11 @@
             }
 
             public boolean immediate() {
-                return Util.getBooleanValue(annotation, "immediate", Component.class);
+                return Util.getBooleanValue(annotation, desc, "immediate", Component.class);
             }
 
             public boolean inherit() {
-                return Util.getBooleanValue(annotation, "inherit", Component.class);
+                return Util.getBooleanValue(annotation, desc, "inherit", Component.class);
             }
 
             public String label() {
@@ -86,7 +86,7 @@
             }
 
             public boolean metatype() {
-                return Util.getBooleanValue(annotation, "metatype", Component.class);
+                return Util.getBooleanValue(annotation, desc, "metatype", Component.class);
             }
 
             public String name() {
@@ -98,7 +98,7 @@
             }
 
             public boolean getConfigurationFactory() {
-                return Util.getBooleanValue(annotation, "getConfigurationFactory", Component.class);
+                return Util.getBooleanValue(annotation, desc, "getConfigurationFactory", Component.class);
             }
 
             public boolean configurationFactory() {
diff --git a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java
index 9264364..5b71f01 100644
--- a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java
+++ b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java
@@ -44,7 +44,7 @@
         this.annotation = new Property() {
 
             public int cardinality() {
-                return Util.getIntValue(annotation, "cardinality", Property.class);
+                return Util.getIntValue(annotation, desc, "cardinality", Property.class);
             }
 
             public String description() {
@@ -84,7 +84,7 @@
             }
 
             public boolean propertyPrivate() {
-                return Util.getBooleanValue(annotation, "propertyPrivate", Property.class);
+                return Util.getBooleanValue(annotation, desc, "propertyPrivate", Property.class);
             }
 
             public String[] value() {
diff --git a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java
index f9429b4..5f84215 100644
--- a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java
+++ b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java
@@ -73,7 +73,7 @@
         final Service tag = new Service() {
 
             public boolean serviceFactory() {
-                return Util.getBooleanValue(annotation, "serviceFactory", Service.class);
+                return Util.getBooleanValue(annotation, desc, "serviceFactory", Service.class);
             }
 
             public Class<?>[] value() {
diff --git a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java
index 1ef1fa9..13d616c 100644
--- a/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java
+++ b/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java
@@ -47,7 +47,7 @@
         {
 
             // generate @Component tag if required
-            boolean generateComponent = Util.getBooleanValue(annotation, "generateComponent", SlingServlet.class);
+            boolean generateComponent = Util.getBooleanValue(annotation, description, "generateComponent", SlingServlet.class);
             if (generateComponent)
             {
                 String name = Util.getStringValue(annotation, description, "name", SlingServlet.class);
@@ -62,12 +62,12 @@
                 if ( desc != null && desc.trim().length() == 0 ) {
                     desc = null;
                 }
-                final boolean createMetatype = Util.getBooleanValue(annotation, "metatype", SlingServlet.class);
+                final boolean createMetatype = Util.getBooleanValue(annotation, description, "metatype", SlingServlet.class);
                 tags.add(new SlingServletComponentTag(annotation, description, createMetatype, name, label, desc));
             }
 
             // generate @Service tag if required
-            boolean generateService = Util.getBooleanValue(annotation, "generateService", SlingServlet.class);
+            boolean generateService = Util.getBooleanValue(annotation, description, "generateService", SlingServlet.class);
             if (generateService)
             {
                 tags.add(new SlingServletServiceTag(annotation, description));
@@ -114,7 +114,7 @@
         else if ( annotationName.equals(SlingFilter.class.getName()) )
         {
             // generate @Component tag if required
-            boolean generateComponent = Util.getBooleanValue(annotation, "generateComponent", SlingFilter.class);
+            boolean generateComponent = Util.getBooleanValue(annotation, description, "generateComponent", SlingFilter.class);
             if (generateComponent)
             {
                 String name = Util.getStringValue(annotation, description, "name", SlingFilter.class);
@@ -129,19 +129,19 @@
                 if ( desc != null && desc.trim().length() == 0 ) {
                     desc = null;
                 }
-                final boolean createMetatype = Util.getBooleanValue(annotation, "metatype", SlingFilter.class);
+                final boolean createMetatype = Util.getBooleanValue(annotation, description, "metatype", SlingFilter.class);
                 tags.add(new SlingFilterComponentTag(annotation, description, createMetatype, name, label, desc));
             }
 
             // generate @Service tag if required
-            boolean generateService = Util.getBooleanValue(annotation, "generateService", SlingFilter.class);
+            boolean generateService = Util.getBooleanValue(annotation, description, "generateService", SlingFilter.class);
             if (generateService)
             {
                 tags.add(new SlingFilterServiceTag(annotation, description));
             }
 
             // property order = service.ranking
-            final int order = Util.getIntValue(annotation, "order", SlingFilter.class);
+            final int order = Util.getIntValue(annotation, description, "order", SlingFilter.class);
             tags.add(new SlingServletPropertyTag(annotation, "service.ranking", String.valueOf(order), description, "Integer", true));
 
             // property scope
diff --git a/scrplugin/generator/changelog.txt b/scrplugin/generator/changelog.txt
index 1c2f6d0..0ded2d5 100644
--- a/scrplugin/generator/changelog.txt
+++ b/scrplugin/generator/changelog.txt
@@ -12,6 +12,7 @@
 ** Improvement
     * [FELIX-2492] - scr plugin: using src annotations causes NoClassDefFoundError and other errors
     * [FELIX-2939] - Maven SCR Plugin is not (marked as) thread-safe for parallel builds
+    * [FELIX-2908] - Use same mechanism to get single annotation values as for multiple annotation values
 
 
 Changes from 1.0.0 to 1.1.0
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/Util.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/Util.java
index 671c616..61eef89 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/Util.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/Util.java
@@ -40,36 +40,36 @@
      * @param clazz The annotation class.
      * @return The boolean value.
      */
-    public static boolean getBooleanValue(Annotation annotation, String name, final Class<?> clazz) {
-        final Object obj = annotation.getNamedParameter(name);
-        if ( obj != null ) {
-            return Boolean.valueOf(obj.toString());
+    public static boolean getBooleanValue(final Annotation annotation, final JavaClassDescription desc, final String name, final Class<?> clazz) {
+        final String[] sValues = getAnnotationValues(annotation, name, desc);
+        if ( sValues != null )
+        {
+            return Boolean.valueOf(sValues[0]);
         }
-        try {
+        try
+        {
             return (Boolean) clazz.getMethod(name).getDefaultValue();
-        } catch( NoSuchMethodException mnfe) {
+        }
+        catch( final NoSuchMethodException mnfe)
+        {
             // we ignore this
             return true;
         }
     }
 
-    public static int getIntValue(Annotation annotation, String name, final Class<?> clazz) {
-        final Object obj = annotation.getNamedParameter(name);
-        if ( obj != null ) {
-            if ( obj instanceof Number ) {
-                return ((Number)obj).intValue();
-            }
-            final String value = obj.toString();
-            if ( value.equals("Integer.MAX_VALUE") ) {
-                return Integer.MAX_VALUE;
-            } else if ( value.equals("Integer.MIN_VALUE") ) {
-                return Integer.MIN_VALUE;
-            }
-            return Integer.valueOf(value);
+    public static int getIntValue(final Annotation annotation, final JavaClassDescription desc, final String name, final Class<?> clazz) {
+        final String[] sValues = getAnnotationValues(annotation, name, desc);
+        if ( sValues != null )
+        {
+            return Integer.valueOf(sValues[0]);
+
         }
-        try {
+        try
+        {
             return (Integer) clazz.getMethod(name).getDefaultValue();
-        } catch( NoSuchMethodException mnfe) {
+        }
+        catch(final NoSuchMethodException mnfe)
+        {
             // we ignore this
             return 0;
         }
@@ -382,11 +382,11 @@
         return getEnumValue(annotation, name, enumClass, clazz, true);
     }
 
+    @SuppressWarnings("unchecked")
     public static String[] getAnnotationValues(final Annotation annotation, final String name, final JavaClassDescription desc)
     throws IllegalArgumentException
     {
-
-        EvaluatingVisitor evaluatingVisitor = new EvaluatingVisitor() {
+        final EvaluatingVisitor evaluatingVisitor = new EvaluatingVisitor() {
 
             public Object visitAnnotationFieldRef( AnnotationFieldRef fieldRef ) {
                 // during prescan of AnnotationTagProviderManager#hasScrPluginAnnotation this method is called without desc attribute
@@ -438,9 +438,9 @@
             }
 
         };
-        @SuppressWarnings("unchecked")
         final List<Object> valueList = evaluatingVisitor.getListValue(annotation, name);
-        if (valueList==null) {
+        if (valueList == null || valueList.size() == 0)
+        {
             return null;
         }
         String[] values = new String[valueList.size()];
diff --git a/scrplugin/maven-scr-plugin/changelog.txt b/scrplugin/maven-scr-plugin/changelog.txt
index b802b36..9df175f 100644
--- a/scrplugin/maven-scr-plugin/changelog.txt
+++ b/scrplugin/maven-scr-plugin/changelog.txt
@@ -11,6 +11,7 @@
 ** Improvement
     * [FELIX-2939] - Maven SCR Plugin is not (marked as) thread-safe for parallel builds
     * [FELIX-2492] - scr plugin: using src annotations causes NoClassDefFoundError and other errors
+    * [FELIX-2908] - Use same mechanism to get single annotation values as for multiple annotation values
 
 
 Changes from 1.6.0 to 1.7.0
diff --git a/scrplugin/scrtask/changelog.txt b/scrplugin/scrtask/changelog.txt
index 87f266a..284b44d 100644
--- a/scrplugin/scrtask/changelog.txt
+++ b/scrplugin/scrtask/changelog.txt
@@ -9,6 +9,7 @@
 
 ** Improvement
     * [FELIX-2492] - scr plugin: using src annotations causes NoClassDefFoundError and other errors
+    * [FELIX-2908] - Use same mechanism to get single annotation values as for multiple annotation values
 
 
 Changes from 1.0.0 to 1.1.0
