You may want to try out using super-source instead.
Move your org/springframework into ch/zh/registerjp/super/ and add 
<super-source path="super"/> in ZHStRegisterJPWeb.gwt.xml (and remove the 
GwtSpring.gwt.xml and the related <inherits/>)

* <project_root>
|
+-* src
| +-* main
| | +-* java
| | | +-* ch
| | | | +-* zh
| | | | | +-* registerjp
| | | | | | +-* client
| | | | | | | +-- ...
| | | | | | +-* shared
| | | | | | | +-* security
| | | | | | | | +-- ZHStRegisterJPUser.java
| | | | | | | | +-- ...
| | | | | | | +-- ...
| | | | | | +-* server
| | | | | | | +-- ...
| | ...
| | +-* resource
| | | +-* ch
| | | | +-* zh
| | | | | +-* registerjp
| | | | | | +-- ZHStRegisterJPWeb.gwt.xml   << our application's gwt-file
| | | | | +-* super
| | | | | | +-* org    << copies of the referenced Spring source files 
below this folder
| | | | | | | +-* springframework
| | | | | | | | +-* security
| | | | | | | | | +-* core
| | | | | | | | | | +-- GrantedAuthority.java
| | | | | | | | | | +-- CredentialsContainer.java
| | | | | | | | | | +-- ...
| | | | | | | | | | +-* userdetails
| | | | | | | | | | | +-- User.java
| | | | | | | | | | | +-- UserDetails.java
[Note: '*' are directories]

On Tuesday, July 26, 2022 at 2:26:17 PM UTC+2 mmo wrote:

