Maven站点警告:存储库url';https://maven-repository.dev.java.net/nonav/repository' 无效
我正在多模块项目中使用Maven 3.2.3。我想生成checkstyle和findbugs报告,因此我配置了以下内容:Maven站点警告:存储库url';https://maven-repository.dev.java.net/nonav/repository' 无效,maven,url,repository,maven-site-plugin,Maven,Url,Repository,Maven Site Plugin,我正在多模块项目中使用Maven 3.2.3。我想生成checkstyle和findbugs报告,因此我配置了以下内容: <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</reporting>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>
</plugins>
</reporting>
我反复得到以下警告
[WARNING] The repository url 'https://maven-repository.dev.java.net/nonav/repository' is invalid - Repository 'java.net' will be blacklisted.
我在pom.xml文件或~/.m2/settings.xml文件中均未引用此回购协议。我如何追踪这一点并最终解决警告?您必须配置报告插件,以便它在构建报告时不会查找存储库。 在pom中添加以下内容:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</reporting>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>
</plugins>
</reporting>
我有一个maven项目,其中聚合与继承分离: . 为了
mvn project-info-reports:dependencies
工作时,聚合pom
必须继承父级。
为了避免被列入黑名单的存储库警告,必须按照以下所述配置父级报告
,或者可以很简单:
<properties>
...
<dependency.locations.enabled>false</dependency.locations.enabled>
</properties>
...
假的
这可以是父项中的某个位置,也可以在设置.xml中定义。此外,如果您想创建一个站点并部署它,最好使用mvn site deploy
而不是site:site
,site:deploy
,正如我所说,我在pom.xml文件或~/.m2/settings.xml文件中找不到任何引用(我将此注释放在问题的末尾,因此您可能错过了)。无论如何,很高兴了解站点部署的事情。对我来说很有用。添加此配置抑制此警告:[WARNING]存储库url'http://download.java.net/maven/2'无效-存储库'maven2 Repository.dev.java.net'将被列入黑名单。
[警告]存储库url'http://download.java.net/maven/glassfish'无效-存储库'glassfish Repository'将被列入黑名单。
哪里定义了违规回购?刚刚安装了一个新的maven,我得到了这个错误。