Skip to content

Commit d238c38

Browse files
Fix NoClassDefFoundError for CachingOutputStream by upgrading plexus-utils to 3.6.0 (#118)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stefanseifert <5614031+stefanseifert@users.noreply.github.com>
1 parent 427ad31 commit d238c38

File tree

4 files changed

+131
-1
lines changed

4 files changed

+131
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ under the License.
176176
<dependency>
177177
<groupId>org.codehaus.plexus</groupId>
178178
<artifactId>plexus-utils</artifactId>
179-
<version>3.2.1</version>
179+
<version>3.6.0</version>
180180
<scope>compile</scope>
181181
</dependency>
182182
<dependency>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 = eclipse:clean eclipse:eclipse
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
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+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<groupId>org.apache.maven.plugins.it</groupId>
27+
<artifactId>additional-config-filtering</artifactId>
28+
<version>1.0.0</version>
29+
<packaging>jar</packaging>
30+
<name>additional-config-filtering</name>
31+
32+
<build>
33+
<plugins>
34+
<plugin>
35+
<groupId>io.wcm.devops.maven.plugins</groupId>
36+
<artifactId>eclipse-maven-plugin</artifactId>
37+
<version>@project.version@</version>
38+
<configuration>
39+
<additionalConfig>
40+
<file>
41+
<name>.settings/custom-config.xml</name>
42+
<content><![CDATA[<config>
43+
<version>${project.version}</version>
44+
<artifactId>${project.artifactId}</artifactId>
45+
</config>]]></content>
46+
<filtering>true</filtering>
47+
</file>
48+
</additionalConfig>
49+
</configuration>
50+
</plugin>
51+
</plugins>
52+
</build>
53+
</project>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
import java.util.*;
22+
import org.codehaus.plexus.util.*;
23+
24+
boolean result = true;
25+
26+
try
27+
{
28+
File configFile = new File( basedir, ".settings/custom-config.xml" );
29+
if ( !configFile.exists() )
30+
{
31+
System.err.println( "Expected .settings/custom-config.xml, but file doesn't exist" );
32+
return false;
33+
}
34+
35+
String content = FileUtils.fileRead( configFile, "UTF-8" );
36+
if ( content.indexOf( "<version>1.0.0</version>" ) < 0 )
37+
{
38+
System.err.println( "Expected .settings/custom-config.xml to contain '<version>1.0.0</version>' after filtering, but it didn't. Actual content:\n" + content );
39+
return false;
40+
}
41+
42+
if ( content.indexOf( "<artifactId>additional-config-filtering</artifactId>" ) < 0 )
43+
{
44+
System.err.println( "Expected .settings/custom-config.xml to contain '<artifactId>additional-config-filtering</artifactId>' after filtering, but it didn't. Actual content:\n" + content );
45+
return false;
46+
}
47+
48+
if ( content.indexOf( "${project.version}" ) >= 0 )
49+
{
50+
System.err.println( "Expected .settings/custom-config.xml to not contain unresolved '${project.version}' placeholder, but it did. Actual content:\n" + content );
51+
return false;
52+
}
53+
}
54+
catch ( Exception e )
55+
{
56+
e.printStackTrace();
57+
result = false;
58+
}
59+
return result;

0 commit comments

Comments
 (0)