Bug 59211

Summary: Add hamcrest to IDE's classpath to make test case compilable
Product: Tomcat 9 Reporter: Huxing Zhang <huxing.zhang>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 9.0.0.M4   
Target Milestone: -----   
Hardware: PC   
OS: All   
Attachments: Patch to add hamcrest to IDE's classpath.

Description Huxing Zhang 2016-03-22 07:01:51 UTC
The ant task ide-eclipse helps us to generate configuration files for IDE, but I found that hamcrest is missing in the classpath generated for IDE. Thus I have to manually add it to classpath  in order to run test case from IDE.
Comment 1 Huxing Zhang 2016-03-22 07:03:31 UTC
Created attachment 33691 [details]
Patch to add hamcrest to IDE's classpath.
Comment 2 Violeta Georgieva 2016-03-22 08:59:31 UTC
Hi,

I'm curios about the Eclipse version.
With Eclipse Luna and Mars this is added by default with the following declaration

<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>

junit and hamcrest jar files are taken from  Eclipse plugins folder.

Thanks,
Violeta
Comment 3 Huxing Zhang 2016-03-22 09:05:55 UTC
Hi, I'm using Intellij IDEA 14.1, the way I import tomcat source code  is to import from eclipse project, since there is no ide-idea ant task.
Comment 4 Violeta Georgieva 2016-03-22 09:30:03 UTC
(In reply to Huxing Zhang from comment #3)
> Hi, I'm using Intellij IDEA 14.1, the way I import tomcat source code  is to
> import from eclipse project, since there is no ide-idea ant task.

I understand.

Thanks for the report and the patch.
The fix will be available from 9.0.0.M5, 8.5.1, 8.0.34 and 7.0.69 onwards.

Regards,
Violeta