Skip to content

Commit fc253c9

Browse files
committed
[MASFRES-69] Allow files/directories with names containing "target"
1 parent 5eab384 commit fc253c9

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

source-release/src/main/resources/assemblies/source-shared.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<useDefaultExcludes>true</useDefaultExcludes>
2828
<excludes>
2929
<!-- build output -->
30-
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
30+
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)${project.build.directory}(/.*)?]</exclude>
3131

3232
<!-- NOTE: Most of the following excludes should not be required
3333
if the standard release process is followed. This is because the

source-release/src/test/java/org/apache/its/IT_005_MiscellaneousExcludes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.io.File;
2222
import java.io.IOException;
2323
import java.net.URISyntaxException;
24-
import java.util.Collections;
2524
import java.util.HashSet;
2625
import java.util.Set;
2726

@@ -52,7 +51,7 @@ public void execute() throws VerificationException, IOException, URISyntaxExcept
5251

5352
File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION + "-source-release.zip");
5453

55-
Set<String> required = Collections.emptySet();
54+
Set<String> required = new HashSet<>();
5655

5756
Set<String> banned = new HashSet<>();
5857

@@ -63,6 +62,7 @@ public void execute() throws VerificationException, IOException, URISyntaxExcept
6362

6463
banned.add(archivePathFromChild(BASENAME, VERSION, "child2", "/cobertura.ser"));
6564

65+
required.add(archivePathFromProject(BASENAME, VERSION, "/some-target.txt"));
6666
assertZipContents(required, banned, assembly);
6767
}
6868
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
This file should be preserved

0 commit comments

Comments
 (0)