Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use roaster in modularized project ? #315

Open
Rizen59 opened this issue Mar 7, 2024 · 1 comment
Open

How to use roaster in modularized project ? #315

Rizen59 opened this issue Mar 7, 2024 · 1 comment

Comments

@Rizen59
Copy link

Rizen59 commented Mar 7, 2024

Hi, I'm trying to use roaster in a modularized project

<properties>
  <version.roaster>2.29.0.Final</version.roaster>
</properties>

<dependency>
  <groupId>org.jboss.forge.roaster</groupId>
  <artifactId>roaster-api</artifactId>
  <version>${version.roaster}</version>
</dependency>
<dependency>
  <groupId>org.jboss.forge.roaster</groupId>
  <artifactId>roaster-jdt</artifactId>
  <version>${version.roaster}</version>
  <scope>runtime</scope>
</dependency>

If roaster-jdt is used in scope runtime it cannot be added in module-info.java
In scope compile, add in module-info.java

requires roaster.api;
requires roaster.jdt;

The result will be:

[WARNING] Can't extract module name from roaster-jdt-2.29.0.Final.jar: Provider class org.jboss.forge.roaster._shade.org.eclipse.osgi.launch.EquinoxFactory not in JAR file roaster-jdt-2.29.0.Final.jar
[WARNING] ****************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [roaster-api-2.29.0.Final.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] ****************************************************************************************************************************************************

Did I missed something?
Maybe the project could be modularized for a futur version.

@gastaldi
Copy link
Member

gastaldi commented Mar 7, 2024

Interested in providing a PR?

Maybe we can use the moditect maven plugin to generate the module-info.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants