Skip to content

Tag: maven

How can I import the Maven shade plugin properly?

I am very frustrated. I’ve spent a long time trying to compile a Maven project into an Uber/Fat jar file using the Maven shade plugin, but I still keep getting “mvn is not recognized as an internal or external command” error in command prompt. Here are the important bits of my pom.xml: I don…

the declared package does not match the expected package

I have imported a maven project from git. As the sources were not seen I add the src directories as sources. Maven compiles correctly. But In Eclipse I have the error. Tthe declared package com.mypackage does not match the expected package src.main.java.com.mypackage I have another error when updating import …

UnknownElementException on Java 17 record class

With excitement I downloaded Java 17 today and got a simple record class However when doing mvn compile, it throws me error Fatal error compiling: javax.lang.model.element.UnknownElementException: Unknown element: “com.xxx.TestCls” I double checked java -version and it looks right to me: Would any…