Skip to content
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

MergePlugin does not include merge projects in generated Eclipse classpath when running Gradle as a daemon [SPR-14102] #18674

Closed
spring-issuemaster opened this issue Mar 31, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Mar 31, 2016

Sam Brannen opened SPR-14102 and commented

Status Quo

The org.springframework.build.gradle.MergePlugin does not consistently include merge projects in the generated .classpath file for Eclipse projects: sometimes it works; sometimes it doesn't.

For example, if you execute the import-into-eclipse.sh script, the resulting .classpath file for the spring-test module should always contain the following entries, but sometimes they are omitted causing compiler errors within Eclipse.

<classpathentry kind="src" path="/spring-beans-groovy"/>
<classpathentry kind="src" path="/spring-orm-hibernate4"/>
<classpathentry kind="src" path="/spring-orm-hibernate5"/>
<classpathentry kind="src" path="/spring-webmvc-tiles2"/>

Deliverables

  • Ensure that merge projects are always included in the generated .classpath file for Eclipse projects.

Affects: 4.2.5, 4.3 RC1

Referenced from: commits 9438c41, 970dc4a

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 15, 2016

Rob Winch commented

Sam Brannen I tried quite a few combinations and I am unable to reproduce this issue. I'm going to close this as cannot reproduce. If you come up with some more information on how to reproduce it, I can take a look again then.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 15, 2016

Sam Brannen commented

Hmmmm.... it just happened on my machine again. This is from the bottom of spring-est/.classpath:

<classpathentry kind="src" path="/spring-core"/>
<classpathentry kind="src" path="/spring-beans"/>
<classpathentry kind="src" path="/spring-context"/>
<classpathentry kind="src" path="/spring-aop"/>
<classpathentry kind="src" path="/spring-expression"/>
<classpathentry kind="src" path="/spring-jdbc"/>
<classpathentry kind="src" path="/spring-tx"/>
<classpathentry kind="src" path="/spring-orm"/>
<classpathentry kind="src" path="/spring-web"/>
<classpathentry kind="src" path="/spring-webmvc"/>
<classpathentry kind="src" path="/spring-webmvc-portlet"/>
<classpathentry kind="src" path="/spring-context-support"/>
<classpathentry kind="src" path="/spring-oxm"/>
<classpathentry kind="src" path="/spring-instrument" exported="true"/>

The merged modules are missing.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 15, 2016

Sam Brannen commented

I'm using Gradle in daemon mode, in case that is somehow the culprit.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 15, 2016

Sam Brannen commented

Yep, that seems to be the culprit.

If I kill the Gradle daemon and run the import script, it works fine, but if the Gradle daemon is already running, the merged modules never get included in the classpath.

I am therefore reopening this issue.

To reproduce this issue, just add org.gradle.daemon=true to ~/.gradle/gradle.properties and run the import script twice.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 15, 2016

Rob Winch commented

Thanks Sam Brannen! I was able to reproduce this and fix the problem by adding --no-daemon to the import scripts.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 15, 2016

Sam Brannen commented

Thanks!

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 15, 2016

Juergen Hoeller commented

Backported to 4.2.x now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.