diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java
index a84cc95..967f337 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java
@@ -45,6 +45,8 @@
 
     public static final String COMPONENT_ABSTRACT = "abstract";
 
+    public static final String COMPONENT_CREATE_PID = "create-pid";
+
     public static final String PROPERTY = "scr.property";
 
     public static final String PROPERTY_NAME = "name";
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java
index c50042a..08aba82 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java
@@ -123,7 +123,7 @@
             final JavaTag tag = javaSources[i].getTagByName(Constants.COMPONENT);
             if (tag != null) {
                 this.getLog().debug("Processing service class " + javaSources[i].getName());
-                final Component comp = this.createComponent(javaSources[i], metaData);
+                final Component comp = this.createComponent(javaSources[i], tag, metaData);
                 if (comp != null) {
                     if ( comp.isAbstract() ) {
                         this.getLog().debug("Adding abstract descriptor " + comp);
@@ -219,10 +219,9 @@
      * @return The generated component descriptor or null if any error occurs.
      * @throws MojoExecutionException
      */
-    protected Component createComponent(JavaClassDescription description, MetaData metaData)
+    protected Component createComponent(JavaClassDescription description, JavaTag componentTag, MetaData metaData)
     throws MojoExecutionException {
-
-        final JavaTag componentTag = description.getTagByName(Constants.COMPONENT);
+        // create a new component
         final Component component = new Component(componentTag);
 
         // set implementation
@@ -277,6 +276,23 @@
             description = description.getSuperClass();
         } while (inherited && description != null);
 
+        // pid handling
+        final boolean createPid = this.getBoolean(componentTag, Constants.COMPONENT_CREATE_PID, true);
+        if ( createPid ) {
+            // check for an existing pid first
+            boolean found = false;
+            final Iterator iter = component.getProperties().iterator();
+            while ( !found && iter.hasNext() ) {
+                final Property prop = (Property)iter.next();
+                found = org.osgi.framework.Constants.SERVICE_PID.equals( prop.getName() );
+            }
+            if ( !found ) {
+                final Property pid = new Property();
+                component.addProperty(pid);
+                pid.setName(org.osgi.framework.Constants.SERVICE_PID);
+                pid.setValue(component.getName());
+            }
+        }
         final List issues = new ArrayList();
         final List warnings = new ArrayList();
         component.validate(issues, warnings);
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Property.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Property.java
index c4e104d..915a26b 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Property.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Property.java
@@ -87,6 +87,9 @@
      * warnings can be added to the warnings list.
      */
     public void validate(List issues, List warnings) {
-        // might want to check name and type
+        if ( name == null || name.trim().length() == 0 ) {
+            issues.add(this.getMessage("Property name can not be empty."));
+        }
+        // might want to check type (and value)
     }
 }
