-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added error message if there are multiple jars in the candidate and b… #157
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1488,12 +1488,15 @@ def getAntClassPath(checkout): | |
|
||
# We use the jar file for core to leverage the MR JAR | ||
core_jar_file = None | ||
jars_found = 0 | ||
for filename in os.listdir('%s/lucene/build/core' % path): | ||
if reCoreJar.match(filename) is not None: | ||
core_jar_file = '%s/lucene/build/core/%s' % (path, filename) | ||
break | ||
jars_found += 1 | ||
if core_jar_file is None: | ||
raise RuntimeError('can\'t find core JAR file in %s' % ('%s/lucene/build/core' % path)) | ||
if jars_found > 1: | ||
raise RuntimeError('Found %d jars in %s, please only include 1 jar file' % (jars_found,'%s/lucene/build/core' % path)) | ||
|
||
cp.append(core_jar_file) | ||
cp.append('%s/lucene/build/core/classes/test' % path) | ||
|
@@ -1536,12 +1539,15 @@ def getClassPath(checkout): | |
|
||
# We use the jar file for core to leverage the MR JAR | ||
core_jar_file = None | ||
jars_found = 0 | ||
for filename in os.listdir('%s/lucene/core/build/libs' % path): | ||
if reCoreJar.match(filename) is not None: | ||
core_jar_file = '%s/lucene/core/build/libs/%s' % (path, filename) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uh oh, why is this path different from the above path! Why are we doing this (differently!) in two places? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line in
The top path is in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK this is actually dead-ish code now, but let's leave it since sometimes we do go back and (try to) run |
||
break | ||
jars_found += 1 | ||
if core_jar_file is None: | ||
raise RuntimeError('can\'t find core JAR file in %s' % ('%s/lucene/core/build/libs' % path)) | ||
if jars_found > 1: | ||
raise RuntimeError('Found %d jars in "%s"; please run "gradle clean" to clean up' % (jars_found,'%s/lucene/build/core/libs' % path)) | ||
|
||
cp.append(core_jar_file) | ||
cp.append('%s/lucene/core/build/classes/java/test' % path) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change message to
Found %d jars in "%s"; please run "gradle clean" to clean up
or so?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually just realized in this code path the
build.gradle
file wouldn't exist (see other comment). So then wouldn'tgradle clean
not work?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH, yes, then suggest
ant clean
here andgradle clean
in the other code path? Or vice/versa :)