> Originally I had indeed placed all the code (also the "drop-ins" for 
> Spring) under src/main/java but I then got the very same errors as 
> described in my previous email. 
> And also now, after I have moved them back into the java sub-tree I keep 
> getting the same error. So, there must be something else still wrong 
> here... ?!?
>
> I provide an updated view of how my java source and resource tree 
> currently looks like.
>
>
> * <project_root>
> |
> +-* src
> | +-* main
> | | +-* java
> | | | +-* ch
> | | | | +-* zh
> | | | | | +-* registerjp
> | | | | | | +-* client
> | | | | | | | +-- ...
> | | | | | | +-* shared
> | | | | | | | +-* security
> | | | | | | | | +-- ZHStRegisterJPUser.java
> | | | | | | | | +-- ...
> | | | | | | | +-- ...
> | | | | | | +-* server
> | | | | | | | +-- ...
> | | | +-* org    << copies of the referenced Spring source files below 
> this folder
> | | | | +-* springframework
> | | | | | +-* security
>
> | | | | | | +-* core
> | | | | | | | +-- GrantedAuthority.java
> | | | | | | | +-- CredentialsContainer.java
> | | | | | | | +-- ...
> | | | | | | | +-* userdetails
> | | | | | | | | +-- User.java
> | | | | | | | | +-- UserDetails.java
> | | ...
> | | +-* resource
> | | | +-* ch
> | | | | +-* zh
> | | | | | +-* registerjp
> | | | | | | +-- ZHStRegisterJPWeb.gwt.xml   << our application's gwt-file
> | | | | | ...
> | | | |
> | | | +-* org
> | | | | +-* springframework
> | | | | | +-- GwtSpring.gwt.xml   << the added Spring gwt-file
> | | | ...
>
> [Note: '*' are directories]
>
> On Tuesday, July 26, 2022 at 11:42:56 AM UTC+2 [email protected] wrote:
>
>> It looks like you put the source in the resources tree rather than in the 
>> source tree. If you fix that then it may help
>>
>> On Tue, Jul 26, 2022 at 6:21 PM mmo <[email protected]> wrote:
>>
>>> In the code that I inherited my predecessors had decided to use a couple 
>>> of Spring classes even in GWT client code.
>>> While I am not exactly enthused by this decision the referenced classes 
>>> are - at least from my point of view - OK to use in GWT client code, since 
>>> they are mostly interfaces or simple classes that don't pull too much of 
>>> "Spring" into the client. So my aim is to leave the code as such unchanged 
>>> as much as possible (trying to follow the "never change running 
>>> code"-principle...).
>>>
>>> What I don't like, however, is that so far they had simply ignored the 
>>> resulting GWT compile errors. I am thus now trying to correct the GWT 
>>> settings such that this at least compiles without errors (i.e. that I can 
>>> use the "strict" compiler setting).
>>>
>>> The initial error was that the Spring sources for GrantedAuthority, 
>>> CredentialsContainer and a few more classes could not be found during GWT 
>>> compilation.
>>> When I then added the Spring sources jar to the dependencies the GWT 
>>> compiler ran havock and apparently tried to compile the ENTIRE Spring 
>>> library. That was definitely NOT what I wanted.
>>> Next I tried to provide ONLY (copies of) those sources that are actually 
>>> referenced in our GWT code, i.e. I added copies of those spring source 
>>> files to our resources folder and try to direct the GWT compiler to use 
>>> only those. Besides the mentioned java files I thus also added a 
>>> GwtSpring.gwt.xml file which I reference from our application's 
>>> ZHStRegisterJPWeb.gwt.xml like so:
>>>
>>>
>>> * <project_root>
>>> |
>>> +-* src
>>> | +-* main
>>> | | +-* java
>>> | | | +-* ch
>>> | | | | +-* zh
>>> | | | | | +-* registerjp
>>> | | | | | | +-* client
>>> | | | | | | | +-- ...
>>> | | | | | | +-* shared
>>> | | | | | | | +-* security
>>> | | | | | | | | +-- ZHStRegisterJPUser.java
>>> | | | | | | | | +-- ...
>>> | | | | | | | +-- ...
>>> | | | | | | +-* server
>>> | | | | | | | +-- ...
>>> | | |
>>> | | +-* resource
>>> | | | +-* ch
>>> | | | | +-* zh
>>> | | | | | +-* registerjp
>>> | | | | | | +-- ZHStRegisterJPWeb.gwt.xml   << our application's gwt-file
>>> | | | | | ...
>>> | | | |
>>> | | | +-* org
>>> | | | | +-* springframework
>>> | | | | | +-- GwtSpring.gwt.xml   << the added Spring gwt-file
>>> | | | | | +-* security   << copies of the referenced Spring source files 
>>> below this folder
>>> | | | | | | +-* core
>>> | | | | | | | +-- GrantedAuthority.java
>>> | | | | | | | +-- CredentialsContainer.java
>>> | | | | | | | +-- ...
>>> | | | | | | | +-* userdetails
>>> | | | | | | | | +-- User.java
>>> | | | | | | | | +-- UserDetails.java
>>> | | | ...
>>>
>>> [Note: '*' are directories]
>>>
>>>
>>> The ZHStRegisterJPWeb.gwt.xml reads:
>>> ---
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <module rename-to='ZHStRegisterJPWeb'>
>>>     <!-- Inherit the core Web Toolkit stuff. -->
>>>     <inherits name='com.google.gwt.user.User' />
>>>
>>>     <!-- used in ZHStRegisterJPUser and ZHStRegisterJPAuthority: -->
>>>     <inherits name="org.springframework.GwtSpring" />
>>>     
>>>     ... further details omitted here ...
>>> ---
>>>
>>>
>>> The GwtSpring.gwt.xml reads:
>>> ---
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <module>
>>>     <source path="security.core">
>>>         <include name="GrantedAuthority.java" />
>>>         <include name="CredentialsContainer.java" />
>>>     </source>
>>>     <source path="security.core.userdetails">
>>>         <include name="User.java" />
>>>         <include name="UserDetails.java" />
>>>     </source>
>>>     
>>>     ... further details omitted here ...
>>> </module>
>>> ---
>>>
>>> However, the GWT compiler STILL complains that it can not locate the 
>>> sources of GrantedAuthority and other Spring classes:
>>> ...
>>> [INFO]    Tracing compile failure path for type 
>>> 'ch.zh.ksta.zhstregisterjp.shared.security.ZHStRegisterJPUser'
>>> [INFO]       [ERROR] Errors in 
>>> 'ch/zh/ksta/zhstregisterjp/shared/security/ZHStRegisterJPUser.java'
>>> [INFO]          [ERROR] Line 40: No source code is available for type 
>>> org.springframework.security.core.userdetails.User; did you forget to 
>>> inherit a required module?
>>> [INFO]          [ERROR] Line 94: No source code is available for type 
>>> org.springframework.security.core.GrantedAuthority; did you forget to 
>>> inherit a required module?
>>> ...
>>>
>>> Any idea why it doesn't find these files even though I now provide them 
>>> explicitly?  What am I missing here?  
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "GWT Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/google-web-toolkit/cffab879-e6ac-4aac-9fe1-cabcaac72d0an%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/google-web-toolkit/cffab879-e6ac-4aac-9fe1-cabcaac72d0an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> -- 
>> Cheers,
>>
>> Peter Donald
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/49f8c8b0-4841-4dda-95ea-96eea5c2ea41n%40googlegroups.com.

Reply via email to