├── .asf.yaml
├── .git-blame-ignore-revs
├── .github
├── ISSUE_TEMPLATE
│ ├── BUG.yml
│ ├── FEATURE.yml
│ └── config.yml
├── dependabot.yml
├── pull_request_template.md
├── release-drafter-3.x.yml
├── release-drafter.yml
└── workflows
│ ├── maven-verify.yml
│ ├── pr-automation.yml
│ ├── release-drafter.yml
│ └── stale.yml
├── .gitignore
├── Jenkinsfile
├── LICENSE
├── NOTICE
├── README.md
├── deploySite.sh
├── pom.xml
└── src
├── it
├── MRESOURCES-104
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── test.properties
│ └── verify.groovy
├── MRESOURCES-105
│ ├── my.properties
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── test.properties
├── MRESOURCES-106
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── file.txt
│ │ │ └── filter.properties
│ └── verify.bsh
├── MRESOURCES-110
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── mresources-110.xml
│ └── verify.groovy
├── MRESOURCES-131
│ ├── pom.xml
│ ├── src
│ │ ├── main
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── apache
│ │ │ │ └── maven
│ │ │ │ └── plugins
│ │ │ │ └── resources
│ │ │ │ └── it
│ │ │ │ └── App.java
│ │ └── test
│ │ │ ├── java
│ │ │ └── org
│ │ │ │ └── apache
│ │ │ │ └── maven
│ │ │ │ └── plugins
│ │ │ │ └── resources
│ │ │ │ └── it
│ │ │ │ └── AppTest.java
│ │ │ └── resources
│ │ │ └── skipped.txt
│ └── verify.groovy
├── MRESOURCES-166
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── resource.txt
│ └── verify.groovy
├── MRESOURCES-171
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── test.properties
│ │ │ └── test.txt
│ └── verify.groovy
├── MRESOURCES-18
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ ├── main
│ │ │ └── resources
│ │ │ │ └── test.properties
│ │ └── test
│ │ │ └── java
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── maven
│ │ │ └── it0105
│ │ │ └── FilterTest.java
│ └── test.properties
├── MRESOURCES-20
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── resource.txt
│ └── verify.bsh
├── MRESOURCES-231
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── test.txt
│ └── verify.groovy
├── MRESOURCES-257
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── test.txt
│ └── verify.groovy
├── MRESOURCES-77
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── filters
│ │ │ ├── custom-filters.properties
│ │ │ ├── filter2.properties
│ │ │ ├── filter3.properties
│ │ │ └── my.filter
│ │ │ └── resources
│ │ │ └── SomeResource.txt
│ └── verify.bsh
├── MRESOURCES-78
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── filtered
│ │ │ └── filtered.properties
│ │ │ └── resources
│ │ │ └── unfiltered.properties
│ └── verify.groovy
├── MRESOURCES-99
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── SomeResource.txt
│ └── verify.groovy
├── binaries-filtering
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── duke-beerjpg.img
│ │ │ ├── file.txt
│ │ │ └── happy_duke.gif
│ └── verify.bsh
├── copy-resources-it
│ ├── pom.xml
│ ├── src
│ │ └── non-packaged-resources
│ │ │ └── configuration.properties
│ └── verify.bsh
├── custom-delimiter
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── filters
│ │ │ ├── filter2.properties
│ │ │ └── my.filter
│ │ │ └── resources
│ │ │ └── SomeResource.txt
│ └── verify.bsh
├── escapeInterpolation
│ ├── pom.xml
│ ├── src
│ │ ├── main
│ │ │ ├── filters
│ │ │ │ └── my.filter
│ │ │ └── resources
│ │ │ │ └── SomeResource.txt
│ │ └── test
│ │ │ ├── filters
│ │ │ └── my.filter
│ │ │ └── resources
│ │ │ └── SomeResource.txt
│ └── verify.bsh
├── filter-filenames
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── ${project.artifactId}.txt
│ │ │ └── ${project.version}.txt
│ └── verify.groovy
├── filter-test-resources
│ ├── pom.xml
│ ├── src
│ │ └── test
│ │ │ ├── filters
│ │ │ └── my.filter
│ │ │ └── resources
│ │ │ └── SomeResource.txt
│ └── verify.bsh
├── filter
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── filters
│ │ │ ├── filter2.properties
│ │ │ ├── filter3.properties
│ │ │ └── my.filter
│ │ │ └── resources
│ │ │ └── SomeResource.txt
│ └── verify.bsh
├── include-git-ignore
│ ├── pom.xml
│ ├── setup.bsh
│ └── verify.bsh
├── includeEmptyDirs
│ ├── README.md
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── filters
│ │ │ └── my.filter
│ │ │ └── resources
│ │ │ ├── SomeResource.txt
│ │ │ ├── empty-dir-child
│ │ │ └── child
│ │ │ │ └── ._placeholder
│ │ │ └── empty-dir
│ │ │ └── ._placeholder
│ └── verify.bsh
├── profile-override
│ ├── invoker.properties
│ ├── pom.xml
│ ├── prebuild.bsh
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── production
│ │ │ └── config.properties
│ │ │ └── test
│ │ │ └── config.properties
│ └── verify.bsh
├── settings.xml
├── skip-yes
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── test-resource.txt
│ └── verify.groovy
└── user-filters
│ ├── filter
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── apache
│ │ │ └── maven
│ │ │ └── plugins
│ │ │ └── resources
│ │ │ └── filters
│ │ │ └── ItFilter.java
│ │ └── resources
│ │ └── META-INF
│ │ └── maven
│ │ └── org.apache.maven.api.di.Inject
│ ├── invoker.properties
│ ├── module
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── filtered
│ │ └── filtered.properties
│ │ └── resources
│ │ └── unfiltered.properties
│ ├── pom.xml
│ ├── test.properties
│ └── verify.groovy
├── main
└── java
│ └── org
│ └── apache
│ └── maven
│ └── plugins
│ └── resources
│ ├── CopyResourcesMojo.java
│ ├── MavenBuildTimestamp.java
│ ├── Providers.java
│ ├── ResourceUtils.java
│ ├── ResourcesMojo.java
│ └── TestResourcesMojo.java
├── site
├── apt
│ ├── examples
│ │ ├── binaries-filtering.apt.vm
│ │ ├── copy-resources.apt.vm
│ │ ├── custom-resource-filters.apt.vm
│ │ ├── encoding.apt.vm
│ │ ├── escape-filtering.apt.vm
│ │ ├── filter.apt
│ │ ├── filtering-properties-files.apt.vm
│ │ ├── include-exclude.apt
│ │ └── resource-directory.apt
│ ├── index.apt.vm
│ └── usage.apt.vm
├── fml
│ └── faq.fml
├── resources
│ └── download.cgi
├── site.xml
└── xdoc
│ └── download.xml.vm
└── test
├── java
└── org
│ └── apache
│ └── maven
│ └── plugins
│ └── resources
│ ├── AbstractPropertyUtilsTest.java
│ ├── BasicPropertyUtilsTest.java
│ ├── CopyResourcesMojoTest.java
│ ├── PropertyUtilsExceptionTest.java
│ ├── ResourcesMojoTest.java
│ ├── TestResourcesTest.java
│ └── stub
│ ├── MavenProjectBasicStub.java
│ ├── MavenProjectBuildStub.java
│ └── MavenProjectResourcesStub.java
├── resources
└── unit
│ ├── propertiesutils-test
│ ├── advance.properties
│ ├── advance_validation.properties
│ ├── basic.properties
│ ├── basic_validation.properties
│ ├── enhanced.properties
│ └── enhanced_validation.properties
│ ├── reflectionproperties-test
│ ├── plugin-config.xml
│ ├── validation.properties
│ └── validation_escapebackslashinpath.properties
│ └── resources-test
│ ├── plugin-config-absolute-path.xml
│ ├── plugin-config-relative-path.xml
│ ├── plugin-config.xml
│ └── validation.properties
└── unit-files
└── copy-resources-test
├── filter-files
└── filter.txt
└── no-filter
└── config.properties
/.asf.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # see https://s.apache.org/asfyaml
18 | github:
19 | description: "Apache Maven Resources Plugin"
20 | homepage: https://maven.apache.org/plugins/maven-resources-plugin/
21 | labels:
22 | - java
23 | - build-management
24 | - maven-plugins
25 | - maven-resources-plugin
26 | - maven
27 | enabled_merge_buttons:
28 | squash: true
29 | merge: false
30 | rebase: true
31 | autolink_jira:
32 | - MRESOURCES
33 | del_branch_on_merge: true
34 | features:
35 | issues: true
36 |
37 | notifications:
38 | commits: commits@maven.apache.org
39 | issues: issues@maven.apache.org
40 | pullrequests: issues@maven.apache.org
41 | jira_options: link label comment
42 |
--------------------------------------------------------------------------------
/.git-blame-ignore-revs:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # Change maven code style (parent 39)
21 | f7a6f229db49673ddd21ff521027b9af49f69bb8
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/BUG.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
19 |
20 | name: Bug Report
21 | description: File a bug report
22 | labels: ["bug"]
23 |
24 | body:
25 | - type: markdown
26 | attributes:
27 | value: |
28 | Thanks for taking the time to fill out this bug report.
29 |
30 | Simple fixes in single PRs do not require issues.
31 |
32 | **Do you use the latest project version?**
33 |
34 | - type: input
35 | id: version
36 | attributes:
37 | label: Affected version
38 | validations:
39 | required: true
40 |
41 | - type: textarea
42 | id: massage
43 | attributes:
44 | label: Bug description
45 | validations:
46 | required: true
47 |
48 |
49 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/FEATURE.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
19 |
20 | name: Feature request
21 | description: File a proposal for new feature, improvement
22 | labels: ["enhancement"]
23 |
24 | body:
25 | - type: markdown
26 | attributes:
27 | value: |
28 | Thanks for taking the time to fill out this new feature, improvement proposal.
29 |
30 | - type: textarea
31 | id: massage
32 | attributes:
33 | label: New feature, improvement proposal
34 | validations:
35 | required: true
36 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
19 |
20 | blank_issues_enabled: false
21 |
22 | contact_links:
23 |
24 | - name: Project Mailing Lists
25 | url: https://maven.apache.org/mailing-lists.html
26 | about: Please ask a question or discuss here
27 |
28 | - name: Old JIRA Issues
29 | url: https://issues.apache.org/jira/projects/MRESOURCES
30 | about: Please search old JIRA issues
31 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | version: 2
18 | updates:
19 |
20 | - package-ecosystem: "maven"
21 | directory: "/"
22 | schedule:
23 | interval: "daily"
24 |
25 | - package-ecosystem: "maven"
26 | directory: "/"
27 | schedule:
28 | interval: "daily"
29 | target-branch: "maven-resources-plugin-3.x"
30 |
31 | - package-ecosystem: "github-actions"
32 | directory: "/"
33 | schedule:
34 | interval: "daily"
35 |
36 | - package-ecosystem: "github-actions"
37 | directory: "/"
38 | schedule:
39 | interval: "daily"
40 | target-branch: "maven-resources-plugin-3.x"
41 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | Following this checklist to help us incorporate your
2 | contribution quickly and easily:
3 |
4 | - [ ] Your pull request should address just one issue, without pulling in other changes.
5 | - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
6 | - [ ] Each commit in the pull request should have a meaningful subject line and body.
7 | Note that commits might be squashed by a maintainer on merge.
8 | - [ ] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
9 | This may not always be possible but is a best-practice.
10 | - [ ] Run `mvn verify` to make sure basic checks pass.
11 | A more thorough check will be performed on your pull request automatically.
12 | - [ ] You have run the integration tests successfully (`mvn -Prun-its verify`).
13 |
14 | If your pull request is about ~20 lines of code you don't need to sign an
15 | [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
16 | please ask on the developers list.
17 |
18 | To make clear that you license your contribution under
19 | the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
20 | you have to acknowledge this by using the following check-box.
21 |
22 | - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
23 | - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
24 |
--------------------------------------------------------------------------------
/.github/release-drafter-3.x.yml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 |
20 | _extends: maven-gh-actions-shared:.github/release-drafter.yml
21 |
--------------------------------------------------------------------------------
/.github/release-drafter.yml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 |
20 | _extends: maven-gh-actions-shared
21 |
22 | include-pre-releases: true
23 | prerelease: true
24 |
25 | header: |
26 | > [!WARNING]
27 | > This plugin is a Maven 4 plugin and requires Maven 4.x to run.
28 |
--------------------------------------------------------------------------------
/.github/workflows/maven-verify.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | name: Verify
19 |
20 | on:
21 | push:
22 | pull_request:
23 |
24 | jobs:
25 | build:
26 | name: Verify
27 | uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
28 | with:
29 | ff-maven: "4.0.0-rc-2" # Maven version for fail-fast-build
30 | maven-matrix: '[ "4.0.0-rc-2" ]'
31 | jdk-matrix: '[ "17", "21" ]'
32 |
--------------------------------------------------------------------------------
/.github/workflows/pr-automation.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | name: PR Automation
19 | on:
20 | pull_request_target:
21 | types:
22 | - closed
23 |
24 | jobs:
25 | pr-automation:
26 | name: PR Automation
27 | uses: apache/maven-gh-actions-shared/.github/workflows/pr-automation.yml@v4
28 |
--------------------------------------------------------------------------------
/.github/workflows/release-drafter.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | name: Release Drafter
19 | on:
20 | push:
21 | branches:
22 | - master
23 | workflow_dispatch:
24 |
25 | jobs:
26 | update_release_draft:
27 | uses: apache/maven-gh-actions-shared/.github/workflows/release-drafter.yml@v4
28 |
--------------------------------------------------------------------------------
/.github/workflows/stale.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | name: Stale
19 |
20 | on:
21 | schedule:
22 | - cron: '46 3 * * *'
23 | issue_comment:
24 | types: [ 'created' ]
25 |
26 | jobs:
27 | stale:
28 | uses: 'apache/maven-gh-actions-shared/.github/workflows/stale.yml@v4'
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | .project
3 | .classpath
4 | .settings/
5 | .svn/
6 | bin/
7 | # Intellij
8 | *.ipr
9 | *.iml
10 | .idea
11 | out/
12 | .DS_Store
13 | /bootstrap
14 | /dependencies.xml
15 | .java-version
16 | .checkstyle
17 | pom.xml.versionsBackup
18 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | asfMavenTlpPlgnBuild(jdks:[ "17", "21" ], maven: [ "4.0.x" ], siteJdk:[ "17" ], siteMvn:[ "4.0.x" ])
21 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Maven Resources Plugin
2 | Copyright 2007-2024 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
--------------------------------------------------------------------------------
/deploySite.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | mvn -Preporting site site:stage $@
23 | mvn scm-publish:publish-scm $@
24 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-104/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.maven.plugins.maven-resources-plugin.its
23 | MRESOURCES-104
24 | 0.0.1-SNAPSHOT
25 | Bug Test
26 |
27 |
28 |
29 | true
30 | src/main/resources
31 |
32 |
33 |
34 |
35 | org.apache.maven.plugins
36 | maven-resources-plugin
37 | @project.version@
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-104/src/main/resources/test.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | email=foo@bar.com
19 | foo=${project.version}
20 | bar=@project.version@
21 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-104/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File(basedir, 'target/classes/test.properties').exists();
20 |
21 | content = new File(basedir, 'target/classes/test.properties').text;
22 | assert content.contains( 'email=foo@bar.com');
23 | assert content.contains( 'foo=0.0.1-SNAPSHOT');
24 | assert content.contains( 'bar=0.0.1-SNAPSHOT');
25 | return true;
--------------------------------------------------------------------------------
/src/it/MRESOURCES-105/my.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test.value=true
19 | toto.value=foo
20 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-105/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.maven.plugins.maven-resources-plugin.its
23 | MRESOURCES-105
24 | 0.0.1-SNAPSHOT
25 | Bug Test
26 |
27 |
28 | my.properties
29 |
30 |
31 |
32 | true
33 | src/main/resources
34 |
35 |
36 |
37 |
38 | org.apache.maven.plugins
39 | maven-resources-plugin
40 | @project.version@
41 |
42 |
43 | $
44 | @
45 | #
46 | ${*}
47 |
48 | false
49 | UTF-8
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-105/src/main/resources/test.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | #init test value (true|false) LINE IS essential for this bug report.#
19 | toto.value=$toto.value$
20 | test.value=#test.value#
21 | test.value=@test.value@
22 | test.value=${test.value}
23 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-106/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | MSHARED-106
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 | ${basedir}/src/main/resources/file.txt
30 |
31 |
32 |
33 |
34 |
35 | true
36 | src/main/resources
37 |
38 |
39 |
40 |
41 | maven-resources-plugin
42 | @project.version@
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-106/src/main/resources/file.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | Dummy content
19 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-106/src/main/resources/filter.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | location=${location}
19 | basedir=${basedir}
20 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-106/verify.bsh:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | */
20 |
21 | import java.io.*;
22 | import java.util.*;
23 |
24 | boolean result = true;
25 |
26 | try
27 | {
28 | File target = new File( basedir, "target" );
29 | if ( !target.exists() || !target.isDirectory() )
30 | {
31 | System.err.println( "target file is missing or a directory." );
32 | return false;
33 | }
34 |
35 | File someResource = new File( target, "/classes/filter.properties" );
36 | if ( !someResource.exists() || !someResource.isFile() )
37 | {
38 | System.err.println( "file.txt is missing or not a file." );
39 | return false;
40 | }
41 |
42 | FileInputStream fis = new FileInputStream( someResource );
43 | Properties p = new Properties();
44 | p.load( fis );
45 |
46 | File f = new File( p.getProperty( "location" ) );
47 | if ( !f.exists() )
48 | {
49 | System.err.println( "Property was not correctly filtered: " + f + "\n" + f.getAbsolutePath() );
50 | result = false;
51 | }
52 |
53 | File basedir = new File( p.getProperty( "basedir" ) );
54 | if ( !basedir.exists() )
55 | {
56 | System.err.println( "Property was not correctly filtered: " + basedir + "\n" + basedir.getAbsolutePath() );
57 | result = false;
58 | }
59 |
60 | File expectedLocation = new File( basedir, "src/main/resources/file.txt" );
61 | if ( !expectedLocation.equals( f ) )
62 | {
63 | System.err.println( "Files doesn't match:\n" + basedir + "\n" + expectedLocation );
64 | result = false;
65 | }
66 | }
67 | catch( IOException e )
68 | {
69 | e.printStackTrace();
70 | result = false;
71 | }
72 |
73 | return result;
74 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-110/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins.maven-resources-plugin.its
24 | MRESOURCES-110
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 | MRESOURCES-110
29 |
30 |
31 | UTF-8
32 | I am the replacement
33 |
34 |
35 |
36 |
37 |
38 | true
39 | src/main/resources
40 |
41 |
42 |
43 |
44 | maven-resources-plugin
45 | @project.version@
46 |
47 | !
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-110/src/main/resources/mresources-110.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
23 |
24 | Why are my !\${\}\! static.content broken if the escapeString occure ?!?
25 | Content with replacement: ${replaceThis} !
26 | Content with escaped replacement: Do not !${replaceThis} !
27 |
28 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-110/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File(basedir, 'target/classes/mresources-110.xml').exists();
20 |
21 | content = new File(basedir, 'target/classes/mresources-110.xml').text;
22 | assert content.contains( 'Content with replacement: I am the replacement !');
23 | assert content.contains( 'Content with escaped replacement: Do not ${replaceThis} !');
24 |
25 | return true;
--------------------------------------------------------------------------------
/src/it/MRESOURCES-131/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins.resources.it
24 | MRESOURCES-131
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 |
30 | junit
31 | junit
32 | 3.8.1
33 | test
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | maven-resources-plugin
42 | @project.version@
43 |
44 | true
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-131/src/main/java/org/apache/maven/plugins/resources/it/App.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.maven.plugins.resources.it;
20 |
21 | /*
22 | * Licensed to the Apache Software Foundation (ASF) under one
23 | * or more contributor license agreements. See the NOTICE file
24 | * distributed with this work for additional information
25 | * regarding copyright ownership. The ASF licenses this file
26 | * to you under the Apache License, Version 2.0 (the
27 | * "License"); you may not use this file except in compliance
28 | * with the License. You may obtain a copy of the License at
29 | *
30 | * http://www.apache.org/licenses/LICENSE-2.0
31 | *
32 | * Unless required by applicable law or agreed to in writing,
33 | * software distributed under the License is distributed on an
34 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
35 | * KIND, either express or implied. See the License for the
36 | * specific language governing permissions and limitations
37 | * under the License.
38 | */
39 |
40 | /**
41 | * Hello world!
42 | *
43 | */
44 | public class App {
45 | public static void main(String[] args) {
46 | System.out.println("Hello World!");
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-131/src/test/java/org/apache/maven/plugins/resources/it/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.maven.plugins.resources.it;
20 |
21 | /*
22 | * Licensed to the Apache Software Foundation (ASF) under one
23 | * or more contributor license agreements. See the NOTICE file
24 | * distributed with this work for additional information
25 | * regarding copyright ownership. The ASF licenses this file
26 | * to you under the Apache License, Version 2.0 (the
27 | * "License"); you may not use this file except in compliance
28 | * with the License. You may obtain a copy of the License at
29 | *
30 | * http://www.apache.org/licenses/LICENSE-2.0
31 | *
32 | * Unless required by applicable law or agreed to in writing,
33 | * software distributed under the License is distributed on an
34 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
35 | * KIND, either express or implied. See the License for the
36 | * specific language governing permissions and limitations
37 | * under the License.
38 | */
39 |
40 | import junit.framework.Test;
41 | import junit.framework.TestCase;
42 | import junit.framework.TestSuite;
43 |
44 | /**
45 | * Unit test for simple App.
46 | */
47 | public class AppTest extends TestCase {
48 | /**
49 | * Create the test case
50 | *
51 | * @param testName name of the test case
52 | */
53 | public AppTest(String testName) {
54 | super(testName);
55 | }
56 |
57 | /**
58 | * @return the suite of tests being tested
59 | */
60 | public static Test suite() {
61 | return new TestSuite(AppTest.class);
62 | }
63 |
64 | /**
65 | * Rigourous Test :-)
66 | */
67 | public void testApp() {
68 | assertTrue(true);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-131/src/test/resources/skipped.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | This file should be skipped.
--------------------------------------------------------------------------------
/src/it/MRESOURCES-131/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | skippedFile = new File(basedir, 'target/test-classes/skipped.txt');
20 | assert !skippedFile.exists();
21 |
22 | return true;
--------------------------------------------------------------------------------
/src/it/MRESOURCES-166/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-filter-MRESOURCES-166
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 | sandbox
30 |
31 |
32 |
33 |
34 |
35 | true
36 | src/main/resources
37 |
38 |
39 |
40 |
41 |
42 | org.apache.maven.plugins
43 | maven-resources-plugin
44 | @project.version@
45 |
46 | true
47 | \
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-166/src/main/resources/resource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | fileValue=${foo.file}
19 | export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
20 | envserver=${httpd.server.env}
21 | bar=foo
--------------------------------------------------------------------------------
/src/it/MRESOURCES-166/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File(basedir, 'target/classes/resource.txt').exists();
20 |
21 | filteredContent = new File(basedir, 'target/classes/resource.txt').text;
22 | assert filteredContent.contains( 'fileValue=${foo.file}');
23 | assert filteredContent.contains( 'export SERVER_ENV=${SERVER_ENV:sandbox}');
24 |
25 | return true;
--------------------------------------------------------------------------------
/src/it/MRESOURCES-171/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.maven.plugins.maven-resources-plugin.its
23 | MRESOURCES-171
24 | 0.0.1-SNAPSHOT
25 | Bug Test
26 |
27 |
28 | UTF-8
29 |
30 |
31 |
32 |
33 |
34 | true
35 | src/main/resources
36 |
37 |
38 |
39 |
40 | org.apache.maven.plugins
41 | maven-resources-plugin
42 | @project.version@
43 |
44 | ISO-8859-1
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-171/src/main/resources/test.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/maven-resources-plugin/23ad3e38e386191ab05c825324e337d10e10aea3/src/it/MRESOURCES-171/src/main/resources/test.properties
--------------------------------------------------------------------------------
/src/it/MRESOURCES-171/src/main/resources/test.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | Some text encoded in UTF-8 containing non-ascii characters conexión.
19 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-171/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File( basedir, 'target/classes/test.properties' ).exists();
20 | assert new File( basedir, 'target/classes/test.txt' ).exists();
21 |
22 | sourceTextContent = new File( basedir, 'src/main/resources/test.txt' ).text;
23 | targetTextContent = new File( basedir, 'target/classes/test.txt' ).text;
24 | assert sourceTextContent.equals( targetTextContent );
25 | return true;
26 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-18/invoker.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | invoker.goals = clean test
19 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-18/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.its.it0105
24 | maven-it-it0105
25 | 1.0
26 |
27 | Maven Integration Test :: it0105
28 | MRESOURCES-18
29 |
30 |
31 | foo
32 |
33 |
34 |
35 |
36 | junit
37 | junit
38 | 3.8.1
39 | jar
40 | test
41 |
42 |
43 |
44 |
45 |
46 |
47 | true
48 | src/main/resources
49 |
50 |
51 |
52 |
53 | maven-resources-plugin
54 | @project.version@
55 |
56 |
57 | maven-surefire-plugin
58 | 3.2.1
59 |
60 |
61 |
62 |
63 | cli.param
64 | ${cli.param}
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-18/src/main/resources/test.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | system.property=${java.version}
19 | cli.param=${cli.param}
20 | pom.property=${my.property}
21 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-18/test.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | cli.param = CLI
19 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-20/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-filter
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 |
30 |
31 | true
32 | src/main/resources
33 |
34 |
35 |
36 |
37 |
38 | maven-resources-plugin
39 | @project.version@
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-20/src/main/resources/resource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | fileValue=${foo.file}
--------------------------------------------------------------------------------
/src/it/MRESOURCES-20/verify.bsh:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | */
20 |
21 | import java.io.*;
22 |
23 | import org.codehaus.plexus.util.*;
24 |
25 | boolean result = true;
26 |
27 | try
28 | {
29 | File target = new File( basedir, "target" );
30 | if ( !target.exists() || !target.isDirectory() )
31 | {
32 | System.err.println( "target file is missing or a directory." );
33 | return false;
34 | }
35 |
36 | File someResource = new File( target, "/classes/resource.txt" );
37 | if ( !someResource.exists() || someResource.isDirectory() )
38 | {
39 | System.err.println( "SomeResource.txt is missing or not a file." );
40 | return false;
41 | }
42 |
43 | String paramContent = FileUtils.fileRead( someResource );
44 |
45 | int indexOf = paramContent.indexOf( "fileValue=${foo.file}" );
46 | if ( indexOf < 0 )
47 | {
48 | System.err.println( "SomeResource.txt not contains fileValue=${foo.file}" );
49 | return false;
50 | }
51 | }
52 | catch( IOException e )
53 | {
54 | e.printStackTrace();
55 | result = false;
56 | }
57 |
58 | return result;
59 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-231/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.maven.plugins.maven-resources-plugin.its
23 | MRESOURCES-231
24 | 0.0.1-SNAPSHOT
25 | Bug Test
26 |
27 | UTF-8
28 |
29 |
30 |
31 |
32 | true
33 | src/main/resources
34 |
35 |
36 |
37 |
38 | org.apache.maven.plugins
39 | maven-resources-plugin
40 | @project.version@
41 |
42 | ∅
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-231/src/main/resources/test.txt:
--------------------------------------------------------------------------------
1 |
19 |
20 | something\with\default\escape\string\and\a\property\like\${project.build.sourceEncoding}\in\between
21 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-231/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File(basedir, 'target/classes/test.txt').exists();
20 |
21 | content = new File(basedir, 'target/classes/test.txt').text;
22 | assert content.contains( 'something\\with\\default\\escape\\string\\and\\a\\property\\like\\UTF-8\\in\\between' );
23 | return true;
24 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-257/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.maven.plugins.maven-resources-plugin.its
23 | MRESOURCES-257
24 | 0.0.1-SNAPSHOT
25 | Bug Test
26 |
27 | This is a minimal description
28 | of the project developed by ${project.developers[0].email}
29 |
30 |
31 | orga
32 |
33 |
34 |
35 |
36 | jdoe
37 | John Doe
38 | jdoe@example.com
39 | http://www.example.com/jdoe
40 | ACME
41 | http://www.example.com
42 |
43 | architect
44 | developer
45 |
46 | America/New_York
47 |
48 | http://www.example.com/jdoe/pic
49 |
50 |
51 |
52 |
53 |
54 | UTF-8
55 |
56 |
57 |
58 |
59 |
60 | true
61 | src/main/resources
62 |
63 |
64 |
65 |
66 | org.apache.maven.plugins
67 | maven-resources-plugin
68 | @project.version@
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-257/src/main/resources/test.txt:
--------------------------------------------------------------------------------
1 |
19 |
20 | to be filtered:
21 | does not work: ${project.developers[0].email}
22 | works: ${project.organization.name}
23 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-257/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File(basedir, 'target/classes/test.txt').exists();
20 |
21 | content = new File(basedir, 'target/classes/test.txt').text;
22 | assert content.contains( 'jdoe@example.com' );
23 | assert content.contains( 'orga' );
24 | return true;
25 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-77/src/main/filters/custom-filters.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | var1=Bar
19 | var3=${var2}/Stuff
20 | custom=my-custom-filter-value
--------------------------------------------------------------------------------
/src/it/MRESOURCES-77/src/main/filters/filter2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | var1=Foo
19 | var3=${var2}/Thing
--------------------------------------------------------------------------------
/src/it/MRESOURCES-77/src/main/filters/filter3.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | var2=${var1}-Bar
--------------------------------------------------------------------------------
/src/it/MRESOURCES-77/src/main/filters/my.filter:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | filter.token.project.version=${project.version}
19 | filter.token.projectProperty=${projectProperty}
20 | filter.token.profileProperty=${profileProperty}
21 | execProps=fromFilter
22 | value=foo
--------------------------------------------------------------------------------
/src/it/MRESOURCES-77/src/main/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test:direct resolution project.version=${project.version}
19 | test:filter resolution project.version=${filter.token.project.version}
20 |
21 | test:filter direct projectProperty=${projectProperty}
22 | test:filter resolution projectProperty=${filter.token.projectProperty}
23 |
24 | test:filter direct profileProperty=${profileProperty}
25 | test:filter resolution profileProperty=${filter.token.profileProperty}
26 |
27 | test:filter syspropsExecutionPropsWins=${execProps}
28 |
29 | newToken=@value@
30 |
31 | var3=${var3}
32 |
33 | custom=${custom}
--------------------------------------------------------------------------------
/src/it/MRESOURCES-78/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.opennms
23 | resources-test
24 | 1.0
25 | OpenNMS Resources Test
26 |
27 | this is escaped
28 | this is escaped.at
29 | this is foo
30 | this is bar
31 |
32 |
33 |
34 |
35 | src/main/resources
36 |
37 |
38 | true
39 | src/main/filtered
40 |
41 |
42 |
43 |
44 | org.apache.maven.plugins
45 | maven-resources-plugin
46 | @project.version@
47 |
48 | UTF-8
49 | \
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-78/src/main/filtered/filtered.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | escaped=\${escaped}
19 | escaped.at=\@escaped.at@
20 | foo=${foo}
21 | project.foo=${project.foo}
22 | bar=@bar@
23 | project.bar=@project.bar@
24 | not.a.property=${not.a.property}
25 | not.a.property.at=@not.a.property@
26 | version=${version}
27 | version.at=@version@
28 | project.version=${project.version}
29 | project.version.at=@project.version@
30 | target=@target@
31 | target.at=@target.at@
32 | project.target=@project.target@
33 | project.target.at=@project.target@
34 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-78/src/main/resources/unfiltered.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | escaped=\${escaped}
19 | escaped.at=\@escaped.at@
20 | foo=${foo}
21 | project.foo=${project.foo}
22 | bar=@bar@
23 | project.bar=@project.bar@
24 | not.a.property=${not.a.property}
25 | not.a.property.at=@not.a.property@
26 | version=${version}
27 | version.at=@version@
28 | project.version=${project.version}
29 | project.version.at=@project.version@
30 | target=@target@
31 | target.at=@target.at@
32 | project.target=@project.target@
33 | project.target.at=@project.target@
34 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-78/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File(basedir, 'target/classes/filtered.properties').exists();
20 | assert new File(basedir, 'target/classes/unfiltered.properties').exists();
21 |
22 | filteredContent = new File(basedir, 'target/classes/filtered.properties').text;
23 | assert filteredContent.contains( 'bar=this is bar');
24 | assert filteredContent.contains( 'escaped=${escaped}');
25 | assert filteredContent.contains( 'escaped.at=@escaped.at@');
26 |
27 | return true;
--------------------------------------------------------------------------------
/src/it/MRESOURCES-99/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-filter
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 | yyyy-MM-dd'T'HH:mm:ss'Z'
30 |
31 |
32 |
33 |
34 | true
35 | src/main/resources
36 |
37 |
38 |
39 |
40 |
41 | maven-resources-plugin
42 | @project.version@
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/it/MRESOURCES-99/src/main/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | timestamp=${maven.build.timestamp}
19 | at.timestamp=@maven.build.timestamp@
20 | build.timestamp=${build.timestamp}
21 | project.build.timestamp=${project.build.timestamp}
22 | baseUri=${baseUri}
23 | project.baseUri=${project.baseUri}
24 | pom.baseUri=${pom.baseUri}
25 | at.baseUri=@baseUri@
26 | groupId=${project.groupId}
27 | basedir=${basedir}
28 | project.basedir=${project.basedir}
29 |
--------------------------------------------------------------------------------
/src/it/binaries-filtering/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-binaries-filtering
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 |
30 |
31 | true
32 | src/main/resources
33 |
34 |
35 |
36 |
37 |
38 | maven-resources-plugin
39 | @project.version@
40 |
41 |
42 |
43 |
44 |
45 | maven-resources-plugin
46 | @project.version@
47 |
48 |
49 | img
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/it/binaries-filtering/src/main/resources/duke-beerjpg.img:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/maven-resources-plugin/23ad3e38e386191ab05c825324e337d10e10aea3/src/it/binaries-filtering/src/main/resources/duke-beerjpg.img
--------------------------------------------------------------------------------
/src/it/binaries-filtering/src/main/resources/file.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | version=${pom.version}
--------------------------------------------------------------------------------
/src/it/binaries-filtering/src/main/resources/happy_duke.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/maven-resources-plugin/23ad3e38e386191ab05c825324e337d10e10aea3/src/it/binaries-filtering/src/main/resources/happy_duke.gif
--------------------------------------------------------------------------------
/src/it/binaries-filtering/verify.bsh:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | */
20 |
21 | import java.io.*;
22 | import org.codehaus.plexus.util.*;
23 |
24 | boolean result = true;
25 |
26 | filesAreIdentical( File expected, File current )
27 | throws IOException
28 | {
29 | if ( expected.length() != current.length() )
30 | {
31 | return false;
32 | }
33 | FileInputStream expectedIn = new FileInputStream( expected );
34 | FileInputStream currentIn = new FileInputStream( current );
35 | try
36 | {
37 | byte[] expectedBuffer = IOUtil.toByteArray( expectedIn );
38 |
39 | byte[] currentBuffer = IOUtil.toByteArray( currentIn );
40 | if (expectedBuffer.length != currentBuffer.length)
41 | {
42 | return false;
43 | }
44 | for (int i = 0,size = expectedBuffer.length;i
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-copy-resources-it
25 | 1.0.1-SNAPSHOT
26 | jar
27 |
28 |
29 |
30 |
31 | true
32 | src/main/resources
33 |
34 |
35 |
36 |
37 |
38 | maven-resources-plugin
39 | @project.version@
40 |
41 |
42 |
43 |
44 |
45 | maven-resources-plugin
46 |
47 |
48 | copy-resources
49 |
50 | copy-resources
51 |
52 | validate
53 |
54 | ${basedir}/target/extra-resources
55 |
56 |
57 | src/non-packaged-resources
58 | true
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/src/it/copy-resources-it/src/non-packaged-resources/configuration.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | artifactId=${pom.artifactId}
19 | version=${pom.version}
--------------------------------------------------------------------------------
/src/it/copy-resources-it/verify.bsh:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | */
20 |
21 | import java.io.*;
22 |
23 | import org.codehaus.plexus.util.*;
24 |
25 | boolean result = true;
26 |
27 | try
28 | {
29 | File target = new File( basedir, "target" );
30 | if ( !target.exists() || !target.isDirectory() )
31 | {
32 | System.err.println( "target file is missing or a directory." );
33 | return false;
34 | }
35 |
36 | File resource = new File( target, "/extra-resources/configuration.properties" );
37 | if ( !resource.exists() || resource.isDirectory() )
38 | {
39 | System.err.println( "configuration.properties is missing or not a file." );
40 | return false;
41 | }
42 |
43 | String paramContent = FileUtils.fileRead( resource );
44 |
45 | int indexOf = paramContent.indexOf( "artifactId=maven-resources-plugin-copy-resources-it" );
46 | if ( indexOf < 0 )
47 | {
48 | System.err.println( "configuration.properties not contains artifactId=maven-resources-plugin-copy-resources-it" );
49 | return false;
50 | }
51 |
52 | int indexOf = paramContent.indexOf( "version=1.0.1-SNAPSHOT" );
53 | if ( indexOf < 0 )
54 | {
55 | System.err.println( "configuration.properties not contains version=1.0.1-SNAPSHOT" );
56 | return false;
57 | }
58 | }
59 | catch( IOException e )
60 | {
61 | e.printStackTrace();
62 | result = false;
63 | }
64 |
65 | return result;
66 |
--------------------------------------------------------------------------------
/src/it/custom-delimiter/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-filter
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
33 |
34 | foo-projectProperty-bar
35 |
36 |
37 |
38 |
39 | src/main/filters/my.filter
40 | src/main/filters/filter2.properties
41 |
42 |
43 |
44 | true
45 | src/main/resources
46 |
47 |
48 |
49 |
50 | maven-resources-plugin
51 | @project.version@
52 |
53 |
54 | *<]]>
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | true
65 |
66 |
67 | foo-profileProperty-bar
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/it/custom-delimiter/src/main/filters/filter2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | var1=Foo
19 | var2=${var1}-Bar
20 | var3=${var2}/Thing
--------------------------------------------------------------------------------
/src/it/custom-delimiter/src/main/filters/my.filter:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | filter.token.project.version=${project.version}
19 | filter.token.projectProperty=${projectProperty}
20 | filter.token.profileProperty=${profileProperty}
21 | execProps=fromFilter
22 | value=foo
--------------------------------------------------------------------------------
/src/it/custom-delimiter/src/main/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test:direct resolution project.version=${project.version}
19 | test:filter resolution project.version=${filter.token.project.version}
20 |
21 | test:filter direct projectProperty=${projectProperty}
22 | test:filter resolution projectProperty=${filter.token.projectProperty}
23 |
24 | test:filter direct profileProperty=${profileProperty}
25 | test:filter resolution profileProperty=${filter.token.profileProperty}
26 |
27 | test:filter syspropsExecutionPropsWins=${execProps}
28 |
29 | newToken=@value@
30 |
31 | var3=>var3<
32 |
--------------------------------------------------------------------------------
/src/it/escapeInterpolation/src/main/filters/my.filter:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | filter.token.project.version=${project.version}
19 | filter.token.projectProperty=${projectProperty}
20 | filter.token.profileProperty=${profileProperty}
21 | execProps=fromFilter
22 | value=foo
--------------------------------------------------------------------------------
/src/it/escapeInterpolation/src/main/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test:direct resolution project.version=${project.version}
19 | test:filter resolution project.version=${filter.token.project.version}
20 |
21 | test:filter direct projectProperty=${projectProperty}
22 | test:filter resolution projectProperty=${filter.token.projectProperty}
23 |
24 | test:filter direct profileProperty=${profileProperty}
25 | test:filter resolution profileProperty=${filter.token.profileProperty}
26 |
27 | test:filter syspropsExecutionPropsWins=${execProps}
28 |
29 | newToken=@value@
30 |
31 | escapeString=\${project.artifactId}
--------------------------------------------------------------------------------
/src/it/escapeInterpolation/src/test/filters/my.filter:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | filter.token.project.version=${project.version}
19 | filter.token.projectProperty=${projectProperty}
20 | filter.token.profileProperty=${profileProperty}
--------------------------------------------------------------------------------
/src/it/escapeInterpolation/src/test/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test:direct resolution project.version=${project.version}
19 | test:filter resolution project.version=${filter.token.project.version}
20 |
21 | test:filter direct projectProperty=${projectProperty}
22 | test:filter resolution projectProperty=${filter.token.projectProperty}
23 |
24 | test:filter direct profileProperty=${profileProperty}
25 | test:filter resolution profileProperty=${filter.token.profileProperty}
26 |
27 | escapeString=\${project.version}
--------------------------------------------------------------------------------
/src/it/filter-filenames/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-filter-filenames
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 |
30 |
31 | true
32 | src/main/resources
33 |
34 |
35 |
36 |
37 |
38 | maven-resources-plugin
39 | @project.version@
40 |
41 | true
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/it/filter-filenames/src/main/resources/${project.artifactId}.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | ${project.groupId}
18 | ${project.version}
19 | ${project.artifactId}
20 |
--------------------------------------------------------------------------------
/src/it/filter-filenames/src/main/resources/${project.version}.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | ${project.groupId}
18 | ${project.version}
19 | ${project.artifactId}
20 |
--------------------------------------------------------------------------------
/src/it/filter-filenames/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | def fileName = '1.0-SNAPSHOT.txt'
20 | def targetClassFolder = 'target/classes/'
21 | assert new File(basedir, targetClassFolder + fileName).exists();
22 |
23 | content = new File(basedir, targetClassFolder + fileName).text;
24 | assert content.contains( 'org.apache.maven.plugins');
25 | assert content.contains( 'maven-resources-plugin-it-filter-filenames');
26 | assert content.contains( '1.0-SNAPSHOT');
27 |
28 | fileName = 'maven-resources-plugin-it-filter-filenames.txt'
29 | assert new File(basedir, targetClassFolder + fileName).exists();
30 |
31 | content = new File(basedir, targetClassFolder + fileName).text;
32 | assert content.contains( 'org.apache.maven.plugins');
33 | assert content.contains( 'maven-resources-plugin-it-filter-filenames');
34 | assert content.contains( '1.0-SNAPSHOT');
35 |
36 | return true;
37 |
--------------------------------------------------------------------------------
/src/it/filter-test-resources/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-filter
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
33 |
34 | foo-projectProperty-bar
35 |
36 |
37 |
38 |
39 | src/test/filters/my.filter
40 |
41 |
42 |
43 | true
44 | src/test/resources
45 |
46 |
47 |
48 |
49 |
50 | maven-resources-plugin
51 | @project.version@
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | true
61 |
62 |
63 | foo-profileProperty-bar
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/src/it/filter-test-resources/src/test/filters/my.filter:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | filter.token.project.version=${project.version}
19 | filter.token.projectProperty=${projectProperty}
20 | filter.token.profileProperty=${profileProperty}
--------------------------------------------------------------------------------
/src/it/filter-test-resources/src/test/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test:direct resolution project.version=${project.version}
19 | test:filter resolution project.version=${filter.token.project.version}
20 |
21 | test:filter direct projectProperty=${projectProperty}
22 | test:filter resolution projectProperty=${filter.token.projectProperty}
23 |
24 | test:filter direct profileProperty=${profileProperty}
25 | test:filter resolution profileProperty=${filter.token.profileProperty}
26 |
27 |
--------------------------------------------------------------------------------
/src/it/filter/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-filter
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
33 |
34 | foo-projectProperty-bar
35 |
36 |
37 |
38 |
39 | src/main/filters/my.filter
40 | src/main/filters/filter2.properties
41 | src/main/filters/filter3.properties
42 |
43 |
44 |
45 | true
46 | src/main/resources
47 |
48 |
49 |
50 |
51 |
52 | maven-resources-plugin
53 | @project.version@
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | true
63 |
64 |
65 | foo-profileProperty-bar
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/src/it/filter/src/main/filters/filter2.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | var1=Foo
19 | var3=${var2}/Thing
--------------------------------------------------------------------------------
/src/it/filter/src/main/filters/filter3.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | var2=${var1}-Bar
--------------------------------------------------------------------------------
/src/it/filter/src/main/filters/my.filter:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | filter.token.project.version=${project.version}
19 | filter.token.projectProperty=${projectProperty}
20 | filter.token.profileProperty=${profileProperty}
21 | execProps=fromFilter
22 | value=foo
--------------------------------------------------------------------------------
/src/it/filter/src/main/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test:direct resolution project.version=${project.version}
19 | test:filter resolution project.version=${filter.token.project.version}
20 |
21 | test:filter direct projectProperty=${projectProperty}
22 | test:filter resolution projectProperty=${filter.token.projectProperty}
23 |
24 | test:filter direct profileProperty=${profileProperty}
25 | test:filter resolution profileProperty=${filter.token.profileProperty}
26 |
27 | test:filter syspropsExecutionPropsWins=${execProps}
28 |
29 | newToken=@value@
30 |
31 | var3=${var3}
--------------------------------------------------------------------------------
/src/it/include-git-ignore/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-includeEmptyDirs
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 | UTF-8
30 |
31 |
32 |
33 |
34 |
35 | src/main/resources
36 |
37 |
38 |
39 |
40 |
41 | maven-resources-plugin
42 | @project.version@
43 |
44 | false
45 |
46 |
47 |
48 |
49 |
50 |
51 | maven-resources-plugin
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/it/include-git-ignore/setup.bsh:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | import java.io.*;
21 |
22 | import org.codehaus.plexus.util.*;
23 |
24 | boolean result = true;
25 |
26 | try
27 | {
28 | File resources = new File( basedir, "src/main/resources/" );
29 | if ( !resources.mkdirs() ) {
30 | System.out.println ( "Failed to create src/main/resources directory." );
31 | result = false;
32 | }
33 |
34 | File gitIgnore = new File ( resources, ".gitignore" );
35 |
36 |
37 | BufferedWriter writer;
38 | try {
39 |
40 | writer = new BufferedWriter(new FileWriter(gitIgnore));
41 | writer.write ("# Test for .gitignore");
42 | writer.newLine();
43 | }
44 | finally {
45 | try {
46 | // Close the writer regardless of what happens...
47 | writer.close();
48 | } catch (Exception e) {
49 | e.printStackTrace();
50 | }
51 | }
52 |
53 | }
54 | catch( IOException e )
55 | {
56 | e.printStackTrace();
57 | result = false;
58 | }
59 |
60 | try
61 | {
62 | File resources = new File( basedir, "src/main/resources/dir-with-dot-file/" );
63 |
64 | if ( !resources.mkdirs() ) {
65 | System.out.println ( "Failed to create dir-with-dot-file folder." );
66 | result = false;
67 | }
68 | File gitIgnore = new File ( resources, ".gitignore" );
69 |
70 |
71 | BufferedWriter writer;
72 | try {
73 |
74 | writer = new BufferedWriter(new FileWriter(gitIgnore));
75 | writer.write ("# Test for .gitignore");
76 | writer.newLine();
77 | }
78 | finally {
79 | try {
80 | // Close the writer regardless of what happens...
81 | writer.close();
82 | } catch (Exception e) {
83 | e.printStackTrace();
84 | }
85 | }
86 |
87 | }
88 | catch( IOException e )
89 | {
90 | e.printStackTrace();
91 | result = false;
92 | }
93 | return result;
94 |
--------------------------------------------------------------------------------
/src/it/include-git-ignore/verify.bsh:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | */
20 |
21 | import java.io.*;
22 |
23 | import org.codehaus.plexus.util.*;
24 |
25 | boolean result = true;
26 |
27 | try
28 | {
29 | File target = new File( basedir, "target" );
30 | if ( !target.exists() || !target.isDirectory() )
31 | {
32 | System.err.println( "target file is missing or not a directory." );
33 | return false;
34 | }
35 |
36 | File classes = new File( target, "classes" );
37 | if ( !classes.exists() || !classes.isDirectory() )
38 | {
39 | System.err.println( "target/classes file is missing or not a directory." );
40 | return false;
41 | }
42 |
43 | File gitIngoreInClasses = new File ( classes, ".gitignore" );
44 | if ( !gitIngoreInClasses.exists() || !gitIngoreInClasses.isFile() )
45 | {
46 | System.err.println( "target/classes/.gitignore file is missing." );
47 | return false;
48 | }
49 |
50 |
51 |
52 | File dirWithDotFile = new File( classes, "dir-with-dot-file" );
53 | if ( !dirWithDotFile.exists() || !dirWithDotFile.isDirectory() )
54 | {
55 | System.err.println( "target/classes/dir-with-dot-file file is missing or not a directory." );
56 | return false;
57 | }
58 |
59 | File gitIngoreInDirWithDotFile = new File ( dirWithDotFile, ".gitignore" );
60 | if ( !gitIngoreInDirWithDotFile.exists() || !gitIngoreInDirWithDotFile.isFile() )
61 | {
62 | System.err.println( "target/classes/dir-with-dot-file/.gitignore file is missing." );
63 | return false;
64 | }
65 |
66 | }
67 | catch( IOException e )
68 | {
69 | e.printStackTrace();
70 | result = false;
71 | }
72 |
73 | return result;
74 |
--------------------------------------------------------------------------------
/src/it/includeEmptyDirs/README.md:
--------------------------------------------------------------------------------
1 | Note: this file uses ".git" named files as placeholders, that are part of "default excludes" in plexus-utils.
2 | Before, this IT used ".gitattributes" file, but it was removed from set of default excludes by this
3 | commit: https://github.com/codehaus-plexus/plexus-utils/commit/e8a8433894eae9e8f82cbba4b903508362e9322a
4 |
--------------------------------------------------------------------------------
/src/it/includeEmptyDirs/src/main/filters/my.filter:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | filter.token.project.version=${project.version}
19 | filter.token.projectProperty=${projectProperty}
20 | filter.token.profileProperty=${profileProperty}
21 | execProps=fromFilter
22 | value=foo
--------------------------------------------------------------------------------
/src/it/includeEmptyDirs/src/main/resources/SomeResource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test:direct resolution project.version=${project.version}
19 | test:filter resolution project.version=${filter.token.project.version}
20 |
21 | test:filter direct projectProperty=${projectProperty}
22 | test:filter resolution projectProperty=${filter.token.projectProperty}
23 |
24 | test:filter direct profileProperty=${profileProperty}
25 | test:filter resolution profileProperty=${filter.token.profileProperty}
26 |
27 | test:filter syspropsExecutionPropsWins=${execProps}
28 |
29 | newToken=@value@
30 |
--------------------------------------------------------------------------------
/src/it/includeEmptyDirs/src/main/resources/empty-dir-child/child/._placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/maven-resources-plugin/23ad3e38e386191ab05c825324e337d10e10aea3/src/it/includeEmptyDirs/src/main/resources/empty-dir-child/child/._placeholder
--------------------------------------------------------------------------------
/src/it/includeEmptyDirs/src/main/resources/empty-dir/._placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/maven-resources-plugin/23ad3e38e386191ab05c825324e337d10e10aea3/src/it/includeEmptyDirs/src/main/resources/empty-dir/._placeholder
--------------------------------------------------------------------------------
/src/it/profile-override/invoker.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | invoker.profiles=production
19 |
--------------------------------------------------------------------------------
/src/it/profile-override/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-profile-override
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 |
30 |
31 | false
32 | src/main/resources/test
33 |
34 |
35 |
36 |
37 |
38 | maven-resources-plugin
39 | @project.version@
40 |
41 | true
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | production
50 |
51 |
52 |
53 | false
54 | src/main/resources/production
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/it/profile-override/prebuild.bsh:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | */
20 |
21 | import java.io.*;
22 |
23 | import org.codehaus.plexus.util.*;
24 |
25 | File conf = new File( basedir, "src/main/resources/test/config.properties" );
26 | conf.setLastModified( System.currentTimeMillis() );
27 |
28 |
--------------------------------------------------------------------------------
/src/it/profile-override/src/main/resources/production/config.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | env=production
--------------------------------------------------------------------------------
/src/it/profile-override/src/main/resources/test/config.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | env=test
--------------------------------------------------------------------------------
/src/it/profile-override/verify.bsh:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | */
20 |
21 | import java.io.*;
22 |
23 | import org.codehaus.plexus.util.*;
24 |
25 | boolean result = true;
26 |
27 | try
28 | {
29 | File target = new File( basedir, "target" );
30 | if ( !target.exists() || !target.isDirectory() )
31 | {
32 | System.err.println( "target file is missing or a directory." );
33 | return false;
34 | }
35 |
36 | File someResource = new File( target, "/classes/config.properties" );
37 | if ( !someResource.exists() || someResource.isDirectory() )
38 | {
39 | System.err.println( "config.properties is missing or not a file." );
40 | return false;
41 | }
42 |
43 | String paramContent = FileUtils.fileRead( someResource );
44 |
45 | int indexOf = paramContent.indexOf( "env=production" );
46 | if ( indexOf < 0 )
47 | {
48 | System.err.println( "config.properties not contains env=production" );
49 | return false;
50 | }
51 |
52 |
53 | }
54 | catch( IOException e )
55 | {
56 | e.printStackTrace();
57 | result = false;
58 | }
59 |
60 | return result;
61 |
--------------------------------------------------------------------------------
/src/it/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
23 |
24 |
25 | it-repo
26 |
27 | true
28 |
29 |
30 |
31 | local.central
32 | @localRepositoryUrl@
33 |
34 | true
35 | ignore
36 |
37 |
38 | true
39 | ignore
40 |
41 |
42 |
43 | apache.snapshots
44 | https://repository.apache.org/content/repositories/snapshots
45 |
46 | false
47 | ignore
48 |
49 |
50 | true
51 | ignore
52 |
53 |
54 |
55 |
56 |
57 | local.central
58 | @localRepositoryUrl@
59 |
60 | true
61 | ignore
62 |
63 |
64 | true
65 | ignore
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/it/skip-yes/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.maven.plugins
24 | maven-resources-plugin-it-skip-yes
25 | 1.0-SNAPSHOT
26 | jar
27 |
28 |
29 |
30 |
31 | true
32 | src/main/resources
33 |
34 |
35 |
36 |
37 |
38 | maven-resources-plugin
39 | @project.version@
40 |
41 | true
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/it/skip-yes/src/main/resources/test-resource.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | test
18 |
--------------------------------------------------------------------------------
/src/it/skip-yes/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | def buildLogFile = new File( basedir, "build.log");
20 |
21 | assert buildLogFile.text.contains("Skipping the execution.")
22 | return true;
23 |
--------------------------------------------------------------------------------
/src/it/user-filters/filter/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.plugins.resources.its
23 | user-filters-filter
24 | 1.0.16-SNAPSHOT
25 | jar
26 |
27 |
28 | org.apache.maven.shared
29 | maven-filtering
30 | @mavenFilteringVersion@
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/it/user-filters/filter/src/main/resources/META-INF/maven/org.apache.maven.api.di.Inject:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 | org.apache.maven.plugins.resources.filters.ItFilter
20 |
--------------------------------------------------------------------------------
/src/it/user-filters/invoker.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | invoker.systemPropertiesFile = test.properties
--------------------------------------------------------------------------------
/src/it/user-filters/module/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.plugins.resources.its
23 | user-filters-module
24 | 1.0.16-SNAPSHOT
25 | User Filter Resources Test
26 |
27 | this is escaped
28 | this is escaped.at
29 | this is foo
30 | this is bar
31 |
32 |
33 |
34 |
35 | src/main/resources
36 |
37 |
38 | true
39 | src/main/filtered
40 |
41 |
42 |
43 |
44 | org.apache.maven.plugins
45 | maven-resources-plugin
46 | @project.version@
47 |
48 | UTF-8
49 |
50 | itFilter
51 |
52 |
53 |
54 |
55 | org.apache.plugins.resources.its
56 | user-filters-filter
57 | 1.0.16-SNAPSHOT
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/src/it/user-filters/module/src/main/filtered/filtered.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | escaped=\${escaped}
19 | escaped.at=\@escaped.at@
20 | foo=${foo}
21 | project.foo=${project.foo}
22 | bar=@bar@
23 | project.bar=@project.bar@
24 | not.a.property=${not.a.property}
25 | not.a.property.at=@not.a.property@
26 | version=${version}
27 | version.at=@version@
28 | project.version=${project.version}
29 | project.version.at=@project.version@
30 | target=@target@
31 | target.at=@target.at@
32 | project.target=@project.target@
33 | project.target.at=@project.target@
34 |
--------------------------------------------------------------------------------
/src/it/user-filters/module/src/main/resources/unfiltered.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | escaped=\${escaped}
19 | escaped.at=\@escaped.at@
20 | foo=${foo}
21 | project.foo=${project.foo}
22 | bar=@bar@
23 | project.bar=@project.bar@
24 | not.a.property=${not.a.property}
25 | not.a.property.at=@not.a.property@
26 | version=${version}
27 | version.at=@version@
28 | project.version=${project.version}
29 | project.version.at=@project.version@
30 | target=@target@
31 | target.at=@target.at@
32 | project.target=@project.target@
33 | project.target.at=@project.target@
34 |
--------------------------------------------------------------------------------
/src/it/user-filters/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 | org.apache.plugins.resources.its
23 | user-filters-parent
24 | 1.0.16-SNAPSHOT
25 | pom
26 |
27 |
28 | filter
29 | module
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/it/user-filters/test.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | toto=titi
--------------------------------------------------------------------------------
/src/it/user-filters/verify.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | assert new File(basedir, 'module/target/classes/foo.txt').exists();
20 |
21 | content = new File(basedir, 'module/target/classes/foo.txt').text;
22 | assert content.contains( 'foo');
23 | assert content.contains( 'version=1.0.16-SNAPSHOT');
24 | assert content.contains( 'toto=titi');
25 |
26 | return true;
--------------------------------------------------------------------------------
/src/main/java/org/apache/maven/plugins/resources/CopyResourcesMojo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.maven.plugins.resources;
20 |
21 | import java.nio.file.Path;
22 | import java.util.List;
23 |
24 | import org.apache.maven.api.plugin.annotations.Mojo;
25 | import org.apache.maven.api.plugin.annotations.Parameter;
26 | import org.apache.maven.shared.filtering.Resource;
27 |
28 | /**
29 | * Copy resources of the configured plugin attribute resources
30 | *
31 | * @author Olivier Lamy
32 | * @since 2.3
33 | */
34 | @Mojo(name = "copy-resources")
35 | public class CopyResourcesMojo extends ResourcesMojo {
36 |
37 | /**
38 | * The output directory into which to copy the resources.
39 | */
40 | @Parameter(required = true)
41 | private Path outputDirectory;
42 |
43 | /**
44 | * The list of resources we want to transfer. See the Maven Model for a
45 | * description of how to code the resources element.
46 | */
47 | @Parameter(required = true)
48 | private List resources;
49 |
50 | /** {@inheritDoc} */
51 | public Path getOutputDirectory() {
52 | return outputDirectory;
53 | }
54 |
55 | /** {@inheritDoc} */
56 | public void setOutputDirectory(Path outputDirectory) {
57 | this.outputDirectory = outputDirectory;
58 | }
59 |
60 | /** {@inheritDoc} */
61 | public List getResources() {
62 | return resources;
63 | }
64 |
65 | /** {@inheritDoc} */
66 | public void setResources(List resources) {
67 | this.resources = resources;
68 | }
69 |
70 | /** {@inheritDoc} */
71 | public List getFilters() {
72 | return filters;
73 | }
74 |
75 | /** {@inheritDoc} */
76 | public void setFilters(List filters) {
77 | this.filters = filters;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/maven/plugins/resources/Providers.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.maven.plugins.resources;
20 |
21 | import org.apache.maven.api.di.Named;
22 | import org.apache.maven.api.di.Provides;
23 | import org.sonatype.plexus.build.incremental.BuildContext;
24 | import org.sonatype.plexus.build.incremental.ThreadBuildContext;
25 |
26 | @Named
27 | class Providers {
28 |
29 | @Provides
30 | static BuildContext buildContext() {
31 | return new ThreadBuildContext();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/org/apache/maven/plugins/resources/ResourceUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.maven.plugins.resources;
20 |
21 | import org.apache.maven.shared.filtering.Resource;
22 |
23 | class ResourceUtils {
24 |
25 | static Resource newResource(org.apache.maven.api.model.Resource res) {
26 | Resource resource = new Resource();
27 | resource.setDirectory(res.getDirectory());
28 | resource.setFiltering(res.isFiltering());
29 | resource.setExcludes(res.getExcludes());
30 | resource.setIncludes(res.getIncludes());
31 | resource.setMergeId(res.getMergeId());
32 | resource.setTargetPath(res.getTargetPath());
33 | return resource;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/site/apt/examples/binaries-filtering.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Binaries Filtering
3 | ------
4 | Olivier Lamy
5 | ------
6 | 2008-10-14
7 | ------
8 |
9 | ~~ Licensed to the Apache Software Foundation (ASF) under one
10 | ~~ or more contributor license agreements. See the NOTICE file
11 | ~~ distributed with this work for additional information
12 | ~~ regarding copyright ownership. The ASF licenses this file
13 | ~~ to you under the Apache License, Version 2.0 (the
14 | ~~ "License"); you may not use this file except in compliance
15 | ~~ with the License. You may obtain a copy of the License at
16 | ~~
17 | ~~ http://www.apache.org/licenses/LICENSE-2.0
18 | ~~
19 | ~~ Unless required by applicable law or agreed to in writing,
20 | ~~ software distributed under the License is distributed on an
21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22 | ~~ KIND, either express or implied. See the License for the
23 | ~~ specific language governing permissions and limitations
24 | ~~ under the License.
25 |
26 | ~~ NOTE: For help with the syntax of this file, see:
27 | ~~ http://maven.apache.org/doxia/references/apt-format.html
28 |
29 | Binary filtering
30 |
31 | The plugin will prevent binary files filtering without adding some <<>> configuration
32 | for the following file extensions <<>>, <<>>, <<>>, <<>> and <<>>.
33 |
34 | If you like to add supplemental file extensions this can simply achieved by
35 | using a configuration like the following:
36 |
37 | +-----+
38 |
39 | ...
40 |
41 |
42 |
43 | org.apache.maven.plugins
44 | maven-resources-plugin
45 | ${project.version}
46 |
47 | ...
48 |
49 | pdf
50 | swf
51 |
52 | ...
53 |
54 |
55 |
56 | ...
57 |
58 | ...
59 |
60 | +-----+
61 |
--------------------------------------------------------------------------------
/src/site/apt/examples/copy-resources.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Copy Resources
3 | ------
4 | Olivier Lamy
5 | ------
6 | 2008-09-13
7 | ------
8 |
9 | ~~ Licensed to the Apache Software Foundation (ASF) under one
10 | ~~ or more contributor license agreements. See the NOTICE file
11 | ~~ distributed with this work for additional information
12 | ~~ regarding copyright ownership. The ASF licenses this file
13 | ~~ to you under the Apache License, Version 2.0 (the
14 | ~~ "License"); you may not use this file except in compliance
15 | ~~ with the License. You may obtain a copy of the License at
16 | ~~
17 | ~~ http://www.apache.org/licenses/LICENSE-2.0
18 | ~~
19 | ~~ Unless required by applicable law or agreed to in writing,
20 | ~~ software distributed under the License is distributed on an
21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22 | ~~ KIND, either express or implied. See the License for the
23 | ~~ specific language governing permissions and limitations
24 | ~~ under the License.
25 |
26 | ~~ NOTE: For help with the syntax of this file, see:
27 | ~~ http://maven.apache.org/doxia/references/apt-format.html
28 |
29 | Copy Resources
30 |
31 | You can use the mojo copy-resources to copy resources which are not in the default maven layout or not declared in the build/resources element
32 | and attach it to a phase
33 |
34 | +-----+
35 |
36 | ...
37 |
38 |
39 |
40 | maven-resources-plugin
41 | ${project.version}
42 |
43 |
44 | copy-resources
45 |
46 | validate
47 |
48 | copy-resources
49 |
50 |
51 | ${basedir}/target/extra-resources
52 |
53 |
54 | src/non-packaged-resources
55 | true
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | ...
64 |
65 | ...
66 |
67 | +-----+
68 |
--------------------------------------------------------------------------------
/src/site/apt/examples/encoding.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Specifying a character encoding scheme
3 | ------
4 | Franz Allan See
5 | Karl Heinz Marbaise
6 | ------
7 | 2016-05-13
8 | ------
9 |
10 | ~~ Licensed to the Apache Software Foundation (ASF) under one
11 | ~~ or more contributor license agreements. See the NOTICE file
12 | ~~ distributed with this work for additional information
13 | ~~ regarding copyright ownership. The ASF licenses this file
14 | ~~ to you under the Apache License, Version 2.0 (the
15 | ~~ "License"); you may not use this file except in compliance
16 | ~~ with the License. You may obtain a copy of the License at
17 | ~~
18 | ~~ http://www.apache.org/licenses/LICENSE-2.0
19 | ~~
20 | ~~ Unless required by applicable law or agreed to in writing,
21 | ~~ software distributed under the License is distributed on an
22 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23 | ~~ KIND, either express or implied. See the License for the
24 | ~~ specific language governing permissions and limitations
25 | ~~ under the License.
26 |
27 | ~~ NOTE: For help with the syntax of this file, see:
28 | ~~ http://maven.apache.org/doxia/references/apt-format.html
29 |
30 | Specifying a character encoding scheme
31 |
32 | A character encoding scheme such as <<>>, <<>> or <<>> can be chosen to be
33 | used for the reading and writing of files.
34 |
35 | The best practice is to {{{https://maven.apache.org/general.html#encoding-warning}define encoding}}
36 | for copying filtered resources via the property <<<$\{project.build.sourceEncoding}>>> which should be
37 | defined in the pom properties section like this:
38 |
39 | +-----+
40 |
41 | ...
42 |
43 | UTF-8
44 | ...
45 |
46 | ..
47 |
48 | +-----+
49 |
50 | By using the above property <<>> will automatically
51 | use this {{{../resources-mojo.html#encoding}encoding}}.
52 |
53 | Occasionally you need to change the encoding explicitly for different purposes.
54 | This can be done by defining the encoding via the configuration
55 | like this:
56 |
57 | +-----+
58 |
59 | ...
60 |
61 |
62 |
63 | org.apache.maven.plugins
64 | maven-resources-plugin
65 | ${project.version}
66 |
67 | ...
68 | UTF-8
69 | ...
70 |
71 |
72 |
73 | ...
74 |
75 | ...
76 |
77 | +-----+
78 |
79 |
80 |
--------------------------------------------------------------------------------
/src/site/apt/examples/escape-filtering.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Escape Filtering
3 | ------
4 | Olivier Lamy
5 | ------
6 | 2008-09-05
7 | ------
8 |
9 | ~~ Licensed to the Apache Software Foundation (ASF) under one
10 | ~~ or more contributor license agreements. See the NOTICE file
11 | ~~ distributed with this work for additional information
12 | ~~ regarding copyright ownership. The ASF licenses this file
13 | ~~ to you under the Apache License, Version 2.0 (the
14 | ~~ "License"); you may not use this file except in compliance
15 | ~~ with the License. You may obtain a copy of the License at
16 | ~~
17 | ~~ http://www.apache.org/licenses/LICENSE-2.0
18 | ~~
19 | ~~ Unless required by applicable law or agreed to in writing,
20 | ~~ software distributed under the License is distributed on an
21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22 | ~~ KIND, either express or implied. See the License for the
23 | ~~ specific language governing permissions and limitations
24 | ~~ under the License.
25 |
26 | ~~ NOTE: For help with the syntax of this file, see:
27 | ~~ http://maven.apache.org/doxia/references/apt-format.html
28 |
29 | Escape filtering
30 |
31 | You can escape filtering with configurable String.
32 |
33 | This means expression $\{ \} and @ @ preceded will replace by the expression : \$\{java.home\} -> $\{java.home\}.
34 |
35 | <>
36 |
37 |
38 | +-----+
39 |
40 | ...
41 |
42 |
43 |
44 | org.apache.maven.plugins
45 | maven-resources-plugin
46 | ${project.version}
47 |
48 | ...
49 | \
50 | ...
51 |
52 |
53 |
54 | ...
55 |
56 | ...
57 |
58 | +-----+
59 |
--------------------------------------------------------------------------------
/src/site/apt/examples/resource-directory.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Specifying resource directories
3 | ------
4 | Franz Allan See
5 | ------
6 | 2008-09-05
7 | ------
8 |
9 | ~~ Licensed to the Apache Software Foundation (ASF) under one
10 | ~~ or more contributor license agreements. See the NOTICE file
11 | ~~ distributed with this work for additional information
12 | ~~ regarding copyright ownership. The ASF licenses this file
13 | ~~ to you under the Apache License, Version 2.0 (the
14 | ~~ "License"); you may not use this file except in compliance
15 | ~~ with the License. You may obtain a copy of the License at
16 | ~~
17 | ~~ http://www.apache.org/licenses/LICENSE-2.0
18 | ~~
19 | ~~ Unless required by applicable law or agreed to in writing,
20 | ~~ software distributed under the License is distributed on an
21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22 | ~~ KIND, either express or implied. See the License for the
23 | ~~ specific language governing permissions and limitations
24 | ~~ under the License.
25 |
26 | ~~ NOTE: For help with the syntax of this file, see:
27 | ~~ http://maven.apache.org/doxia/references/apt-format.html
28 |
29 | Specifying resource directories
30 |
31 | By default, Maven will look for your project's resources under
32 | <<>>.
33 |
34 | +-----+
35 | Project
36 | |-- pom.xml
37 | `-- src
38 | `-- main
39 | `-- resources
40 | +-----+
41 |
42 | However, all your resources may not be in <<>>. Thus, you'd have
43 | to specify those directories by adding the following to your POM.
44 |
45 | +-----+
46 |
47 | ...
48 |
49 | ...
50 |
51 |
52 | [your folder here]
53 |
54 |
55 | ...
56 |
57 | ...
58 |
59 | +-----+
60 |
61 | So if your resources resides in <<>>
62 |
63 | +-----+
64 | Project
65 | |-- pom.xml
66 | `-- src
67 | `-- my-resources
68 | +-----+
69 |
70 | you can specify that directory by doing the following:
71 |
72 | +-----+
73 |
74 | ...
75 |
76 |
77 | src/my-resources
78 |
79 |
80 | ...
81 |
82 | +-----+
83 |
84 | Furthermore, you can have several directories by adding multiple <<<\>>> elements:
85 |
86 | +-----+
87 |
88 | ...
89 |
90 |
91 | resource1
92 |
93 |
94 | resource2
95 |
96 |
97 | resource3
98 |
99 |
100 | ...
101 |
102 | +-----+
103 |
--------------------------------------------------------------------------------
/src/site/apt/usage.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Usage
3 | ------
4 | Franz Allan See
5 | ------
6 | 2011-02-05
7 | ------
8 |
9 | ~~ Licensed to the Apache Software Foundation (ASF) under one
10 | ~~ or more contributor license agreements. See the NOTICE file
11 | ~~ distributed with this work for additional information
12 | ~~ regarding copyright ownership. The ASF licenses this file
13 | ~~ to you under the Apache License, Version 2.0 (the
14 | ~~ "License"); you may not use this file except in compliance
15 | ~~ with the License. You may obtain a copy of the License at
16 | ~~
17 | ~~ http://www.apache.org/licenses/LICENSE-2.0
18 | ~~
19 | ~~ Unless required by applicable law or agreed to in writing,
20 | ~~ software distributed under the License is distributed on an
21 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22 | ~~ KIND, either express or implied. See the License for the
23 | ~~ specific language governing permissions and limitations
24 | ~~ under the License.
25 |
26 | ~~ NOTE: For help with the syntax of this file, see:
27 | ~~ http://maven.apache.org/doxia/references/apt-format.html
28 |
29 | Usage
30 |
31 | The Resources Plugin handles the copying of project resources to the output
32 | directory. The following examples describe the basic usage of the Plugin.
33 |
34 | To handle filtering this version of Maven Resources Plugin uses
35 | {{{http://maven.apache.org/shared/maven-filtering/index.html}Maven Filtering}} ${mavenFilteringVersion}.
36 |
37 |
38 | * Copy resources for the main source code
39 |
40 | +-----+
41 | mvn resources:resources
42 | +-----+
43 |
44 | Upon executing this command, the resources for your main source code,
45 | as specified by the \ element, will be
46 | copied to your main build output directory. This does not affect the
47 | resources for your test code.
48 |
49 | Moreover, this goal is bound to the <<>> phase.
50 |
51 |
52 | * Copy resources for the unit tests
53 |
54 | +-----+
55 | mvn resources:testResources
56 | +-----+
57 |
58 | Like the first goal this goal copies resources, but this time for your test source code to your
59 | test build output directory, as specified by the \ element.
60 | Also, this does not affect the resources for the main source
61 | code.
62 |
63 | Furthermore, this is bound to the <<>> phase.
64 |
65 |
66 | * Copy resources specified by a \ configuration element
67 |
68 | +-----+
69 | mvn resources:copy-resources
70 | +-----+
71 |
72 | Rather than using the \ or \ elements or their
73 | defaults, this uses a \ element that is specified as part of the
74 | plugin configuration.
75 |
76 | See the examples for how to configure this. See the Maven Model for
77 | how to write \ elements.
--------------------------------------------------------------------------------
/src/site/resources/download.cgi:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 | # Just call the standard mirrors.cgi script. It will use download.html
21 | # as the input template.
22 | exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*
--------------------------------------------------------------------------------
/src/site/site.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
25 |
26 |
35 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/maven/plugins/resources/PropertyUtilsExceptionTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.maven.plugins.resources;
20 |
21 | import java.io.FileNotFoundException;
22 | import java.nio.file.Paths;
23 |
24 | import org.apache.maven.shared.filtering.PropertyUtils;
25 | import org.junit.jupiter.api.Test;
26 |
27 | import static org.junit.jupiter.api.Assertions.assertThrows;
28 |
29 | public class PropertyUtilsExceptionTest {
30 |
31 | /**
32 | * load property test case can be adjusted by modifying the basic.properties and basic_validation properties
33 | */
34 | @Test
35 | public void loadPropertyFileShouldFailWithFileNotFoundException() {
36 | assertThrows(
37 | FileNotFoundException.class,
38 | () -> PropertyUtils.loadPropertyFile(Paths.get("NON_EXISTENT_FILE"), true, true));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/test/java/org/apache/maven/plugins/resources/stub/MavenProjectBasicStub.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.maven.plugins.resources.stub;
20 |
21 | import java.io.IOException;
22 | import java.nio.file.Files;
23 | import java.nio.file.Path;
24 | import java.nio.file.Paths;
25 | import java.util.Properties;
26 |
27 | import org.apache.maven.api.plugin.testing.MojoExtension;
28 | import org.apache.maven.api.plugin.testing.stubs.ProjectStub;
29 |
30 | public class MavenProjectBasicStub extends ProjectStub {
31 | protected String identifier;
32 |
33 | protected String testRootDir;
34 |
35 | protected Properties properties;
36 |
37 | protected String description;
38 |
39 | public MavenProjectBasicStub(String id) throws IOException {
40 | properties = new Properties();
41 | identifier = id;
42 | testRootDir = MojoExtension.getBasedir() + "/target/test-classes/unit/test-dir/" + identifier;
43 | setBasedir(Paths.get(testRootDir));
44 |
45 | Path path = Paths.get(testRootDir);
46 | if (!Files.exists(path)) {
47 | Files.createDirectories(path);
48 | }
49 |
50 | setName("Test Project " + identifier);
51 | setGroupId("org.apache.maven.plugin.test");
52 | setArtifactId("maven-resource-plugin-test#" + identifier);
53 | setVersion(identifier);
54 | setPackaging("org.apache.maven.plugin.test");
55 | setDescription("this is a test project");
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/test/resources/unit/propertiesutils-test/advance.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | key1:value1
19 | key2:value 2
20 | key3:value 3
21 | key4:${key3}
22 | key5:${key1}.value4
23 | key6:${key1}_${key3}_value5
24 |
--------------------------------------------------------------------------------
/src/test/resources/unit/propertiesutils-test/advance_validation.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | key1 : value1
19 | key2 : value 2
20 | key3 : value 3
21 | key4 : value 3
22 | key5 : value1.value4
23 | key6 : value1_value 3_value5
24 |
--------------------------------------------------------------------------------
/src/test/resources/unit/propertiesutils-test/basic.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | key1:value1
19 | key2:value2
20 | key3:value3
21 | key4:value4
22 | key5:${key4}
23 |
--------------------------------------------------------------------------------
/src/test/resources/unit/propertiesutils-test/basic_validation.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | key1:value1
19 | key2:value2
20 | key3:value3
21 | key4:value4
22 | key5:value4
23 |
--------------------------------------------------------------------------------
/src/test/resources/unit/propertiesutils-test/enhanced.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | key1=111
19 | key2=${prop1}
20 | key3=333_${key2}_${key1}_333
21 | key4=444_${key1}_444
22 | key5=555_${key4}_555
23 | key6=666_${key7}_666
24 | key7=777_${key8}_777
25 | key8=888
--------------------------------------------------------------------------------
/src/test/resources/unit/propertiesutils-test/enhanced_validation.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | key1=111
19 | key2=valueOfProperty1
20 | key3=333_valueOfProperty1_111_333
21 | key4=444_111_444
22 | key5=555_444_111_444_555
23 | key6=666_777_888_777_666
24 | key7=777_888_777
25 | key8=888
--------------------------------------------------------------------------------
/src/test/resources/unit/reflectionproperties-test/plugin-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | c:\root\home\my_dir
23 |
24 |
25 |
26 | maven-resources-plugin
27 |
28 | UTF-8
29 | ${basedir}\target\test-classes\unit\reflectionproperties-test
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/test/resources/unit/reflectionproperties-test/validation.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | project_property:description
19 | description:c\:\\root\\home\\my_dir
20 | outputDirectory:\\target\\test-classes\\unit\\reflectionproperties-test
21 | encoding:UTF-8
22 |
--------------------------------------------------------------------------------
/src/test/resources/unit/reflectionproperties-test/validation_escapebackslashinpath.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | project_property:description
19 | description:c\\:\\\\root\\\\home\\\\my_dir
20 | outputDirectory:\\target\\test-classes\\unit\\reflectionproperties-test
21 | encoding:UTF-8
22 |
--------------------------------------------------------------------------------
/src/test/resources/unit/resources-test/plugin-config-absolute-path.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | test2
23 |
24 |
25 |
26 | maven-resources-plugin
27 |
28 | /test-classes/unit/result-dir
29 |
30 |
31 |
32 |
33 |
34 | false
35 | /src/test/resources/unit/test-dir
36 |
37 | **/*.include
38 | **/*.test
39 |
40 |
41 | **/*.exclude
42 | **/*.nottest
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/test/resources/unit/resources-test/plugin-config-relative-path.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | test3
23 |
24 |
25 |
26 | maven-resources-plugin
27 |
28 | /test-classes/unit/result-dir
29 |
30 |
31 |
32 |
33 |
34 | false
35 | ../src/test/resources/unit/test-dir
36 |
37 | **/*.include
38 | **/*.test
39 |
40 |
41 | **/*.exclude
42 | **/*.nottest
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/test/resources/unit/resources-test/plugin-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | test1
23 |
24 |
25 |
26 | maven-resources-plugin
27 |
28 |
29 |
30 |
31 |
32 | UTF-8
33 |
34 |
35 |
36 |
37 |
38 | false
39 | /test/resources/unit/test-dir
40 |
41 | **/*.include
42 | **/*.test
43 |
44 |
45 | **/**.exclude
46 | **/*.nottest
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/test/resources/unit/resources-test/validation.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | test1 : C\:\\Source\\maven_core\\plugins\\maven-resources-plugin\\target\\test-classes\\unit\\test-dir\\package\test
19 | test2 :
20 | test3 :
21 |
--------------------------------------------------------------------------------
/src/test/unit-files/copy-resources-test/filter-files/filter.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | foo=bar
--------------------------------------------------------------------------------
/src/test/unit-files/copy-resources-test/no-filter/config.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | config=zorglub
--------------------------------------------------------------------------------