mirror of https://github.com/apache/lucene.git
SOLR-11331: Ability to run and debug standalone Solr and a single node SolrCloud server from Eclipse. Also being able to run all Lucene and Solr tests as a configuration
This commit is contained in:
parent
c48177b4b6
commit
ec9bc024e9
19
build.xml
19
build.xml
|
@ -288,7 +288,13 @@
|
|||
|
||||
<target name="eclipse" depends="resolve" description="Setup Eclipse configuration">
|
||||
<basename file="${basedir}" property="eclipseprojectname"/>
|
||||
<copy file="dev-tools/eclipse/dot.project" tofile=".project" overwrite="false" encoding="UTF-8">
|
||||
<copy file="dev-tools/eclipse/dot.project" tofile=".project" overwrite="false" encoding="UTF-8">
|
||||
<filterset>
|
||||
<filter token="ECLIPSEPROJECTNAME" value="${eclipseprojectname}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
<copy overwrite="false" todir="eclipse-build" encoding="UTF-8">
|
||||
<fileset dir="dev-tools/eclipse" includes="*.launch"/>
|
||||
<filterset>
|
||||
<filter token="ECLIPSEPROJECTNAME" value="${eclipseprojectname}"/>
|
||||
</filterset>
|
||||
|
@ -297,7 +303,7 @@
|
|||
<copy todir=".settings/" overwrite="true">
|
||||
<fileset dir="dev-tools/eclipse/dot.settings" includes="*.prefs" />
|
||||
</copy>
|
||||
|
||||
|
||||
<pathconvert property="eclipse.fileset.sourcefolders" pathsep="|" dirsep="/">
|
||||
<dirset dir="${basedir}/lucene" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="tools/**, build/**" />
|
||||
<dirset dir="${basedir}/solr" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="build/**" />
|
||||
|
@ -309,10 +315,19 @@
|
|||
<fileset dir="${basedir}/solr" includes="**/test-lib/*.jar,**/lib/*.jar" excludes="core/test-lib/*servlet-api*.jar, contrib/analysis-extras/**, test-framework/lib/junit*, test-framework/lib/ant*, test-framework/lib/randomizedtesting*, build/**, dist/**, package/**" />
|
||||
<map from="${basedir}/" to=""/>
|
||||
</pathconvert>
|
||||
<pathconvert property="eclipse.fileset.webfolders" pathsep="|" dirsep="/">
|
||||
<dirset dir="${basedir}/solr/server/contexts" excludes="**/*" />
|
||||
<dirset dir="${basedir}/solr/server/etc" excludes="**/*" />
|
||||
<dirset dir="${basedir}/solr/server/modules" excludes="**/*" />
|
||||
<dirset dir="${basedir}/solr/server/solr" excludes="**/*" />
|
||||
<dirset dir="${basedir}/solr/webapp/web" excludes="**/*" />
|
||||
<map from="${basedir}/" to=""/>
|
||||
</pathconvert>
|
||||
<xslt in="${ant.file}" out=".classpath" style="dev-tools/eclipse/dot.classpath.xsl" force="true">
|
||||
<outputproperty name="indent" value="yes"/>
|
||||
<param name="eclipse.fileset.libs" expression="${eclipse.fileset.libs}"/>
|
||||
<param name="eclipse.fileset.sourcefolders" expression="${eclipse.fileset.sourcefolders}"/>
|
||||
<param name="eclipse.fileset.webfolders" expression="${eclipse.fileset.webfolders}"/>
|
||||
</xslt>
|
||||
|
||||
<echo>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
>
|
||||
<xsl:param name="eclipse.fileset.sourcefolders"/>
|
||||
<xsl:param name="eclipse.fileset.libs"/>
|
||||
<xsl:param name="eclipse.fileset.webfolders"/>
|
||||
|
||||
<!--
|
||||
NOTE: This template matches the root element of any given input XML document!
|
||||
|
@ -54,7 +55,23 @@
|
|||
<classpathentry excluding="src" including="conf/**" kind="src" path="lucene/benchmark"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
|
||||
<xsl:for-each select="str:split($eclipse.fileset.webfolders,'|')">
|
||||
<xsl:sort select="text()" order="ascending" lang="en"/>
|
||||
<classpathentry kind="src" path="{.}">
|
||||
<xsl:attribute name="output">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(.,'solr/webapp/web')">
|
||||
<xsl:text>eclipse-build/solr-server/solr-webapp/webapp</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>eclipse-build/solr-server/</xsl:text><xsl:value-of select="substring(text(), 13)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</classpathentry>
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- the main resources folder is here (see above), so it's listed after the test-framework resources, making preflex-override work: -->
|
||||
<classpathentry kind="output" path="eclipse-build/main"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/@ECLIPSEPROJECTNAME@"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" javaProject="@ECLIPSEPROJECTNAME@" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="@ECLIPSEPROJECTNAME@"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/@ECLIPSEPROJECTNAME@/solr/server/start.jar" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jetty.start.Main"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--module=http"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@ECLIPSEPROJECTNAME@"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms512m -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrock -Dlog4j.configuration="file:${workspace_loc:@ECLIPSEPROJECTNAME@}/solr/server/resources/log4j.properties" -Djetty.home="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server" -Djetty.base="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server" -Dsolr.log="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build" -Dsolr.log.dir="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build" -Dsolr.solr.home="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server/solr" -DzkRun"/>
|
||||
</launchConfiguration>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/@ECLIPSEPROJECTNAME@"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" javaProject="@ECLIPSEPROJECTNAME@" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="@ECLIPSEPROJECTNAME@"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/@ECLIPSEPROJECTNAME@/solr/server/start.jar" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jetty.start.Main"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--module=http"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@ECLIPSEPROJECTNAME@"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms512m -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrock -Dlog4j.configuration="file:${workspace_loc:@ECLIPSEPROJECTNAME@}/solr/server/resources/log4j.properties" -Djetty.home="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server" -Djetty.base="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server" -Dsolr.log="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build" -Dsolr.log.dir="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build" -Dsolr.solr.home="${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server/solr""/>
|
||||
</launchConfiguration>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/@ECLIPSEPROJECTNAME@"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=@ECLIPSEPROJECTNAME@"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@ECLIPSEPROJECTNAME@"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
|
||||
</launchConfiguration>
|
|
@ -49,6 +49,10 @@ Apache UIMA 2.3.1
|
|||
Apache ZooKeeper 3.4.11
|
||||
Jetty 9.4.8.v20171121
|
||||
|
||||
* SOLR-11331: Ability to run and debug standalone Solr and a single node SolrCloud server from Eclipse.
|
||||
Also being able to run all Lucene and Solr tests as a configuration (Karthik Ramachandran via
|
||||
Varun Thacker, Uwe Schindler)
|
||||
|
||||
|
||||
Upgrade Notes
|
||||
----------------------
|
||||
|
|
|
@ -641,17 +641,20 @@
|
|||
<target name="resolve" depends="resolve-example,resolve-server">
|
||||
<sequential>
|
||||
<ant dir="core" target="resolve" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<ant dir="solrj" target="resolve" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<ant dir="test-framework" target="resolve" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<ant dir="server" target="resolve" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<ant dir="solr-ref-guide" target="resolve" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
</ant>
|
||||
<contrib-crawl target="resolve"/>
|
||||
</sequential>
|
||||
</target>
|
||||
|
|
Loading…
Reference in New Issue