简体   繁体   中英

Plugin 'org.apache.maven.plugins:maven-gpg-plugin:3.0.1' not found

I've come across a project with a pom.xml file that contains the following

...
        <build>
            <plugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <version>3.0.1</version>
                  <executions>
                    <execution>
                      <id>sign-artifacts</id>
                      <phase>verify</phase>
                      <goals>
                        <goal>sign</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
            </plugins>
        </build>

...

So, this pom.xml file contains what is suggested in the documentation .

But my IntelliJ IDE is telling me

Plugin 'org.apache.maven.plugins:maven-gpg-plugin:3.0.1' not found

I tried to update the Maven indices, but this did not fix the issue.

I can still do mvn clean install (provided I comment a section related to the documentation, but this is another, I think unrelated, issue).

Of course, I never used this plugin and I don't know what maven-gpg-plugin actually does (well, I think it's used for signing software). I just wanted to run this project that I found, but, at the same time, I would not like to run it with these errors.

The documentation of this plugin explains that gpg should be on the path.

Signs all of a project's attached artifacts with GnuPG.

You need to have previously configured the default key.

gpg also needs to be on the search path.

So, I realised that I had not installed manually GnuGP, and so that I didn't probably have gpg on the path. So, I thought I had to install it first, and that's what I did.

Here are the instructions on how to install it.

I am on a mac, so I tried to find a brew formula to install it - here it is. So, I did brew install --cask gpg-suite (and I have now gpg on the path), but this did not solve the problem.

Why am I having this problem, and how can I solve it?

尝试“使缓存无效并重新启动”!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM