39
39
import org .codehaus .plexus .PlexusContainer ;
40
40
import org .codehaus .plexus .archiver .jar .JarArchiver ;
41
41
import org .codehaus .plexus .archiver .jar .ManifestException ;
42
+ import org .junit .Ignore ;
42
43
import org .junit .Test ;
43
44
import org .sonatype .aether .RepositorySystemSession ;
44
45
import org .sonatype .aether .util .DefaultRepositorySystemSession ;
@@ -217,6 +218,7 @@ public boolean isAddClasspath()
217
218
}
218
219
219
220
@ Test
221
+ @ Ignore ("Currently not working on Linux JDK 9 which looks like a JDK bug at the moment. See comments in Tests" )
220
222
public void testRecreation ()
221
223
throws Exception
222
224
{
@@ -236,7 +238,7 @@ public void testRecreation()
236
238
assertTrue ( jarFile .exists () );
237
239
238
240
long history = System .currentTimeMillis () - 60000L ;
239
- System .out .println ( "History : " + history );
241
+ System .out .println ( "history : " + history );
240
242
jarFile .setLastModified ( history );
241
243
long time = jarFile .lastModified ();
242
244
System .out .println ( "Time:" + time );
@@ -250,6 +252,10 @@ public void testRecreation()
250
252
archiver .createArchive ( session , project , config );
251
253
// Is the assumption correct that the jar file itself
252
254
// should have the same last modified time as the files itself ?
255
+
256
+ // Based on some experiments with a result like this:
257
+ // History 1532810292406 time:1532810292000 expected:<1532810352000> but was:<1532810292000>
258
+ // It looks like a JDK Bug: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8177809
253
259
assertEquals ( "History " + history + " time:" + time , jarFile .lastModified (), time );
254
260
255
261
config .setForced ( true );
0 commit comments