You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2018/03/18 10:44:10 UTC

lucene-solr:master: 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

Repository: lucene-solr
Updated Branches:
  refs/heads/master c48177b4b -> ec9bc024e


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


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/ec9bc024
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ec9bc024
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ec9bc024

Branch: refs/heads/master
Commit: ec9bc024e95564d4bd2f094a17514d6d741d7712
Parents: c48177b
Author: Uwe Schindler <us...@apache.org>
Authored: Sun Mar 18 11:43:51 2018 +0100
Committer: Uwe Schindler <us...@apache.org>
Committed: Sun Mar 18 11:43:51 2018 +0100

----------------------------------------------------------------------
 build.xml                               | 19 +++++++++++++++++--
 dev-tools/eclipse/dot.classpath.xsl     | 19 ++++++++++++++++++-
 dev-tools/eclipse/run-solr-cloud.launch | 20 ++++++++++++++++++++
 dev-tools/eclipse/run-solr.launch       | 20 ++++++++++++++++++++
 dev-tools/eclipse/run-test-cases.launch | 17 +++++++++++++++++
 solr/CHANGES.txt                        |  4 ++++
 solr/build.xml                          | 19 +++++++++++--------
 7 files changed, 107 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ec9bc024/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 70f0cc7..49b8eec 100755
--- a/build.xml
+++ b/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>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ec9bc024/dev-tools/eclipse/dot.classpath.xsl
----------------------------------------------------------------------
diff --git a/dev-tools/eclipse/dot.classpath.xsl b/dev-tools/eclipse/dot.classpath.xsl
index e8c0e92..40bca21 100644
--- a/dev-tools/eclipse/dot.classpath.xsl
+++ b/dev-tools/eclipse/dot.classpath.xsl
@@ -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"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ec9bc024/dev-tools/eclipse/run-solr-cloud.launch
----------------------------------------------------------------------
diff --git a/dev-tools/eclipse/run-solr-cloud.launch b/dev-tools/eclipse/run-solr-cloud.launch
new file mode 100644
index 0000000..493cb75
--- /dev/null
+++ b/dev-tools/eclipse/run-solr-cloud.launch
@@ -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="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8&quot; javaProject=&quot;@ECLIPSEPROJECTNAME@&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+		<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;@ECLIPSEPROJECTNAME@&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
+		<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/@ECLIPSEPROJECTNAME@/solr/server/start.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+	</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 &#13;&#10;-Djetty.port=8983&#13;&#10;-DSTOP.PORT=7983 &#13;&#10;-DSTOP.KEY=solrrock&#13;&#10;-Dlog4j.configuration=&quot;file:${workspace_loc:@ECLIPSEPROJECTNAME@}/solr/server/resources/log4j.properties&quot;&#13;&#10;-Djetty.home=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server&quot;&#13;&#10;-Djetty.base=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server&quot;&#13;&#10;-Dsolr.log=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build&quot;&#13;&#10;-Dsolr.log.dir=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build&quot;&#13;&#10;-Dsolr.solr.home=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server/solr&quot;&#13;&#10;-DzkRun"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ec9bc024/dev-tools/eclipse/run-solr.launch
----------------------------------------------------------------------
diff --git a/dev-tools/eclipse/run-solr.launch b/dev-tools/eclipse/run-solr.launch
new file mode 100644
index 0000000..dc167d0
--- /dev/null
+++ b/dev-tools/eclipse/run-solr.launch
@@ -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="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8&quot; javaProject=&quot;@ECLIPSEPROJECTNAME@&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+		<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;@ECLIPSEPROJECTNAME@&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
+		<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/@ECLIPSEPROJECTNAME@/solr/server/start.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+	</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 &#13;&#10;-Djetty.port=8983&#13;&#10;-DSTOP.PORT=7983 &#13;&#10;-DSTOP.KEY=solrrock&#13;&#10;-Dlog4j.configuration=&quot;file:${workspace_loc:@ECLIPSEPROJECTNAME@}/solr/server/resources/log4j.properties&quot;&#13;&#10;-Djetty.home=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server&quot;&#13;&#10;-Djetty.base=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server&quot;&#13;&#10;-Dsolr.log=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build&quot;&#13;&#10;-Dsolr.log.dir=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build&quot;&#13;&#10;-Dsolr.solr.home=&quot;${workspace_loc:@ECLIPSEPROJECTNAME@}/eclipse-build/solr-server/solr&quot;"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ec9bc024/dev-tools/eclipse/run-test-cases.launch
----------------------------------------------------------------------
diff --git a/dev-tools/eclipse/run-test-cases.launch b/dev-tools/eclipse/run-test-cases.launch
new file mode 100644
index 0000000..3fcac78
--- /dev/null
+++ b/dev-tools/eclipse/run-test-cases.launch
@@ -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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ec9bc024/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d2eff52..65dd8d8 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -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
 ----------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ec9bc024/solr/build.xml
----------------------------------------------------------------------
diff --git a/solr/build.xml b/solr/build.xml
index 3f0596f..28ade70 100644
--- a/solr/build.xml
+++ b/solr/build.xml
@@ -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>