Skip to content

Commit d37c5cf

Browse files
authored
[MASSEMBLY-962] Update m-common-a-f to 3.3.0 (#68)
Updates the maven-common-artifact-filters that brings in fix for bug. Also bring in the related IT.
1 parent a006e1b commit d37c5cf

File tree

6 files changed

+135
-7
lines changed

6 files changed

+135
-7
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ under the License.
143143
<dependency>
144144
<groupId>org.apache.maven.shared</groupId>
145145
<artifactId>maven-common-artifact-filters</artifactId>
146-
<version>3.2.0</version>
146+
<version>3.3.0</version>
147147
</dependency>
148148
<dependency>
149149
<groupId>org.apache.maven.shared</groupId>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0"?>
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+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>org.apache.maven.plugin.assembly.test</groupId>
24+
<artifactId>it-project-parent</artifactId>
25+
<version>1</version>
26+
</parent>
27+
28+
<groupId>test</groupId>
29+
<artifactId>massembly-955</artifactId>
30+
<version>1</version>
31+
<properties>
32+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33+
</properties>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.python</groupId>
37+
<artifactId>jython-standalone</artifactId>
38+
<version>2.7.2</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.teiid</groupId>
42+
<artifactId>teiid</artifactId>
43+
<version>10.0.5</version>
44+
<classifier>jdbc</classifier>
45+
<type>jar</type>
46+
</dependency>
47+
</dependencies>
48+
<build>
49+
<plugins>
50+
<plugin>
51+
<artifactId>maven-assembly-plugin</artifactId>
52+
<version>${testVersion}</version>
53+
<executions>
54+
<execution>
55+
<id>assembly</id>
56+
<phase>package</phase>
57+
<goals>
58+
<goal>single</goal>
59+
</goals>
60+
<configuration>
61+
<descriptors>
62+
<descriptor>src/main/assembly/bin.xml</descriptor>
63+
</descriptors>
64+
</configuration>
65+
</execution>
66+
</executions>
67+
</plugin>
68+
</plugins>
69+
</build>
70+
</project>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
<assembly>
20+
<id>bin</id>
21+
<formats>
22+
<format>dir</format>
23+
</formats>
24+
<includeBaseDirectory>false</includeBaseDirectory>
25+
<dependencySets>
26+
<dependencySet>
27+
<includes>
28+
<!-- The order of includes is specific here. Keep the org.teiid:teiid first. Keep the specifier, too. -->
29+
<include>org.teiid:teiid:*:jdbc:*</include>
30+
<include>org.python:jython-standalone</include>
31+
</includes>
32+
</dependencySet>
33+
</dependencySets>
34+
</assembly>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
boolean result = true;
23+
24+
result = result && new File( basedir, "target/massembly-955-1-bin/teiid-10.0.5-jdbc.jar" ).exists();
25+
result = result && new File( basedir, "target/massembly-955-1-bin/jython-standalone-2.7.2.jar" ).exists();
26+
27+
return result;

src/main/java/org/apache/maven/plugins/assembly/utils/FilterUtils.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
3434
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
3535
import org.apache.maven.plugins.assembly.InvalidAssemblerConfigurationException;
36-
import org.apache.maven.plugins.assembly.internal.PlexusLoggingHelper;
3736
import org.apache.maven.project.MavenProject;
3837
import org.apache.maven.shared.artifact.filter.PatternExcludesArtifactFilter;
3938
import org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter;
@@ -91,7 +90,7 @@ public static Set<MavenProject> filterProjects( final Set<MavenProject> projects
9190
{
9291
if ( f != null )
9392
{
94-
f.reportMissedCriteria( PlexusLoggingHelper.wrap( logger ) );
93+
f.reportMissedCriteria( logger );
9594
}
9695
}
9796
return result;
@@ -187,8 +186,8 @@ public static void reportFilteringStatistics( final Collection<ArtifactFilter> f
187186
logger.debug( "Statistics for " + sFilter + "\n" );
188187
}
189188

190-
sFilter.reportMissedCriteria( PlexusLoggingHelper.wrap( logger ) );
191-
sFilter.reportFilteredArtifacts( PlexusLoggingHelper.wrap( logger ) );
189+
sFilter.reportMissedCriteria( logger );
190+
sFilter.reportFilteredArtifacts( logger );
192191
}
193192
}
194193
}

src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ public void testGetDependencyArtifacts_ShouldFilterOneDependencyArtifactViaInclu
388388

389389
Artifact am2 = mock( Artifact.class );
390390
when( am2.getGroupId() ).thenReturn( "group2" );
391-
when( am2.getArtifactId() ).thenReturn( "artifact2" );
392391
when( am2.getId() ).thenReturn( "group2:artifact2:1.0:jar" );
393392
artifacts.add( am2 );
394393

@@ -422,7 +421,6 @@ public void testGetDependencyArtifacts_ShouldIgnoreTransitivePathFilteringWhenIn
422421

423422
Artifact am2 = mock( Artifact.class );
424423
when( am2.getGroupId() ).thenReturn( "group2" );
425-
when( am2.getArtifactId() ).thenReturn( "artifact2" );
426424
when( am2.getId() ).thenReturn( "group2:artifact2:1.0:jar" );
427425
artifacts.add( am2 );
428426

0 commit comments

Comments
 (0)