the warnings look like this. Then under are my plugins How should I configure plugins to remove all META-INF warnings? the warnings look like this. Then under are my plugins How should I configure plugins to remove all META-INF warnings? Hier is one explanation that I have found. Maven Shade plugin: how resolve the warning message "define 1 overlapping resource: [WARNING] - META-INF/MANIFEST.MF"
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] FastInfoset-1.2.15.jar, HikariCP-java7-2.4.13.jar, MigLayout-3.7.2.jar, SparseBitSet-1.2.jar, TeoClientTest.jar, activemq-client-5.17.0.jar, animal-sniffer-annotations-1.17.jar, ant-1.10.12.jar, ant-antlr-1.10.12.jar, ant-junit-1.10.12.jar, ant-launcher-1.10.12.jar, asm-7.1.jar, bapi-skif-11.5.0-SNAPSHOT.jar, bcprov-jdk15on-1.68.jar, byte-buddy-1.8.12.jar, c3p0-0.9.5.4.jar, cglib-3.3.0.jar, checker-qual-2.5.2.jar, classmate-1.4.0.jar, cloning-1.9.12.jar, commons-beanutils-1.9.4.jar, commons-cli-1.4.jar, commons-codec-1.15.jar, commons-collections-3.2.2.jar, commons-collections4-4.4.jar, commons-compiler-3.1.6.jar, commons-compress-1.19.jar, commons-digester-2.1.jar, commons-email-1.5.jar, commons-io-2.11.0.jar, commons-lang-2.6.jar, commons-lang3-3.4.jar, commons-math3-3.6.1.jar, curvesapi-1.06.jar, ecj-3.21.0.jar, error_prone_annotations-2.2.0.jar, failureaccess-1.0.1.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar, groovy-3.0.10.jar, groovy-ant-3.0.10.jar, groovy-astbuilder-3.0.10.jar, groovy-cli-picocli-3.0.10.jar, groovy-console-3.0.10.jar, groovy-datetime-3.0.10.jar, groovy-docgenerator-3.0.10.jar, groovy-groovydoc-3.0.10.jar, groovy-groovysh-3.0.10.jar, groovy-jmx-3.0.10.jar, groovy-json-3.0.10.jar, groovy-jsr223-3.0.10.jar, groovy-macro-3.0.10.jar, groovy-nio-3.0.10.jar, groovy-servlet-3.0.10.jar, groovy-sql-3.0.10.jar, groovy-swing-3.0.10.jar, groovy-templates-3.0.10.jar, groovy-test-3.0.10.jar, groovy-test-junit5-3.0.10.jar, groovy-testng-3.0.10.jar, groovy-xml-3.0.10.jar, gson-2.9.0.jar, guava-27.0.1-jre.jar, hawtbuf-1.11.jar, httpclient-4.5.13.jar, httpcore-4.4.13.jar, httpmime-4.5.13.jar, itext-2.1.7.js9.jar, itextpdf-5.5.6.jar, j2objc-annotations-1.1.jar, jackson-annotations-2.11.3.jar, jackson-core-2.11.3.jar, jackson-databind-2.11.3.jar, jackson-dataformat-xml-2.11.3.jar, jackson-module-jaxb-annotations-2.11.3.jar, jakarta.activation-2.0.1.jar, janino-3.1.6.jar, jasperreports-6.19.0.jar, javaparser-core-3.24.0.jar, javassist-3.28.0-GA.jar, javax.activation-api-1.2.0.jar, javax.annotation-api-1.3.2.jar, javax.jms-api-2.0.1.jar, javax.mail-1.5.6.jar, jaxb-api-2.3.1.jar, jaxb-core-3.0.2.jar, jaxb-impl-3.0.2.jar, jaxb-runtime-2.4.0-b180830.0438.jar, jcl-over-slf4j-1.7.35.jar, jcommander-1.78.jar, jcommon-1.0.24.jar, jdom2-2.0.6.1.jar, jfreechart-1.5.3.jar, jide-action-3.7.10.jar, jide-charts-3.7.10.jar, jide-common-3.7.10.jar, jide-components-3.7.10.jar, jide-dashboard-3.7.10.jar, jide-dock-3.7.10.jar, jide-editor-3.7.10.jar, jide-gantt-3.7.10.jar, jide-grids-3.7.10.jar, jide-pivot-3.7.10.jar, jide-plaf-3.7.10.jar, jide-shortcut-3.7.10.jar, jline-2.14.6.jar, jna-5.11.0.jar, jna-platform-5.11.0.jar, joda-time-2.10.14.jar, jollyday-0.5.10.jar, jquery-3.5.1.jar, jsr305-3.0.2.jar, jul-to-slf4j-1.7.35.jar, junit-jupiter-api-5.8.2.jar, junit-jupiter-engine-5.8.2.jar, junit-platform-commons-1.8.2.jar, junit-platform-engine-1.8.2.jar, junit-platform-launcher-1.8.2.jar, listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, log4j-over-slf4j-1.7.35.jar, logback-classic-1.2.10.jar, logback-core-1.2.10.jar, mapstruct-1.2.0.Final.jar, mchange-commons-java-0.2.15.jar, mybatis-3.5.7.jar, objenesis-3.0.1.jar, ojdbc11-21.5.0.0.jar, opencsv-2.3.jar, opentest4j-1.2.0.jar, picocli-4.6.1.jar, plac-exif-21.2.0.0.jar, poi-4.1.2.jar, poi-ooxml-4.1.2.jar, poi-ooxml-schemas-4.1.2.jar, qdox-1.12.1.jar, quartz-2.3.2.jar, reflections-0.10.2.jar, slf4j-api-1.7.35.jar, spring-aop-5.2.20.RELEASE.jar, spring-beans-5.2.20.RELEASE.jar, spring-context-5.2.20.RELEASE.jar, spring-context-support-5.2.20.RELEASE.jar, spring-core-5.2.20.RELEASE.jar, spring-expression-5.2.20.RELEASE.jar, spring-jdbc-5.2.20.RELEASE.jar, spring-jms-5.2.20.RELEASE.jar, spring-messaging-5.2.20.RELEASE.jar, spring-orm-5.2.20.RELEASE.jar, spring-oxm-5.2.20.RELEASE.jar, spring-plugin-core-1.2.0.RELEASE.jar, spring-plugin-metadata-1.2.0.RELEASE.jar, spring-security-core-5.4.10.jar, spring-tx-5.2.20.RELEASE.jar, spring-web-5.2.20.RELEASE.jar, spring-webmvc-5.2.20.RELEASE.jar, springfox-core-2.9.2.jar, springfox-schema-2.9.2.jar, springfox-spi-2.9.2.jar, springfox-spring-web-2.9.2.jar, springfox-swagger-common-2.9.2.jar, springfox-swagger-ui-2.9.2.jar, springfox-swagger2-2.9.2.jar, stax-ex-1.8.jar, stax2-api-4.2.1.jar, swagger-annotations-1.5.20.jar, swagger-models-1.5.20.jar, teo-common-report-10.3.0-SNAPSHOT.jar, teo-common-ui-10.3.0-SNAPSHOT.jar, teo-common-ui-report-10.3.0-SNAPSHOT.jar, teo-common-util-10.3.0-SNAPSHOT.jar, teo-skif-12.7.0-SNAPSHOT.jar, testng-7.5.jar, threeten-extra-1.5.0.jar, ucp-21.5.0.0.jar, woodstox-core-6.2.1.jar, xbean-spring-4.20.jar, xmlbeans-3.1.0.jar define 1 overlapping resource:
[WARNING] - META-INF/MANIFEST.MF
[WARNING] activemq-client-5.17.0.jar, cglib-3.3.0.jar, classmate-1.4.0.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar, groovy-3.0.10.jar, groovy-ant-3.0.10.jar, groovy-astbuilder-3.0.10.jar, groovy-cli-picocli-3.0.10.jar, groovy-console-3.0.10.jar, groovy-datetime-3.0.10.jar, groovy-docgenerator-3.0.10.jar, groovy-groovydoc-3.0.10.jar, groovy-groovysh-3.0.10.jar, groovy-jmx-3.0.10.jar, groovy-json-3.0.10.jar, groovy-jsr223-3.0.10.jar, groovy-macro-3.0.10.jar, groovy-nio-3.0.10.jar, groovy-servlet-3.0.10.jar, groovy-sql-3.0.10.jar, groovy-swing-3.0.10.jar, groovy-templates-3.0.10.jar, groovy-test-3.0.10.jar, groovy-test-junit5-3.0.10.jar, groovy-testng-3.0.10.jar, groovy-xml-3.0.10.jar, httpclient-4.5.13.jar, httpcore-4.4.13.jar, httpmime-4.5.13.jar, jackson-annotations-2.11.3.jar, jackson-core-2.11.3.jar, jackson-databind-2.11.3.jar, jackson-dataformat-xml-2.11.3.jar, jackson-module-jaxb-annotations-2.11.3.jar, jna-5.11.0.jar, jna-platform-5.11.0.jar, mybatis-3.5.7.jar, objenesis-3.0.1.jar, poi-4.1.2.jar, poi-ooxml-4.1.2.jar, poi-ooxml-schemas-4.1.2.jar, stax2-api-4.2.1.jar, woodstox-core-6.2.1.jar, xbean-spring-4.20.jar define 1 overlapping resource:
[WARNING] - META-INF/LICENSE
[WARNING] activemq-client-5.17.0.jar, cglib-3.3.0.jar, classmate-1.4.0.jar, geronimo-j2ee-management_1.1_spec-1.0.1.jar, groovy-3.0.10.jar, groovy-ant-3.0.10.jar, groovy-astbuilder-3.0.10.jar, groovy-cli-picocli-3.0.10.jar, groovy-console-3.0.10.jar, groovy-datetime-3.0.10.jar, groovy-docgenerator-3.0.10.jar, groovy-groovydoc-3.0.10.jar, groovy-groovysh-3.0.10.jar, groovy-jmx-3.0.10.jar, groovy-json-3.0.10.jar, groovy-jsr223-3.0.10.jar, groovy-macro-3.0.10.jar, groovy-nio-3.0.10.jar, groovy-servlet-3.0.10.jar, groovy-sql-3.0.10.jar, groovy-swing-3.0.10.jar, groovy-templates-3.0.10.jar, groovy-test-3.0.10.jar, groovy-test-junit5-3.0.10.jar, groovy-testng-3.0.10.jar, groovy-xml-3.0.10.jar, httpclient-4.5.13.jar, httpcore-4.4.13.jar, httpmime-4.5.13.jar, jackson-core-2.11.3.jar, jackson-databind-2.11.3.jar, jackson-dataformat-xml-2.11.3.jar, jackson-module-jaxb-annotations-2.11.3.jar, mybatis-3.5.7.jar, objenesis-3.0.1.jar, poi-4.1.2.jar, poi-ooxml-4.1.2.jar, poi-ooxml-schemas-4.1.2.jar, xbean-spring-4.20.jar define 1 //
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/
How can I remove these WARNINGS?
My plugins looks like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<minimizeJar>true</minimizeJar>
<inLibsFilter>!META-INF/**,!META-INF/versions/9/**.class</inLibsFilter>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.basepom.maven</groupId>
<artifactId>duplicate-finder-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>default</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<printEqualFiles>false</printEqualFiles>
<failBuildInCaseOfDifferentContentConflict>false</failBuildInCaseOfDifferentContentConflict>
<failBuildInCaseOfEqualContentConflict>false</failBuildInCaseOfEqualContentConflict>
<failBuildInCaseOfConflict>false</failBuildInCaseOfConflict>
<checkCompileClasspath>true</checkCompileClasspath>
<checkRuntimeClasspath>true</checkRuntimeClasspath>
<checkTestClasspath>false</checkTestClasspath>
<skip>false</skip>
<quiet>false</quiet>
<preferLocal>true</preferLocal>
<useResultFile>true</useResultFile>
<resultFileMinClasspathCount>2</resultFileMinClasspathCount>
<resultFile>${project.build.directory}/duplicate-finder-result.xml</resultFile>
<includeBootClasspath>false</includeBootClasspath>
<bootClasspathProperty>sun.boot.class.path</bootClasspathProperty>
<useDefaultResourceIgnoreList>true</useDefaultResourceIgnoreList>
<includePomProjects>false</includePomProjects>
<useDefaultResourceIgnoreList>true</useDefaultResourceIgnoreList>
<ignoredResourcePatterns>
<ignoredResourcePattern>jasperreports_extension\.properties</ignoredResourcePattern>
<ignoredResourcePattern>\.project</ignoredResourcePattern>
<ignoredResourcePattern>.*\.png$</ignoredResourcePattern>
<ignoredResourcePattern>.*\.txt$</ignoredResourcePattern>
<ignoredResourcePattern>.*\.json$</ignoredResourcePattern>
<ignoredResourcePattern>.*\.xml$</ignoredResourcePattern>
<ignoredResourcePattern>.*\.properties$</ignoredResourcePattern>
<ignoredResourcePattern>.*\.md$</ignoredResourcePattern>
</ignoredResourcePatterns>
<ignoredClassPatterns>
<ignoredClassPattern>(META-INF)</ignoredClassPattern>
</ignoredClassPatterns>
<!-- Beispiele <ignoredResourcePatterns> jasperreports_extension.properties
<ignoredResourcePattern>.*index\.html$</ignoredResourcePattern> </ignoredResourcePatterns>
<ignoredClassPatterns> <ignoredClassPattern>javax.*$</ignoredClassPattern>
</ignoredClassPatterns> -->
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<!-- We need to exclude the signatures for any signed jars otherwise
we get an exception. -->
<excludes>
<exclude>META-INF/*</exclude>
<exclude>META-INF/*.*</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</configuration>
</plugin>
This example works for me:
...
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.example.pikachu.Pikachu</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
<resource>MANIFEST.MF</resource>
</transformer>
</transformers>
<filters>
<filter>
<artifact>com.example.pikachu:*</artifact>
<excludes>
<exclude>META-INF/*.MF</exclude>
</excludes>
</filter>
</filters>
</configuration>
...
I'm using mvn site to generate my site's documentation. For the most part, I'm satisfied with the default site, but I'd like to remove the "About" link from the left hand menu bar and just have the default page be the "Project Information" page. Is there an easy way to do this?
Here only the 'About' report is still included. All other standard reports are removed.
<reporting>
<plugins>
<!-- Add the Maven project information reports -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1.2</version>
<reportSets>
<reportSet>
<reports>
<report>index</report>
<!--
<report>dependencies</report>
<report>project-team</report>
<report>mailing-list</report>
<report>cim</report>
<report>issue-tracking</report>
<report>license</report>
<report>scm</report>
-->
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
You can either modify the source and comment it out or add a css selector for it, or you can include a JS library like jQuery and remove it when the page loads via something like:
$(function () {
// untested
$('#navcolumn h5:contains("Maven")').hide(); // hide the header
$('#navcolumn h5:contains("Maven") + ul ').hide(); // hide the ul
})();
I ended up not using that plugin at all and just used the maven-site-plugin. Maven 3 has a reportPlugins configuration section of the maven pom that lets you specified which reports you want to show up http://maven.apache.org/plugins/maven-site-plugin/maven-3.html
org.apache.maven.plugins
maven-site-plugin
3.0
org.codehaus.mojo
cobertura-maven-plugin
I also provided my own index.apt (in src/site/apt) file to customize the index page text.
I know this is an old question, but I've always found it quite annoying. The 'About' section is redundant, and more important, cause the 'Project Information' menu is expanded by default when you visit the site. Since I didn't found any solution on the web, I had to figure it out myself.
With the following workaround, the 'About' item under the 'Project Information' menu will completely disappear from the site. Just add this to the site.xml file:
...
<body>
<head>
<![CDATA[
<script type="text/javascript">
$(document).ready(function () {
var linkAbout = $('a').filter(function(index) { return $(this).text() === "About"; });
var projectInformationMenu = $('a').filter(function(index) { return $(this).text() === "Project Information"; });
linkAbout.hide();
if (!projectInformationMenu.parent().hasClass('active')) {
projectInformationMenu.parent().children('ul').hide();
projectInformationMenu.children('span').removeClass('icon-chevron-down').addClass('icon-chevron-right');
}
});
</script>
]]>
</head>
...
</body>