Revision: 171 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=171&view=rev Author: bindul Date: 2008-04-17 01:16:43 -0700 (Thu, 17 Apr 2008)
Log Message: ----------- BUG#1936496 [Unable to determine the source of this jar and hence cannot]: Put in workaround for URL#toURI() method. See http://weblogs.java.net/blog/kohsuke/archive/2007/04/how_to_convert.html Modified Paths: -------------- releng/maven-jsmooth-plugin/trunk/src/main/java/com/mindtree/techworks/insight/releng/mvn/jsmooth/JSmoothCompileMojo.java Modified: releng/maven-jsmooth-plugin/trunk/src/main/java/com/mindtree/techworks/insight/releng/mvn/jsmooth/JSmoothCompileMojo.java =================================================================== --- releng/maven-jsmooth-plugin/trunk/src/main/java/com/mindtree/techworks/insight/releng/mvn/jsmooth/JSmoothCompileMojo.java 2008-04-17 06:36:38 UTC (rev 170) +++ releng/maven-jsmooth-plugin/trunk/src/main/java/com/mindtree/techworks/insight/releng/mvn/jsmooth/JSmoothCompileMojo.java 2008-04-17 08:16:43 UTC (rev 171) @@ -259,10 +259,19 @@ "Unable to determine the source of this jar and hence cannot extract skeletons"); } URL baseUrl = cs.getLocation(); + getLog().debug("Determined code source location: " + baseUrl.toExternalForm()); File destinationDir = new File(jsmoothTmpDir + File.separator + "skeletons"); try { - File basePath = new File(baseUrl.toURI()); + // Determine the File object. This has been modified from the + // previous implementation to handle illegal characters in URLs. + File basePath = null; + try { + basePath = new File(baseUrl.toURI()); + } catch (URISyntaxException e) { + getLog().debug("Failed the URI method.. faling back to path"); + basePath = new File(baseUrl.getPath()); + } getLog().debug( "Attempting extraction from" + basePath.getAbsolutePath()); @@ -282,10 +291,6 @@ "Unable to determine the source of this jar and hence cannot extract skeletons"); } } - } catch (URISyntaxException e) { - // Should never happen - throw new MojoFailureException( - "Unable to determine the source of this jar and hence cannot extract skeletons"); } catch (IOException e) { // Error copying file throw new MojoExecutionException(this, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ MindTreeInsight-commits mailing list MindTreeInsight-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mindtreeinsight-commits