microsoft / microsoft/kiota-java
#1786 breaks compilation with Eclipse compiler
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 38
- Forks
- 34
- Ø Merge
- 15 Std. 9 Min.
- Gemergte PRs (30 T.)
- 20
Beschreibung
https://github.com/microsoft/kiota-java/pull/1786 causes compilation of projects with Eclipse compiler to fail:
```
[ERROR] Failed to execute goal dev.aspectj:aspectj-maven-plugin:1.14:test-compile (default) on project kiota-xml: AJC compiler errors:
[ERROR] error at
[ERROR] import javax.xml.stream.XMLInputFactory;
[ERROR] ^^^^^^^^^^^^^^^^
[ERROR] /kiota-xml/src/test/java/com/example/kiota/xml/Foobar.java:3:0::0 The package javax.xml.stream is accessible from more than one module: , java.xml
[ERROR] error at
[ERROR] System.out.println(XMLInputFactory.newInstance().getClass().getName());
[ERROR] ^^^^^^^^^^^^^^^
[ERROR] /kiota-xml/src/test/java/com/example/kiota/xml/Foobar.java:9:0::0 XMLInputFactory cannot be resolved
```
It compiles fine with the standard Maven compiler plugin. The error is caused by the addition of `api 'javax.xml.stream:stax-api:1.0-2'`. An exclusion can be used as a workaround.
```java
package com.example.kiota.xml;
import javax.xml.stream.XMLInputFactory;
public class Foobar {
public static void main( String[] args ) {
System.out.println(XMLInputFactory.newInstance().getClass().getName());
}
}
```
```xml
4.0.0
com.example
kiota-xml
1.0-SNAPSHOT
1.9.22.1
21
21
UTF-8
com.microsoft.kiota
microsoft-kiota-authentication-azure
1.8.8
org.aspectj
aspectjrt
${aspectj.version}
dev.aspectj
aspectj-maven-plugin
1.14
21
compile
test-compile
org.aspectj
aspectjrt
${aspectj.version}
org.aspectj
aspectjtools
${aspectj.version}
```
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der Prüfung von Pull Request #1786 und der Abhängigkeitsdeklarationen, durch die javax.xml.stream:stax-api:1.0-2 hinzugefügt wurde. Reproduzieren Sie den Fehler mit dem test-compile-Ziel von dev.aspectj:aspectj-maven-plugin und vergleichen Sie ihn mit dem standardmäßigen Maven-Compiler. Als abgeschlossen gilt die Aufgabe, wenn Projekte, die den Eclipse-Compiler verwenden, ohne den Fehler eines doppelten java.xml-Moduls kompiliert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- build-system
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100