mperin / quicktag-maven-plugin

Automatically exported from code.google.com/p/quicktag-maven-plugin
0 stars 0 forks source link

Compability issue with JDK 6 #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
With JDK 6, the plugin will fail:
Execution default of goal net.mgorski.quicktag:quicktag:2.1.4:quicktag failed: 
Illegal pattern character 'Y' -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
net.mgorski.quicktag:quicktag:2.1.4:quicktag (default) on project notifysvc: 
Execution default of goal net.mgorski.quicktag:quicktag:2.1.4:quicktag failed: 
Illegal pattern character 'Y'
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default 
of goal net.mgorski.quicktag:quicktag:2.1.4:quicktag failed: Illegal pattern 
character 'Y'
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: java.lang.IllegalArgumentException: Illegal pattern character 'Y'
    at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:769)
    at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:576)
    at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:501)
    at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:476)
    at net.mgorski.quicktag.buildserver.teamcity.TeamCityBuildInfoGatherer.<init>(TeamCityBuildInfoGatherer.java:27)
    at net.mgorski.quicktag.QuickTagPlugin.execute(QuickTagPlugin.java:72)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    ... 20 more

I had a check on the source code and the problem is at line 27 of 
TeamCityBuildInfoGatherer:
private static final String FMT_DATE = "YYYY-MM-DD_hh-mm-ss";

Refer to this post: 
http://stackoverflow.com/questions/10576655/illegal-pattern-character-y-on-ubunt
u/10731242#10731242

The format 'Y' seems only supported after JDK 7. I think normally 'y' should 
work to be compatible with JDK 6. 

Original issue reported on code.google.com by RuralHun...@gmail.com on 7 Aug 2014 at 7:51

GoogleCodeExporter commented 9 years ago
Will be fixed soon

Original comment by m...@mgorski.net on 13 Oct 2014 at 1:10