Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How to disable warnings for test modules not exported
How to disable warnings for test modules not exported [message #195299] Mon, 02 July 2007 04:12 Go to next message
Eclipse User
Originally posted by: ptomli.gmail.com

I've got a Dynamic Web Project, which includes 2 source folders,
"src" and "test". The "test" folder contains the junit tests and
settingsfor test databases etc.

I've worked out how to not export the test classes to the server
(usingseperate output folders and some changes to the ordering) but
haven't yet managed to determine how to get WTP to know/ignore
warningsabout the test classes not being exported to the server.

In the Problems view, I'm seeing "Classpath entry ... will not be
exported or published. ...". The two cases of this are for JUnit, and
the User Library I have defined for my test class dependencies
(gienah, hsqldb, ..).
Is there a way to tell Eclipse that these class path entries are
notrequired at runtime?

Cheers,

Paul


--

I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
Re: How to disable warnings for test modules not exported [message #195369 is a reply to message #195299] Mon, 02 July 2007 10:38 Go to previous messageGo to next message
Rob Frost is currently offline Rob Frost
Messages: 64
Registered: July 2009
Member
Hi Paul,

The customization you are looking for does not currently exist: what you
want is a way of flexibly disabling/enabling generation of that warning (for
a given project or the whole workspace). Support for such customization is
covered by the following bugzilla enhancement:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185112

For now, you can safely ignore the warning (and it is only added as a
warning since the classes may not be needed at runtime). Note: you could
completely turn off the "Classpath Dependency Validator" to eliminate the
warning but that would not be recommended because important error conditions
would then be missed.

The WTP logic currently allows you to register "ignorable" classpath
containers via the extension point: org.eclipse.jst.j2ee.classpathdep

E.g.

<extension point="org.eclipse.jst.j2ee.classpathdep">
<filteredClasspathContainer
containerID="org.eclipse.jst.j2ee.internal.module.container " />
<filteredClasspathContainer
containerID="org.eclipse.jst.j2ee.internal.web.container" />
<filteredClasspathContainer
containerID="org.eclipse.jst.server.core.container" />
<filteredClasspathContainer
containerID="org.eclipse.jdt.launching.JRE_CONTAINER" />
</extension>

Unfortunately, such customization is only feasible for adopters and would
not in fact help your use case: this mechanism has the effect of suppressing
the warning but does so because all entries of that cp container type are
ignored as potential candidates for export/publish (this is not something
that can be done for the User Library cp container).

-Rob

"Paul Tomlin" <ptomli@gmail.com> wrote in message
news:nemoMon070207100427@news.eclipse.org...
> I've got a Dynamic Web Project, which includes 2 source folders,
> "src" and "test". The "test" folder contains the junit tests and
> settingsfor test databases etc.
>
> I've worked out how to not export the test classes to the server
> (usingseperate output folders and some changes to the ordering) but
> haven't yet managed to determine how to get WTP to know/ignore
> warningsabout the test classes not being exported to the server.
>
> In the Problems view, I'm seeing "Classpath entry ... will not be
> exported or published. ...". The two cases of this are for JUnit, and
> the User Library I have defined for my test class dependencies
> (gienah, hsqldb, ..).
> Is there a way to tell Eclipse that these class path entries are
> notrequired at runtime?
>
> Cheers,
>
> Paul
>
> --
> I'm trying a new usenet client for Mac, Nemo OS X.
> You can download it at http://www.malcom-mac.com/nemo
>
Re: How to disable warnings for test modules not exported [message #195378 is a reply to message #195369] Mon, 02 July 2007 10:43 Go to previous message
Eclipse User
Originally posted by: ptomli.gmail.com

In article <f6b2m4$27m$1@build.eclipse.org> "Rob
Frost"<rfrost@bea.com> wrote:

> Hi Paul,
>
> The customization you are looking for does not currently exist:
> what you want is a way of flexibly disabling/enabling generation of
> that warning (for a given project or the whole workspace). Support
> for such customization is covered by the following bugzilla
> enhancement: https://bugs.eclipse.org/bugs/show_bug.cgi?id=185112
>

Thanks, that ticket looks just what I'm after. At least I know it's
not something obvious I'm missing.


--

I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
Previous Topic:post 2.0 era
Next Topic:Update for missing features from previous versions
Goto Forum:
  


Current Time: Mon Jul 28 16:38:02 EDT 2014

Powered by FUDForum. Page generated in 0.05858 seconds