microsoft / microsoft/kiota-java

#1786 breaks compilation with Eclipse compiler

未关闭
#2,000 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Java
星标
38
派生
34
平均合并
15 小时 9 分钟
30 天内合并 PR
20

描述

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}




```

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查 pull request #1786,以及添加了 javax.xml.stream:stax-api:1.0-2 的依赖声明。使用 dev.aspectj:aspectj-maven-plugin 的 test-compile 目标重现失败,并将其与标准 Maven 编译器进行比较。当使用 Eclipse 编译器的项目能够在不出现重复 java.xml 模块错误的情况下完成编译时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
build-system
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。