Could not determine source for class

605 views
Skip to first unread message

Soren Mathiasen

unread,
Oct 5, 2011, 2:28:16 AM10/5/11
to simple-build-tool
Hi,

When building via sbt 0.11 i get some warning saying
[warn] Could not determine source for class
javax.servlet.ServletConfig

The problem is that the SerlvetConfig class files ends up in the
assembled jar file. When using this in a web container it gives an
error.

I'm using unmanagedSourceDirectories in Compile to add extra source
directories. And unmanagedJars in Compile to specify external jar
dependencies.

How do i exclude the ServletConfig and other javax.* from the jar
file ?

Dale Wijnand

unread,
Oct 7, 2011, 1:15:56 PM10/7/11
to simple-b...@googlegroups.com
Hi Soren,
I think what you want to do is declare the dependency that is giving you problems in the provided scope. Check the ivy and sbt documentation about depedency scopes (called configurations in ivy).

Dale

Mark Harrah

unread,
Oct 9, 2011, 8:54:18 PM10/9/11
to simple-b...@googlegroups.com
On Tue, 4 Oct 2011 23:28:16 -0700 (PDT)
Soren Mathiasen <so...@schantz.com> wrote:

> Hi,
>
> When building via sbt 0.11 i get some warning saying
> [warn] Could not determine source for class
> javax.servlet.ServletConfig

This should only happen when sbt can't match the source file for a class generated by javac. As this is unlikely to be a source file in your project, I would guess there is something in your build definition causing this and would need to see it or at least settings related to configuring source files, resources, classes, and output directories.

-Mark

Reply all
Reply to author
Forward
0 new messages