You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bl...@apache.org on 2022/02/09 14:08:42 UTC
[cassandra] branch trunk updated: Fix classpath file creation for eclipse
This is an automated email from the ASF dual-hosted git repository.
blerer pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6d7b0a1 Fix classpath file creation for eclipse
6d7b0a1 is described below
commit 6d7b0a10796cfedd11c4a7a1de81bc48bf8ea3cc
Author: Yash Ladha <ya...@yashladha.in>
AuthorDate: Wed Jan 26 09:30:42 2022 +0530
Fix classpath file creation for eclipse
Patch by Yash Ladha; reviewed by Benjamin Lerer and Berenguer Blasi for CASSANDRA-17294
When building the eclipse file for development, `.classpath` file was
not correctly generated as it was not getting closed. Also there were
missing third-party libs that were essential for development.
This commit fixes the generation of classpath for
`generate-eclipse-files` command.
---
build.xml | 37 ++++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/build.xml b/build.xml
index 67a758c..07c4057 100644
--- a/build.xml
+++ b/build.xml
@@ -2111,7 +2111,24 @@
</natures>
</projectDescription>]]>
</echo>
- <echo file=".classpath"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+ <path id="eclipse-project-libs-path">
+ <fileset dir="lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <fileset dir="build/lib/jars">
+ <include name="**/*.jar" />
+ </fileset>
+ <fileset dir="build/test/lib/jars">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+ <pathconvert property="eclipse-libs-list" refid="eclipse-project-libs-path" pathsep="${line.separator}">
+ <mapper>
+ <regexpmapper from="^(.*)$$" to='<classpathentry kind="lib" path="\1\" \/>'/>
+ </mapper>
+ </pathconvert>
+ <property name="eclipse-project-libs" refid="eclipse-project-libs-path"/>
+ <echo file=".classpath"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/resources"/>
@@ -2131,26 +2148,16 @@
<classpathentry kind="output" path="build/classes/eclipse"/>
<classpathentry kind="lib" path="test/conf"/>
<classpathentry kind="lib" path="${java.home}/../lib/tools.jar"/>
+ ${eclipse-libs-list}
+</classpath>
]]>
</echo>
- <path id="eclipse-project-libs-path">
- <fileset dir="lib">
- <include name="**/*.jar" />
- </fileset>
- <fileset dir="build/lib/jars">
- <include name="**/*.jar" />
- </fileset>
- <fileset dir="build/test/lib/jars">
- <include name="**/*.jar" />
- </fileset>
- </path>
- <property name="eclipse-project-libs" refid="eclipse-project-libs-path"/>
- <taskdef name="echoeclipseprojectslibs" classname="org.apache.cassandra.anttasks.EchoEclipseProjectLibs" classpath="${test.classes}">
+ <taskdef name="echoeclipseprojectslibs" classname="org.apache.cassandra.anttasks.EchoEclipseProjectLibs" classpath="${test.classes}">
<classpath>
<path refid="cassandra.classpath"/>
<path refid="cassandra.classpath.test"/>
</classpath>
- </taskdef>
+ </taskdef>
<mkdir dir=".settings" />
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org