-
Notifications
You must be signed in to change notification settings - Fork 48
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
Integration with m2eclipse #78
Comments
Gotcha, I've had this issue. Thanks for reporting. When the physical source path doesn't exist for test it causes an issue because m2e sets it up anyway. This feels like a m2e issue, although I'll have to investigate further. |
Ok, inasmuch as it is so annoying to cleanup ~30 projects from generated staff after each project update I spent few hours and find the the reason (workaround). The problem is in the launch generator. The default launch configuration SHOULD NOT include the test sources. It does not resolve the "optional" issue, but it resolve MY issue (all my wrong classpath entries are from tests). Nonetheless the launch configuration INCLUDE all the sources from the projects. The reason is in wrong test Source Folder detection. gwt-eclipse-plugin\plugins\com.google.gwt.eclipse.core\src\com\google\gwt\eclipse\core\GWTProjectUtilities.java public static boolean isTestPath(IPath path) {
return "test".equals(path.lastSegment())
|| "javatests".equals(path.lastSegment());
} It tests the last segment, but the standard maven project has "src/test/java". So if you will fix the test Source Folder detection it will eliminate the issue with m2e which generate non existing classpath entries. |
Ok. It is not a real solution, because it fix include/exclude tests from launch configuration. To fix he original issue you should change fillGWTSourceFolderPathsFromProject from the same class (GWTProjectUtilities) to check IClasspathEntry is optional (like bellow) public boolean isOptional() {
for (int i = 0, length = this.extraAttributes.length; i < length; i++) {
IClasspathAttribute attribute = this.extraAttributes[i];
if (IClasspathAttribute.OPTIONAL.equals(attribute.getName()) && "true".equals(attribute.getValue())) //$NON-NLS-1$
return true;
}
return false;
} and check if curClasspathEntry.getPath() exists on the file system. |
Do I have to create a separate issue for incorrect including test sources to run-time classpath? |
Looks fine. I guess you don't have to create an issue for that. |
I'm out of country at the moment and tired, so I'll wait till I get back to merge it. Thats the 15th and a couple days to recover. Then I can merge and build the snapshot. |
Greate 👍 |
Merged and updated repo. I've marked this fixed and if you can verify that would be great. |
I update the workspace with new version, it continue works. I am going to create new workspace from scratch in few days. will let you know if it will works correctly. |
m2eclipse plugin generate classpathentry for src/test/java event if the project miss it (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=424200).
The gwt-eclipse-plugin shows the "The archive: /com.jresearchsoft.booking.ft.common.domain/src/test/java which is referenced by the classpath, does not exist." and brake the run until I manually remove "wrong" classpathentry.
The classpathentry has optional attribute so the gwt-eclipse-plugin MAY ignore it and continue to run.
The text was updated successfully, but these errors were encountered: