Author: fgiust Date: Wed Jul 19 14:06:47 2006 New Revision: 423607 URL: http://svn.apache.org/viewvc?rev=423607&view=rev Log: don't add test dependencies to bundle classpath, don't use the M2_REPO var for source archives when no var is used for the main jar
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java?rev=423607&r1=423606&r2=423607&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java Wed Jul 19 14:06:47 2006 @@ -244,17 +244,15 @@ // if the dependency is not provided and the plugin runs in "pde mode", the dependency is // added to the Bundle-Classpath: - if ( inPdeMode && !dep.isProvided() ) + if ( inPdeMode && !dep.isProvided() && !dep.isTestDependency() ) { try { - if ( !pdeLibDir.exists() ) { pdeLibDir.mkdirs(); } FileUtils.copyFileToDirectory( dep.getFile(), pdeLibDir ); - } catch ( IOException e ) { @@ -284,8 +282,18 @@ } if ( dep.getSourceAttachment() != null ) { - sourcepath = M2_REPO + "/" //$NON-NLS-1$ - + IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, dep.getSourceAttachment(), false ); + if ( ATTR_VAR.equals( kind ) ) + { + sourcepath = M2_REPO + + "/" //$NON-NLS-1$ + + IdeUtils + .toRelativeAndFixSeparator( localRepositoryFile, dep.getSourceAttachment(), false ); + } + else + { + // source archive must be referenced with the full path, we can't mix a lib with a variable + sourcepath = IdeUtils.getCanonicalPath( dep.getSourceAttachment() ); + } } if ( dep.getJavadocAttachment() != null )