Remove empty invoker.properties
Introduce constant for gpg.passphrase
Apply generics
diff --git a/src/it/alternative-secret-keyring/invoker.properties b/src/it/alternative-secret-keyring/invoker.properties
deleted file mode 100644
index a17cc59..0000000
--- a/src/it/alternative-secret-keyring/invoker.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one

-# or more contributor license agreements.  See the NOTICE file

-# distributed with this work for additional information

-# regarding copyright ownership.  The ASF licenses this file

-# to you under the Apache License, Version 2.0 (the

-# "License"); you may not use this file except in compliance

-# with the License.  You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing,

-# software distributed under the License is distributed on an

-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

-# KIND, either express or implied.  See the License for the

-# specific language governing permissions and limitations

-# under the License.

-

-# Windows doesn't has a gpg-executable

-#invoker.os.family = !windows

diff --git a/src/it/no-main-artifact/invoker.properties b/src/it/no-main-artifact/invoker.properties
deleted file mode 100644
index a17cc59..0000000
--- a/src/it/no-main-artifact/invoker.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one

-# or more contributor license agreements.  See the NOTICE file

-# distributed with this work for additional information

-# regarding copyright ownership.  The ASF licenses this file

-# to you under the Apache License, Version 2.0 (the

-# "License"); you may not use this file except in compliance

-# with the License.  You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing,

-# software distributed under the License is distributed on an

-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

-# KIND, either express or implied.  See the License for the

-# specific language governing permissions and limitations

-# under the License.

-

-# Windows doesn't has a gpg-executable

-#invoker.os.family = !windows

diff --git a/src/it/sign-release/invoker.properties b/src/it/sign-release/invoker.properties
deleted file mode 100644
index a17cc59..0000000
--- a/src/it/sign-release/invoker.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one

-# or more contributor license agreements.  See the NOTICE file

-# distributed with this work for additional information

-# regarding copyright ownership.  The ASF licenses this file

-# to you under the Apache License, Version 2.0 (the

-# "License"); you may not use this file except in compliance

-# with the License.  You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing,

-# software distributed under the License is distributed on an

-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

-# KIND, either express or implied.  See the License for the

-# specific language governing permissions and limitations

-# under the License.

-

-# Windows doesn't has a gpg-executable

-#invoker.os.family = !windows

diff --git a/src/it/sign-with-passphase-from-maven-settings/invoker.properties b/src/it/sign-with-passphase-from-maven-settings/invoker.properties
deleted file mode 100644
index a17cc59..0000000
--- a/src/it/sign-with-passphase-from-maven-settings/invoker.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one

-# or more contributor license agreements.  See the NOTICE file

-# distributed with this work for additional information

-# regarding copyright ownership.  The ASF licenses this file

-# to you under the Apache License, Version 2.0 (the

-# "License"); you may not use this file except in compliance

-# with the License.  You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing,

-# software distributed under the License is distributed on an

-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

-# KIND, either express or implied.  See the License for the

-# specific language governing permissions and limitations

-# under the License.

-

-# Windows doesn't has a gpg-executable

-#invoker.os.family = !windows

diff --git a/src/main/java/org/apache/maven/plugins/gpg/AbstractGpgSigner.java b/src/main/java/org/apache/maven/plugins/gpg/AbstractGpgSigner.java
index 2de3d32..e0a9301 100644
--- a/src/main/java/org/apache/maven/plugins/gpg/AbstractGpgSigner.java
+++ b/src/main/java/org/apache/maven/plugins/gpg/AbstractGpgSigner.java
@@ -35,6 +35,8 @@
  */
 public abstract class AbstractGpgSigner
 {
+    private static final String GPG_PASSPHRASE = "gpg.passphrase";
+
     public static final String SIGNATURE_EXTENSION = ".asc";
 
     protected boolean useAgent;
@@ -229,11 +231,11 @@
 
         if ( project != null )
         {
-            pass = project.getProperties().getProperty( "gpg.passphrase" );
+            pass = project.getProperties().getProperty( GPG_PASSPHRASE );
             if ( pass == null )
             {
                 MavenProject prj2 = findReactorProject( project );
-                pass = prj2.getProperties().getProperty( "gpg.passphrase" );
+                pass = prj2.getProperties().getProperty( GPG_PASSPHRASE );
             }
         }
         if ( pass == null )
@@ -242,7 +244,7 @@
         }
         if ( project != null )
         {
-            findReactorProject( project ).getProperties().setProperty( "gpg.passphrase", pass );
+            findReactorProject( project ).getProperties().setProperty( GPG_PASSPHRASE, pass );
         }
         return pass;
     }
diff --git a/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java b/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java
index 37e747d..90ce6f5 100644
--- a/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java
+++ b/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java
@@ -447,12 +447,8 @@
             }
         }
 
-        List attachedArtifacts = project.getAttachedArtifacts();
-
-        for ( Object attachedArtifact : attachedArtifacts )
+        for ( Artifact attached : project.getAttachedArtifacts() )
         {
-            Artifact attached = (Artifact) attachedArtifact;
-
             fileSig = signer.generateSignatureForArtifact( attached.getFile() );
             attached = new AttachedSignedArtifact( attached, new AscArtifactMetadata( attached, fileSig, false ) );
             try