Skip to content

Commit 52111cc

Browse files
slawekjaranowskidelanymdelany-traderoot
authored
[MJAR-307] Wrong version of commons-io cause a ClassNotFound o.a.commons.io.file.attribute.FileTimes (#83)
* ITs for MJAR-307 - try to reproduce * Add timestamp (#84) * Add timestamp * Add timestamp format --------- Co-authored-by: Delany <[email protected]> * Fix a bug --------- Co-authored-by: Delany <[email protected]> Co-authored-by: Delany <[email protected]>
1 parent 902d4c5 commit 52111cc

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@
8888
<type>pom</type>
8989
<scope>import</scope>
9090
</dependency>
91+
<dependency>
92+
<groupId>commons-io</groupId>
93+
<artifactId>commons-io</artifactId>
94+
<version>2.16.1</version>
95+
</dependency>
9196
</dependencies>
9297
</dependencyManagement>
9398

src/it/MJAR-307/pom.xml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22+
<modelVersion>4.0.0</modelVersion>
23+
24+
<groupId>org.apache.maven.plugins.jar.it</groupId>
25+
<artifactId>mjar-307</artifactId>
26+
<packaging>jar</packaging>
27+
<version>1.0</version>
28+
<name>it-mjar-307</name>
29+
30+
<description>Wrong version of commons-io cause a ClassNotFoundException: org.apache.commons.io.file.attribute.FileTimes</description>
31+
32+
<properties>
33+
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
34+
<project.build.outputTimestamp>${maven.build.timestamp}</project.build.outputTimestamp>
35+
</properties>
36+
37+
<build>
38+
<plugins>
39+
<plugin>
40+
<groupId>org.apache.maven.plugins</groupId>
41+
<artifactId>maven-jar-plugin</artifactId>
42+
<version>@project.version@</version>
43+
</plugin>
44+
</plugins>
45+
</build>
46+
47+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package foo.project003;
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+
/**
23+
* Hello world!
24+
*
25+
*/
26+
public class App
27+
{
28+
public static void main( String[] args )
29+
{
30+
System.out.println( "Hello World!" );
31+
}
32+
}

src/it/MJAR-307/verify.groovy

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import java.util.jar.JarFile
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+
def target = new File( basedir, "target" );
23+
def jarFile = new File( target, "mjar-307-1.0.jar" );
24+
25+
assert jarFile.exists()

0 commit comments

Comments
 (0)