-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
1.0.1 Java API compilation error on source download #5464
Comments
It would be helpful to see the context (aka source file + line) where you get this error. |
do you run into this problem with windows with java 7? can you try to start elasticsearch like this:
does this change anything? |
this issue does not affect ES itself, it affects working with it's Java API, when looking at the sources |
hi @nfx Did you manage to resolve this issue? |
@clintongormley hi, i managed to do it only as a hack - i had to manually run perl command replacing com.google.guava.collect with org.elasticsearch.collect or smth like it. i didn't need to do it with v0.90 though. could you maybe try to update source artifact compilation to be fixed after mvn-shade plugin gets guava and jodatime inside of elasticsearch artifact? |
Could this be related to #3557? |
@clintongormley doesnt look like it |
@nfx I don't follow the problem or the solution that you employed exactly. Could you show us some example code demonstrating the issue? |
@clintongormley it could be related to #3557, also i might add "Avoid shading Google Guava". Would it make sense to create custom Maven build without Guava/Joda for applications that use Java API? |
@nfx We've talked about this and we don't understand exactly what you are doing here. Could you talk us through how you are setting things up? |
Let's say: so what i do after downloading ES sources: go to ~/.m2/repository/org/elasticsearch/elasticsearch/1.1.0/, manually unpack *-sources.jar and replace imports that are causing errors with org.elasticsearch.common. but that's a hack, i guess.... |
This is very odd - Eclipse and IntelliJ show you the sources without trying to compile them. Which IDE are you using? |
IntelliJ 13... |
@nfx I guess you are trying to compile your own plugin or your own application, right? Could you also paste your |
@dadoonet i guess my IDE tried to compile dependencies. The funny thing is that this didn't appear in 0.90.x
|
@nfx Sorry to answer lately. So you are using IntelliJ 13 (may be 14 now)? For example, here is what I can see when I import elasticsearch as a Maven dependency in analysis-phonetic plugin project. <?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="Python 3.3.3 (/usr/local/bin/python3.3)" />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Python 3.3.3 (/usr/local/bin/python3.3) interpreter library" level="application" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-all:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.lucene:lucene-test-framework:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.lucene:lucene-codecs:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-core:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.carrotsearch.randomizedtesting:junit4-ant:2.1.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.1.10" level="project" />
<orderEntry type="library" name="Maven: org.elasticsearch:elasticsearch:2.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-backward-codecs:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-analyzers-common:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-queries:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-memory:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-highlighter:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-queryparser:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-sandbox:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-suggest:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-misc:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-join:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-grouping:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-spatial:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-expressions:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: org.antlr:antlr-runtime:3.5" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:4.1" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-commons:4.1" level="project" />
<orderEntry type="library" name="Maven: com.spatial4j:spatial4j:0.4.1" level="project" />
<orderEntry type="library" name="Maven: com.vividsolutions:jts:1.13" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy-all:indy:2.3.2" level="project" />
<orderEntry type="library" name="Maven: log4j:apache-log4j-extras:1.2.17" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.2" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:4.1.0" level="project" />
<orderEntry type="library" name="Maven: org.fusesource:sigar:1.6.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-analyzers-phonetic:5.0.0-snapshot-1641343" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.elasticsearch:elasticsearch:test-jar:tests:2.0.0-SNAPSHOT" level="project" />
</component>
</module> You might have different settings? May be you could paste your full |
@nfx I'm closing this for now. If you have any new information on this, feel free to reopen it. Thanks. |
After downloading sources i started to get compilation errors like
With 0.90x versions this was not a problem. What is temporary solution and what is proper solution?
The text was updated successfully, but these errors were encountered: