#1786 breaks compilation with Eclipse compiler
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
Research direction
Start by reviewing pull request #1786 and the dependency declarations that added javax.xml.stream:stax-api:1.0-2. Reproduce the failure with the dev.aspectj:aspectj-maven-plugin test-compile goal and compare it with the standard Maven compiler. Done means projects using the Eclipse compiler compile without the duplicate java.xml module error.
Written by the indexing model from the issue text.
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: <unnamed>, 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.
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 version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>kiota-xml</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<aspectj.version>1.9.22.1</aspectj.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-authentication-azure</artifactId>
<version>1.8.8</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>dev.aspectj</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.14</version>
<configuration>
<release>21</release>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
- Dominant language
- Java
- Stars
- 38
- Forks
- 34
- Avg merge
- 14h 29m
- Merged PRs (30d)
- 22
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/kiota-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/kiota-java#2127 ·
-
upgrade to okhttp 5 Openenhancement help wanted
Difficulty 3/5 1-2 days Newbie friendliness 48/100
microsoft/kiota-java#1984 · 10 comments · 2 reactions ·
-
Needs: Attention :wave: type:question
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoft/kiota-java#1928 · 6 comments ·
-
enhancement help wanted type:enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
microsoft/kiota-java#1685 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/kiota-java#1612 ·
All issues in microsoft/kiota-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100