In my maven project, I use the pgp plugin to sign my cans. I need to do this only when deploying to a remote repo, but not when installing to a local repo. So I tried to set the phase for deployment.
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
                <execution>
                    <id>sign-artifacts</id>
                    <phase>deploy</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
With this configuration, maven is first deployed in a remote repo, and theh introduces my jars ...
I read that plugins are executed in the order in which they are defined in the POM file, so I tried to configure the deploy-plugin plugin after the plugin, but this had no effect
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
                <execution>
                    <id>sign-artifacts</id>
                    <phase>deploy</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.8.2</version>
            <executions>
                <execution>
                    <phase>deploy</phase>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
How can I achieve that the plugin for the character is not executed during installation, but when deployed before loading artifacts? I am using maven3.