Deleting gwt-servlet.jar

286 views
Skip to first unread message

Ian Bambury

unread,
Apr 3, 2010, 1:33:04 PM4/3/10
to google-we...@googlegroups.com
If you delete the gwt-servlet.jar from the WEB-INF/lib directory because you don't use it, you'll get a warning.

Is there any way (other than ignoring the warning) to stop this behaviour? The reason I'd like to do this is that I want to zip up a project and distribute it, but I could do without the 1.5 megs in an otherwise 4k zip file but I want the project to be clean of errors.

Thanks

Jeff Chimene

unread,
Apr 3, 2010, 1:58:55 PM4/3/10
to google-we...@googlegroups.com
On 04/03/2010 10:33 AM, Ian Bambury wrote:
> If you delete the gwt-servlet.jar from the WEB-INF/lib directory because
> you don't use it, you'll get a warning.

So here's what I just tried:

0. Unfilter .* resources

1. Open the now visible file .settings/com.google.gwt.eclipse.core.prefs

2. Copy and paste the setting "filesCopiedToWebInfLib"

3. Comment out original

4. Set the value to null
Maybe omit this setting entirely? Try it and see

5. Clean the project

6. Filter .* resources

Jeff Chimene

unread,
Apr 3, 2010, 2:00:25 PM4/3/10
to google-we...@googlegroups.com
On 04/03/2010 10:58 AM, Jeff Chimene wrote:
> On 04/03/2010 10:33 AM, Ian Bambury wrote:
>> If you delete the gwt-servlet.jar from the WEB-INF/lib directory because
>> you don't use it, you'll get a warning.

Nevermind. Didn't work.

Ian Bambury

unread,
Apr 3, 2010, 2:24:56 PM4/3/10
to google-we...@googlegroups.com
Thanks for thinking about it.

I could resort to putting a dummy, empty jar of the same name in there, but it would confuse people (me, probably) it it were ever needed later on.

I don't understand why GWT does this. Miguel Méndez said in May last year 

"We'll relax the WAR (war/WEB-INF/**) constraints in a future release.  The objective for this cycle was to get people up and running quickly and not to focus on applications which don't have the WAR structure"

That was when 1.6 came out and nothing has happened yet...

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Jeff Chimene

unread,
Apr 3, 2010, 3:43:01 PM4/3/10
to google-we...@googlegroups.com
On 04/03/2010 11:24 AM, Ian Bambury wrote:
> Thanks for thinking about it.
>
> I could resort to putting a dummy, empty jar of the same name in there,
> but it would confuse people (me, probably) it it were ever needed later on.

While failing to prevent the warning message, the technique did
constrain the superfluous copy;

euzuro

unread,
Apr 4, 2010, 11:56:42 AM4/4/10
to Google Web Toolkit
Not sure if this helps or not, but in the latest version of the gwt
eclipse plugin,
if you right click on your project and select Properties, then Google-
> Web Application,
there are some WAR-related configurations.

(it helped us to get the plugin to stop trying to copy-in the gwt-
servlet.jar file from the sdk directory)

Ian Bambury

unread,
Apr 4, 2010, 2:23:35 PM4/4/10
to google-we...@googlegroups.com
It stops the message if you have something you don't want copied in (i.e. if it's in the classpath but you don't want it in the /lib/ unfortunately I can't seem to get it to work on the servlet jar when it is just a GWT 'requirement'.

It's like a petulant child who wants something on his plate just because everyone else has it, even though he doesn't like it and won't eat it :-)

Thanks for the idea, though, I'm willing to try anything...

Paul

unread,
Apr 4, 2010, 7:36:53 PM4/4/10
to Google Web Toolkit
I struggled with all of the warnings from the GWT eclipse plug in as I
was using a different project structure, eventually I stopped using
the plugin.

The GWT tools (except for the plugin) are very flexible. So I
recreated my project in eclipse as a java project rather than a GWT
project and then created a java launch to run the application in dev
mode (mainclass =com.google.gwt.dev.DevMode) and another launch to run
the gwt compiler (mainclass=com.google.gwt.dev.Compiler). The GWT docs
detail all of the required parameters, or run them with no params and
they'll output some helptext. Since making these changes I've had no
problems.

