-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Project import gets org.eclipse.jdt.core.JavaModelException #2866
Comments
@vparfonov - can you ask a couple of our maven plugin guys to take a peak at this, please? |
@riuvshin @azatsarynnyy can you guys look at this please ? |
I had another query, is there any way to add mirror to your maven server plugin implementation. It seems eclipse che ide is unable to find my dependencies located at private nexus |
We generally suggest that people modify their settings.xml in their workspace. Some include it in their dockerfile. Are you thinking of another approach? |
No its not about that. I changed my conf/settings.xml and i can build my project from terminal using build commands. But in the IDE it doesn't get the dependent jars in classpath. I assume it may have soemthing to do with the maven server plugin. Can you tell me how the maven plugin resolves any dependacy jar and add it to the class path ? I will apretiate if you tell me which file i should look for the implementation of resolving dependency . Thanks in advance |
One of @vparfonov @azatsarynnyy or a member of the IDE team will get back to you. The maven plugin should automatically detect all dependnecies and download them. If it is not, then it is a bug. I've asked the engineering team to look at your particular pom.xml in the upcoming sprint. Can you post details of that online? |
Thanks for your response. There were 2 bugs.
cause: We add the mirror in the M2_HOME/conf/settings.xml which is global setting for Maven but in the mavenserver plugin it only considered user setting. so i fixed the fucntion like this ` public MavenServerWrapper createMavenServer() {
` N.B. Still having problem to download some jars which have SNAPSHOT version rather than normal version
this type of module declaration should handle differently |
IDE team will investigate it on next sprint |
Thank you Mr. vparfonov . I solved the issue (It seems to be solved but i am not sure if it's properly solved) by modifying MavenProject.java ` private Map<String, String> collectModulesNameAndPath(MavenModel model) {
` Please check if it's correct way and let me know. Thanks for your help |
@KakashiMamun nice we want to do something like this. Thanks |
…tions Signed-off-by: Evgen Vidolob <evidolob@codenvy.com>
Signed-off-by: Evgen Vidolob <evidolob@codenvy.com>
…dules (eclipse-che#3457) * eclipse-che#2866 handle relative path and including 'pom.xml' in modules declarations Signed-off-by: Evgen Vidolob <evidolob@codenvy.com>
[Project import gets org.eclipse.jdt.core.JavaModelException]
Reproduction Steps:
I have a project with these modles
As you can see the 'front' project have an aggregator pom rather than a pom xml. the aggregator pom
has these modules
when i import my project to che it gives me the following error
org.eclipse.jdt.core.JavaModelException: Can't find parent folder: /hue-scheduler/hue-scheduler-front/aggregator-pom.xml/.codenvy
at org.eclipse.jdt.internal.core.JavaProject.writeFileEntries(JavaProject.java:2023) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaModelManager$PerProjectInfo.writeAndCacheClasspath(JavaModelManager.java:2789) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaModelManager$PerProjectInfo.writeAndCacheClasspath(JavaModelManager.java:2802) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.SetClasspathOperation.executeOperation(SetClasspathOperation.java:77) ~[org-eclipse-jdt-core-repack-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:808) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:877) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:422) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:370) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:391) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.core.MavenWorkspace.updateJavaProject(MavenWorkspace.java:179) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.core.MavenWorkspace$$Lambda$114/1441100330.accept(Unknown Source) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at java.util.HashMap$KeySet.forEach(HashMap.java:928) [na:1.8.0_45]
at org.eclipse.che.plugin.maven.server.core.MavenWorkspace.createNewProjects(MavenWorkspace.java:134) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.core.MavenWorkspace.access$100(MavenWorkspace.java:59) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.core.MavenWorkspace$2.projectUpdated(MavenWorkspace.java:105) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.eclipse.che.plugin.maven.server.core.MavenProjectManager.lambda$createListenersDispatcher$0(MavenProjectManager.java:101) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.core.MavenProjectManager$$Lambda$12/1461180347.invoke(Unknown Source) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at com.sun.proxy.$Proxy57.projectUpdated(Unknown Source) [na:na]
at org.eclipse.che.plugin.maven.server.core.MavenProjectManager$UpdateState.fireUpdate(MavenProjectManager.java:519) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.core.MavenProjectManager.update(MavenProjectManager.java:147) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.core.MavenWorkspace.update(MavenWorkspace.java:148) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.maven.server.projecttype.handler.MavenProjectInitHandler.initializeClasspath(MavenProjectInitHandler.java:45) [che-plugin-maven-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.plugin.java.server.projecttype.AbstractJavaInitHandler.onProjectInitialized(AbstractJavaInitHandler.java:60) [che-plugin-java-ext-lang-server-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.api.project.server.ProjectRegistry.fireInit(ProjectRegistry.java:404) [che-core-api-project-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.api.project.server.ProjectRegistry.fireInitHandlers(ProjectRegistry.java:390) [che-core-api-project-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.api.project.server.ProjectManager.updateProject(ProjectManager.java:336) [che-core-api-project-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.api.project.server.ProjectService.updateProject(ProjectService.java:222) [che-core-api-project-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.everrest.core.impl.method.DefaultMethodInvoker.invokeMethod(DefaultMethodInvoker.java:140) [everrest-core-1.13.1.jar:na]
at org.everrest.core.impl.method.DefaultMethodInvoker.invokeMethod(DefaultMethodInvoker.java:60) [everrest-core-1.13.1.jar:na]
at org.everrest.core.impl.RequestDispatcher.doInvokeResource(RequestDispatcher.java:306) [everrest-core-1.13.1.jar:na]
at org.everrest.core.impl.RequestDispatcher.invokeSubResourceMethod(RequestDispatcher.java:297) [everrest-core-1.13.1.jar:na]
at org.everrest.core.impl.RequestDispatcher.dispatch(RequestDispatcher.java:233) [everrest-core-1.13.1.jar:na]
at org.everrest.core.impl.RequestDispatcher.dispatch(RequestDispatcher.java:128) [everrest-core-1.13.1.jar:na]
at org.everrest.core.impl.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:62) [everrest-core-1.13.1.jar:na]
at org.everrest.core.impl.EverrestProcessor.process(EverrestProcessor.java:120) [everrest-core-1.13.1.jar:na]
at org.everrest.core.servlet.EverrestServlet.service(EverrestServlet.java:61) [everrest-core-1.13.1.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286) [guice-servlet-4.1.0.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276) [guice-servlet-4.1.0.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181) [guice-servlet-4.1.0.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-4.1.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) [guice-servlet-4.1.0.jar:na]
at org.eclipse.che.filters.EnvironmentInitializationFilter.doFilter(EnvironmentInitializationFilter.java:54) [wsagent-local-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-4.1.0.jar:na]
at org.apache.catalina.filters.CorsFilter.handleSimpleCORS(CorsFilter.java:301) [catalina.jar:8.0.37]
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:169) [catalina.jar:8.0.37]
at org.eclipse.che.api.core.cors.CheCorsFilter.doFilter(CheCorsFilter.java:59) [che-core-api-core-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-4.1.0.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-4.1.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135) [guice-servlet-4.1.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.37]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.37]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.37]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.37]
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:189) [logback-access-1.1.2.jar:na]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.37]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) [catalina.jar:8.0.37]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100) [tomcat-coyote.jar:8.0.37]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687) [tomcat-coyote.jar:8.0.37]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote.jar:8.0.37]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote.jar:8.0.37]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.37]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: org.eclipse.che.api.core.NotFoundException: Can't find parent folder: /hue-scheduler/hue-scheduler-front/aggregator-pom.xml/.codenvy
at org.eclipse.che.core.internal.resources.Workspace.createResource(Workspace.java:808) ~[org.eclipse.core.resources-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.che.core.internal.resources.File.create(File.java:66) ~[org.eclipse.core.resources-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaProject.setSharedProperty(JavaProject.java:2061) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
at org.eclipse.jdt.internal.core.JavaProject.writeFileEntries(JavaProject.java:2019) ~[org.eclipse.jdt.ui-5.0.0-M6-SNAPSHOT.jar:5.0.0-M6-SNAPSHOT]
... 74 common frames omitted
I think the jdt-extension is not being able to create '.codenvy' folder for aggregator pom
Expected behavior:
Should be able to import the maven project.
Observed behavior:
[Exception]
Che version: nightly but happens in 4.7.2 also
OS and version: Ubuntu 14.04
Docker version: 1.12.2
Che install: Docker container
Additional information:
The text was updated successfully, but these errors were encountered: