microsoft / microsoft/kiota-java
#1786 breaks compilation with Eclipse compiler
- Langage dominant
- Java
- Étoiles
- 38
- Forks
- 34
- Merge moyen
- 15 h 9 min
- PR mergées (30 j)
- 20
Description
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}
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par examiner la pull request #1786 et les déclarations de dépendances qui ont ajouté javax.xml.stream:stax-api:1.0-2. Reproduisez l’échec avec l’objectif test-compile de dev.aspectj:aspectj-maven-plugin et comparez-le avec le compilateur Maven standard. Le travail est considéré comme terminé lorsque les projets utilisant le compilateur Eclipse se compilent sans l’erreur de module java.xml en double.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- build-system
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100