Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Odd problem with source folder definition
Odd problem with source folder definition [message #183344] Fri, 22 October 2004 11:24 Go to next message
Eclipse UserFriend
Originally posted by: sstephens.renewdata.com

Hey folks. I have a problem specifying source files that are below the
top level project folder - most work fine, but this case isn't.

Here's some specifics for my current situation:
My java application is built with two sibling projects

- common
- myapp

myapp includes common as a project, and myapp has the following dir
structure:

-.- myapp
|-.- src
| |-.- main
| | |-.- com.mycompany.package
| |
| |-.- test
| | |-.- com.mycompany.testpackage

The problem is, I've got a test class extending a class from the
StrutsTestCase jar (com.mycompany.app.cactus.LoginLogoutTest extends
CactusStrutsTestCase) in which the package statement for the java class
gives me a red underline error in eclipse:

"The declared package does not match the expected package
src.test.com.mycompany.app.cactus"

Other pertinent facts:
1) In the project properties source tab, the folders chosen are
myapp/src/main and myapp/src/test.
2) Other tests in the same package that extend ServletTestCase (in the
cactus.jar) do not show the error on the package statement - so I'd
imagine its not simply because of specifying deeper folders in the source
tab.

Any ideas on what the problem could be? I've tried defining the struts
test case jar and the cactus jar in User libraries or as individual jars
(in the libraries tab of the properties dialog) - no change.

I've exhausted everything I can think of to solve it, so feel free to
throw you're ideas out there. If you need more info, I'll be glad to
supply it.

Thanks,
Sean
Re: Odd problem with source folder definition [message #183355 is a reply to message #183344] Fri, 22 October 2004 12:06 Go to previous message
Eclipse UserFriend
Originally posted by: sstephens.renewdata.com

As an update, moving the offending test down one more package to
com.mycompany.app.cactus.actions gets rid of the error.

Although its still a mystery to me why there was an error when the class
was in the com.mycompany.app.cactus package.

- Sean
Previous Topic:Creating ASTParser
Next Topic:Should the debug perspective be attached to the current window?
Goto Forum:
  


Current Time: Fri May 09 09:04:18 EDT 2025

Powered by FUDForum. Page generated in 0.03775 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top