[
https://issues.apache.org/jira/browse/MJAR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835309#comment-17835309
]
ASF GitHub Bot commented on MJAR-296:
-------------------------------------
slawekjaranowski commented on code in PR #67:
URL: https://github.com/apache/maven-jar-plugin/pull/67#discussion_r1557256798
##########
src/it/MJAR-296-exclude-default/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>mjar-296-exclude-default</artifactId>
+ <name>mjar-296-suppress-default-excludes</name>
+ <description>Verifies that the resulting jar not includes files excluded by
default</description>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
<project.build.outputTimestamp>2023-11-19T13:25:58Z</project.build.outputTimestamp>
+ </properties>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>@version.maven-resources-plugin@</version>
+ <configuration>
+ <addDefaultExcludes>false</addDefaultExcludes>
Review Comment:
it is param for m-resource-p - all resources should be copied and finally
should be filtered by m-jar-p
> No way to suppress default excludes in maven-jar-plugin
> -------------------------------------------------------
>
> Key: MJAR-296
> URL: https://issues.apache.org/jira/browse/MJAR-296
> Project: Maven JAR Plugin
> Issue Type: Improvement
> Affects Versions: 3.3.0
> Reporter: G.Vaysman
> Assignee: Slawomir Jaranowski
> Priority: Major
> Fix For: 3.4.0
>
> Attachments: jar-default-excludes.zip
>
>
> With the default excludes being expanded further (see
> org.codehaus.plexus.util.AbstractScanner.{*}_DEFAULTEXCLUDES_{*}), a resource
> directory **/ChangeSet/** will never be included in the JAR artifact.
> Some plugins (maven-resources-plugin, maven-assembly-plugin) already allow
> suppressing the exclusion, but not the maven-jar-plugin. Code analysis of the
> JarMojo -> DirectoryScanner call path confirms that there is no way to affect
> the FileSet configuration.
> Again, with ever expanding list of *_DEFAULTEXCLUDES,_* this, on our opinion,
> is quite detrimental, and due to backward compatibility, changing
> resource/package path (say, to ChangeSet2) is not an option.
> I am attaching a very simple project that shows two things:
> # The jar plugin skips adding the **/ChangeSet/** files
> # The resources plugin is configured not to skip (addDefaultExcludes) and
> behaves properly
--
This message was sent by Atlassian Jira
(v8.20.10#820010)