Skip to content
Advertisement

Tag: maven

Problem running tests with enabled preview features in surefire and failsafe

I’m trying to migrate a project to Java 12, with –enable-preview. I added –enable-preview in compiler settings: And also added it in argLine for surefire and failsafe: And do a mvn clean verify results in: I also tried adding argLine directly to surefire/failsafe configuration, but the result is same. What am I missing here? I this a bug in surefire/failsafe?

SpringBoot no main manifest attribute (maven)

When running my jar file: java -jar target/places-1.0-SNAPSHOT.jar I’m getting the next error : no main manifest attribute, in target/places-1.0-SNAPSHOT.jar The pom.xml contains the spring-boot-maven-plugin: I also tried to create a MANIFEST.MF file and specifying the class, but it didnt help. In addition, I also tried: Main class: Any idea what else can I try? Answer Try adding repackage goal

Javac – plugin not found

I am trying to make my own Javac plugin but things aren’t going so well already 🙁 I am following this tutorial: https://www.baeldung.com/java-build-compiler-plugin and when I want to test the first …

Can’t run testng.xml in Cucumber-Maven(TestNG)

In eclipse IDE, I have created a basic cucumber framework by using Maven project. I have added all the dependencies required in pom.xml.For TestNG plugin added below dependencies. But ‘TestNG Suite’ option was not coming in preferences,so installed TestNG through Help->Install New Software. Framework is having feature file(scenario is described),stepdefinitions(code/logic given) and runner class(To map feature with stepdefinitions file and

How to @Autowired BuildProperties in test?

I am using this annotation to display the build version in my app: With this maven plugin: It works well in the app, but prevent my test to run. Here is the test class config: I add the file src/test/resources/META-INF/build-info.properties But the build still have errors: How can I make this works during test ? Solution: add the annotation @SpringBootTest

Maven archetype: org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException

On Ubuntu Server 18.04, I created a skeleton Maven project as follows, and am just trying to get it to compile. Running mvn compile is fine. But running mvn test fails with error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project my-app: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException -> [Help 1] Two questions: What could be causing this?

Is there a maven repository to quickstart Java 11 app

There is a quickstart maven archetype for Java 7, as I can see here: https://maven.apache.org/archetypes/maven-archetype-quickstart/ The problem with this is when I fire this command: Enter project directory and fire this command: I get this error: Please note that there is some problem with my JDK install, as update-alternatives tells me that I am running JDK 11: But, when I

Advertisement