apache / apache/maven-filtering

[MSHARED-995] Documents of patterns used for filtering

Open
#254 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
9
Forks
36
Avg merge
8h 47m
Merged PRs (30d)
4

Description

**[Delany](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=delany)** opened **[MSHARED-995](https://issues.apache.org/jira/browse/MSHARED-995?redirect=false)** and commented

There's basically no documentation on the pattern matching used to filter resources. The filter component documentation reads like dev documentation, and I'm left to trail-and-error to figure it out. Adding to the confusion is that Maven plugins can implement their own pattern matching/strain of regex. I think the assembly plugin does its own thing. Its frustrating enough when regex doesn't match so can I at least be clear on the algorithm.

For example, I want to set a more specific filter to copy resources. The filename may have anywhere between 1 and 5 characters followed by an extension.

I tried five question marks, but that only matches 5 characters not 4.

 

```java
?????.changelog
```

There's no support for something like

 

```java
?{1,5}.changelog
```

 

I see double asterisk in some patterns, suggesting globbing. Can this be stated? Perhaps at one point it was obvious - it may seem too simple to bother with. But the Internet is full of alternatives today and a simple write-up will save a lot of guess-work for newbies and those of us with bad memory.

---

**Issue Links:**
- [MSHARED-1022](https://issues.apache.org/jira/browse/MSHARED-1022) Documents of patterns used for filtering
(_**"is duplicated by"**_)
- [MNG-7495](https://issues.apache.org/jira/browse/MNG-7495) Support wildcard in maven-filtering filter

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the filter component documentation and reviewing the pattern-matching behavior described in the issue, including the distinction between filtering and plugin-specific patterns. Check the linked duplicate MSHARED-1022 before starting. Done means the documentation clearly states the matching algorithm and gives useful examples for wildcard and character-count patterns.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.