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

Build failure on Java11+ #1575

Open
jricher opened this issue Jun 9, 2022 · 2 comments
Open

Build failure on Java11+ #1575

jricher opened this issue Jun 9, 2022 · 2 comments

Comments

@jricher
Copy link
Member

jricher commented Jun 9, 2022

When trying to build on Java11+, the following error occurs when building the openid-connect-server-webapp module:

[ERROR] Failed to execute goal ro.isdc.wro4j:wro4j-maven-plugin:1.10.1:run (default) on project openid-connect-server-webapp: Execution default of goal ro.isdc.wro4j:wro4j-maven-plugin:1.10.1:run failed: Plugin ro.isdc.wro4j:wro4j-maven-plugin:1.10.1 or one of its dependencies could not be resolved: Failed to collect dependencies for ro.isdc.wro4j:wro4j-maven-plugin:jar:1.10.1 (): Could not resolve version conflict among [ro.isdc.wro4j:wro4j-maven-plugin:jar:1.10.1 -> ro.isdc.wro4j:wro4j-extensions:jar:1.10.1 -> org.webjars.npm:jshint:jar:2.11.0 -> org.webjars.npm:minimatch:jar:[3.0.2,3.1), ro.isdc.wro4j:wro4j-maven-plugin:jar:1.10.1 -> ro.isdc.wro4j:wro4j-extensions:jar:1.10.1 -> org.webjars.npm:jshint:jar:2.11.0 -> org.webjars.npm:cli:jar:[1.0.0,1.1) -> org.webjars.npm:glob:jar:[7.1.1,8) -> org.webjars.npm:minimatch:jar:[3.1.1,4)] -> [Help 1]
@chirontt
Copy link

Similar issue has been reported in the wro4j project: wro4j/wro4j#1129

The above issue also mentioned a fix by dropping the wro4j version back to 1.9.0. I've tried this older wro4j version with this project and the build now works fine for me.

@chirontt
Copy link

Alternatively, instead of reverting the wro4j version back to 1.9.0, it can keep the latest version (1.10.1) but with an exclusion on the wro4j-maven-plugin's dependencies to exclude the conflicting org.webjars.npm:minimatch, i.e.

				<plugin>
					<groupId>ro.isdc.wro4j</groupId>
					<artifactId>wro4j-maven-plugin</artifactId>
					<version>1.10.1</version>
					<executions>
						<execution>
							<phase>compile</phase>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>ro.isdc.wro4j</groupId>
							<artifactId>wro4j-extensions</artifactId>
							<version>1.10.1</version>
							<exclusions>
								<exclusion>
									<groupId>org.webjars.npm</groupId>
									<artifactId>minimatch</artifactId>
								</exclusion>
							</exclusions>
						</dependency>
					</dependencies>
				</plugin>

With the above change, openid-connect-server-webapp now compiles fine with JDK11, and no problem in running the resulting webapp with mvn jetty:run-war command.

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