gwt-plugins / gwt-plugins/gwt-eclipse-plugin

Packages accessible from more than one module due to GWT SDK from Eclipse plugin

Đang mở
#504 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
117
Fork
49
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I have an error on some package since I try to move from java 8 to java 17.

In fact, i compile good through my gradle commands (so I build correctly the project)... But i still have many errors on Eclipse.
I have some errors like:
The package javax.xml.parsers is accessible from more than one module: , java.xml

The main Reason of that this is because on gwt-dev.jar that is included in the GWT SDK from the eclipse plugin. It contains it.

Of course the GWT SDK is in the classpath for the project... and then, I have this error... (as it goes through a conflict)

I am pretty sure somebody ran into this at some point, but i didn't have any clues at the moment.

The easiest solution would be to trick my "gwt-dev.jar" to remove the unnecessary classes but that's not a suitable way to do in the long run...
(like doing:
_zip -d gwt-dev.jar "org/w3c/" "org/xml/" "javax/xml/" "netscape/javascript/"_
)

If it is possible to exclude during runTime the "xerces" group from the gwt-dev.jar, that would be great, but as it is inside the "SDK" I cannot manipulate as I would like to. (it is not installed through a "normal" Gradle implmentation).

I have some gradle command to "install the SDK" automatically through gradle task (I use "org.wisepersist.gwt" version "1.1.19"):

```
eclipse {
project {
natures 'com.gwtplugins.gwt.eclipse.core.gwtNature'
buildCommand 'com.gwtplugins.gwt.eclipse.core.gwtProjectValidator'
buildCommand 'com.gwtplugins.gdt.eclipse.core.webAppProjectValidator'
}
classpath {
containers 'com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER'
}
synchronizationTasks gwtpluginsGdtCorePrefs
}
task gwtpluginsGdtCorePrefs() {
doLast {
// Create GWT eclipse settings
delete("${project.projectDir}/.settings/com.gwtplugins.gdt.eclipse.core.prefs")
File corePrefs = file("${project.projectDir}/.settings/com.gwtplugins.gdt.eclipse.core.prefs")
corePrefs.getParentFile().mkdirs()
if (corePrefs.exists()) {
logger.warn("GWT core preferences already exist and will not be overridden. Use task 'cleanEclipse' first.")
} else {
corePrefs.write('eclipse.preferences.version=1\n')
corePrefs.append('jarsExcludedFromWebInfLib=\n')
corePrefs.append('warSrcDir=\n')
corePrefs.append('warSrcDirIsOutput=true\n')
}
}
}
```

Here is the symptom of the issue:
![image](https://github.com/user-attachments/assets/522ee58c-b8a9-4351-8ee1-17cab53f4db7)

If I ending up removing the SDK. Of course, I don't have the compile issue BUT I have the error :
The project 'webapp' does not have any GWT SDKs on its build path.
![image](https://github.com/user-attachments/assets/05c897c1-71a5-4271-950d-5d4b4268a923)

I saw it could be related to: https://github.com/gwt-plugins/gwt-eclipse-plugin/issues/414 but i am not sure.

I try to summarize the best what I put on: https://github.com/gwtproject/gwt/issues/10051 initially.

But indeed , this is a Eclipse Plugin issue and not a GWT issue per say.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện thiết lập Eclipse với Java 17 và GWT SDK, đồng thời kiểm tra gwt-dev.jar cùng với .settings/com.gwtplugins.gdt.eclipse.core.prefs. So sánh classpath của Eclipse với thiết lập Gradle và các issue liên quan được liên kết trong báo cáo. Hoàn tất khi SDK vẫn được cấu hình và không còn xuất hiện lỗi package mô-đun trùng lặp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
developer-experience, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.