Author: aheritier Date: Fri Feb 15 06:24:38 2008 New Revision: 628070 URL: http://svn.apache.org/viewvc?rev=628070&view=rev Log: MECLIPSE-344 : connecting existing workspace artifact-projects Patch submitted by Richard van Nieuwenhoven Fix the case when the workspace directory is invalid and we can't find available JREs
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java?rev=628070&r1=628069&r2=628070&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/reader/ReadWorkspaceLocations.java Fri Feb 15 06:24:38 2008 @@ -420,6 +420,10 @@ File prefs = new File( workspaceLocation, ReadWorkspaceLocations.METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_LAUNCHING_PREFS ); + if ( !prefs.exists() ) + { + return jreMap; + } Properties properties = new Properties(); properties.load( new FileInputStream( prefs ) ); vms =