diff --git a/maven-plugins/helidon-archetype-maven-plugin/src/main/java/io/helidon/build/maven/archetype/JarMojo.java b/maven-plugins/helidon-archetype-maven-plugin/src/main/java/io/helidon/build/maven/archetype/JarMojo.java index b8840ab18..d8975c50a 100644 --- a/maven-plugins/helidon-archetype-maven-plugin/src/main/java/io/helidon/build/maven/archetype/JarMojo.java +++ b/maven-plugins/helidon-archetype-maven-plugin/src/main/java/io/helidon/build/maven/archetype/JarMojo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023 Oracle and/or its affiliates. + * Copyright (c) 2020, 2025 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -242,7 +242,6 @@ private void processEntryPoint(Path outputDir) throws MojoExecutionException, IO throw new MojoExecutionException("Cannot generate custom entry-point, main.xml already exists"); } Converter.convert(entrypoint, main); - validateSchema(outputDir, "main.xml").ifPresent(getLog()::error); } } @@ -250,6 +249,7 @@ private void validateEntryPoint(Path outputDir) throws MojoExecutionException { System.setProperty(MAVEN_URL_REPO_PROPERTY, session.getLocalRepository().getBasedir()); Path script = VirtualFileSystem.create(outputDir).getPath("/").resolve("main.xml"); List errors = Validator.validateArchetype(script); + validateSchema(outputDir, "main.xml").ifPresent(errors::add); if (!errors.isEmpty()) { errors.forEach(getLog()::error); throw new MojoExecutionException("Validation failed");