cheers
Paul

Miguel Méndez

unread,
Apr 5, 2010, 8:19:53 AM4/5/10
to google-we...@googlegroups.com
Sorry to hear that Paul.  

@All: In GPE 1.3 we added a way to configure the severity of the errors and warnings reported by GPE.  If you navigate to Preferences > Errors/Warnings > Project structure and SDKs, you can change the severity level for "SDK JAR missing from WEB-INF/lib" to ignore.  FWIW, it also gives you more control over the WAR directory, etc.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Miguel

Ian Bambury

unread,
Apr 5, 2010, 8:36:17 AM4/5/10
to google-we...@googlegroups.com
Hi Miguel,

So I take that there's no way to do what I need, then.

Ian


2010/4/5 Miguel Méndez <mme...@google.com>

Miguel Méndez

unread,
Apr 5, 2010, 8:45:35 AM4/5/10
to google-we...@googlegroups.com
We don't have a mechanism specifying that you don't need the gwt-servlet.jar specifically.  Could you file a bug for this?

We do have a way to specify that you want the plugin to treat the WAR directory as input only.  It prevents the jars from being copied into WEB-INF/lib and you won't get errors about a missing gwt-servlet.jar.  The J2EE FAQ covers how to enable this feature.  Maybe that can be of some use.

, maybe that would help.  See the J2EE 

The only other think that you can look at is to uncway to suppress the copying of the default SDK WEB-INF/lib files 

Miguel Méndez

unread,
Apr 5, 2010, 8:46:14 AM4/5/10
to google-we...@googlegroups.com
Sorry for the last section, premature send before review.

2010/4/5 Miguel Méndez <mme...@google.com>



--
Miguel

Jeff Chimene

unread,
Apr 5, 2010, 2:52:31 PM4/5/10
to google-we...@googlegroups.com
On 04/05/2010 05:36 AM, Ian Bambury wrote:
> Hi Miguel,
>
> So I take that there's no way to do what I need, then.

Now I'm confused about what you want...

Between the Preferences > Errors/Warnings > Project structure and SDKs
setting and modifying the .settings file, you should a) eliminate the
warning and b) eliminate the superfluous copy.

What am I missing here?

Ian Bambury

unread,
Apr 5, 2010, 4:33:52 PM4/5/10
to google-we...@googlegroups.com
I want to be able to zip up a project without the 1.5 meg servlet jar, have it available for people to download it, for them to be able to unzip it to wherever their workspace is, import it, and not have Eclipse (via the GEP) complain that it can't find a file that it doesn't need in the first place.

I can't see a way to do that and presumably Miguel can't either or he wouldn't have asked me to file a bug report.

That's the problem. If it's me that's misread things and there is a way, then I apologise, but could you please spell it out for me :-)

--

Jeff Chimene

unread,
Apr 5, 2010, 5:54:21 PM4/5/10
to google-we...@googlegroups.com
On 04/05/2010 01:33 PM, Ian Bambury wrote:
> I want to be able to zip up a project without the 1.5 meg servlet jar,

Altering the .settings/ file accomplishes this, yes? Alter the file;
clean; compile; no unwanted jar.

> have it available for people to download it, for them to be able to
> unzip it to wherever their workspace is, import it, and not have Eclipse
> (via the GEP) complain that it can't find a file that it doesn't need in
> the first place.

This seems to be the sticking point: the user would have to modify their
GEP settings to disable the warning.

> I can't see a way to do that and presumably Miguel can't either or he
> wouldn't have asked me to file a bug report.
>
> That's the problem. If it's me that's misread things and there is a way,
> then I apologise, but could you please spell it out for me :-)

I don't think you're missing anything. From this post, I now see the
problem you're trying to solve.

> Ian
>
> http://examples.roughian.com
>
>
> On 5 April 2010 19:52, Jeff Chimene <jchi...@gmail.com

Reply all
Reply to author
Forward
0 new messages