Maven can't locate this plugin due to "org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'spotless'"
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- java
- 領域
- build-system
調査の方向性
まず、プラグイン設定を使用して mvn -s settings.xml spotless:check を再現し、動作する完全修飾 goal と比較します。com.diffplug.spotless:spotless-maven-plugin がどのように公開されているか、またグループレベルの Maven メタデータが生成されているかを調査します。spotless プレフィックスが解決され、check goal が正常に実行されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When try to run "mvn -s settings.xml spotless:check", it can't locate this plugin due to "org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'spotless'"
I even entered the plugin group info in settings.xml:
<pluginGroups>
<pluginGroup>com.diffplug.spotless</pluginGroup>
</pluginGroups>
But maven refuses to find this plugin via prefix. Full naming works though (com.diffplug.spotless:spotless-maven-plugin:check).
For the prefix to work my understanding is that the plugin should provide prefix info in its maven-metadata.xml at the group level. But this plugin does not come with such meta data file. It only has maven-metadata.xml at the artifact level for each artifact version. That is, I could not find maven-metadata.xml which content like this:
<metadata>
<plugins>
<plugin>
<name>Some Awesome Maven Plugin</name>
<prefix>somePrefix</prefix>
<artifactId>some-maven-plugin</artifactId>
</plugin>
</plugins>
</metadata>
- [ ] gradle or maven version
Maven 3.5.0
- [ ] spotless version
1.27.0 but I tried many other versions
- [ ] operating system and version
Ubuntu Xenial
- [ ] copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
It's very simple.
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>1.21.0</version>
<configuration>
<java>
<removeUnusedImports/>
</java>
</configuration>
</plugin>
- [ ] copy-paste the full content of any console errors
[DEBUG] Resolving plugin prefix spotless from [com.diffplug.spotless, org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Using mirror repo (http://scctools.dt.vmware.com:8081/artifactory/repo) for plexus-snapshots (https://oss.sonatype.org/content/repositories/plexus-snapshots).
[DEBUG] Using mirror repo (http://scctools.dt.vmware.com:8081/artifactory/repo) for apache.snapshots (http://repository.apache.org/snapshots).
[DEBUG] Using mirror repo (http://scctools.dt.vmware.com:8081/artifactory/repo) for codehaus.org (http://snapshots.repository.codehaus.org).
[DEBUG] Could not find metadata com.diffplug.spotless/maven-metadata.xml in local (/home/jenkins/.m2/repository)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (/home/jenkins/.m2/repository)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/home/jenkins/.m2/repository)
[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://scctools.dt.vmware.com:8081/artifactory/repo
[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://scctools.dt.vmware.com:8081/artifactory/repo
[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://scctools.dt.vmware.com:8081/artifactory/repo
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://scctools.dt.vmware.com:8081/artifactory/repo
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://scctools.dt.vmware.com:8081/artifactory/repo
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://scctools.dt.vmware.com:8081/artifactory/repo
Downloading: http://scctools.dt.vmware.com:8081/artifactory/repo/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://scctools.dt.vmware.com:8081/artifactory/repo/org/codehaus/mojo/maven-metadata.xml
Downloading: http://scctools.dt.vmware.com:8081/artifactory/repo/com/diffplug/spotless/maven-metadata.xml
[DEBUG] Writing tracking file /home/jenkins/.m2/repository/com/diffplug/spotless/resolver-status.properties
<snipped....>
[DEBUG] Could not find metadata com.diffplug.spotless/maven-metadata.xml in repo (http://scctools.dt.vmware.com:8081/artifactory/repo)
[DEBUG] Could not find metadata com.diffplug.spotless/maven-metadata.xml in local (/home/jenkins/.m2/repository)
[DEBUG] Skipped remote request for com.diffplug.spotless/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find com.diffplug.spotless/maven-metadata.xml in http://scctools.dt.vmware.com:8081/artifactory/repo was cached in the local repository, resolution will not be reattempted until the update interval of repo has elapsed or updates are forced
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (/home/jenkins/.m2/repository)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/home/jenkins/.m2/repository)
- 主要言語
- Java
- スター
- 5.7k
- フォーク
- 560
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 43
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
diffplug/spotless のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
diffplug/spotless の issue をすべて見る
似ている issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/flink-agents#1152 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jenkinsci/blueocean-plugin#5417 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
objectionary/eo-graphs#75 ·