Quarkus LinkageError: loader constraint violation in interface itable initialization when running super-heroes workshop - quarkus

I´m new to Quarkus so I was starting with the Quarkus super-hero workshop available here yet I´ve found a problem that seems to be already reported and solved in issue 23660 when running in dev mode:
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization for class io.agroal.pool.util.XAConnectionAdaptor: when selecting method 'javax.transaction.xa.XAResource javax.sql.XAConnection.getXAResource()' the class loader 'platform' for super interface javax.sql.XAConnection, and the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader #398c8a2 of the selected method's class, io.agroal.pool.util.XAConnectionAdaptor have different Class objects for the type javax.transaction.xa.XAResource used in the signature (javax.sql.XAConnection is in module java.sql of loader 'platform'; io.agroal.pool.util.XAConnectionAdaptor is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader #398c8a2, parent loader 'app')
at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:226)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:535)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:516)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:75)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
... 1 more
Yet I´m still getting this problem running tests while starting the aplication in dev mode using the maven command ./mvnw quarkus:dev . Running standalone tests also with maven ./mvnw test all tests are passing without any problem.
Once I´ve notice that this problem was reported before to be a dependency concurrency problem I´m also providing the pom of rest-villains module:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>io.quarkus.workshop.super-heroes</groupId>
<artifactId>rest-villains</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.10.1</compiler-plugin.version>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>2.16.1.Final</quarkus.platform.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-panache</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<properties>
<skipITs>false</skipITs>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
How to Reproduce?
Run the workshop, at least, until this step.
Quarkus version
2.16.1.Final
Environment
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)
Java version: 17.0.5, vendor: Oracle Corporation
Default locale: pt_PT
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
I cannot find any more information about this problem, so if someone hit a similar situation I would be very grateful for any aditional information to overcome the described problem.
Thank you
Solution Update
For some reason, I had a (not needed) depedency to javaee-api in my rest-villains module and that was the cause of the described problem.
After removing the dependency from rest-villains POM, the described problem was gone.
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
Big thanks to Clement

Related

Unrecognized configuration key was provided; it will be ignored; verify that the dependency extension for this configuration

I am using STS IDE and developed a quarkus project following below example
https://quarkus.io/guides/rest-client
When I tried building the code using
compile quarkus:dev -DSkipTests=true command, I observed below warnings saying its unable to recognize quarkus properties, but application is started
Console Log:
2022-01-07 18:09:44,890 WARN [io.qua.config] (Quarkus Main Thread) Unrecognized configuration key "quarkus.rest-client."com.scania.siddhiapi.services.SiddhiService".url" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2022-01-07 18:09:44,890 WARN [io.qua.config] (Quarkus Main Thread) Unrecognized configuration key "quarkus.http.port" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Application.properties file:
quarkus.http.port=8085
quarkus.rest-client."com.scania.siddhiapi.services.SiddhiService".url=
logging.level.= INFO
org.jboss.resteasy.jaxrs.client.proxy.host=
org.jboss.resteasy.jaxrs.client.proxy.port=8080
org.jboss.resteasy.jaxrs.client.proxy.scheme=http
pom.xml:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.scania.siddhiapi</groupId>
<artifactId>siddhiapi_quarkus</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>2.3.1.Final</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-amazon-lambda</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-spring-di</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<parameters>${maven.compiler.parameters}</parameters>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
If someone has experienced anything similar, please help me with the cause I am unable to identify it.
The version of Quarkus you are using does not support that configuration.
You need to use 2.5.0.Final or higher
Referring to documentation of Quarkus and dependencies. Please add below dependency in your pom.xml. it will help to resolve issue related to quarkus.http.port property.
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jsonb</artifactId>
</dependency>

Spring boot 2.3.5 migration problems - only in my local environment

We migrated from the 2.3.4 to 2.3.5 spring boot version. Everything works fine except when I run the project on my own machine. I could run the project with the 2.3.4 version but it couldn't resolve beans dependences with the 2.3.5 version. If I run my own project in another environment it works fine.
Local configuration:
Java SE 11.0.10
Apache Maven 3.8.1
mac os x", version: "10.15.7", arch: "x86_64", family: "mac"
Any idea what's going on?
I reinstalled all.
Error: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘XXXXX’ defined in file [XXXX.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘XX’ defined in class path resource.
The pom file is the same in each case.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>XXXX</artifactId>
<name>XXXX</name>
<version>1.0-SNAPSHOT</version>
<groupId>XXXXX</groupId>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.5.RELEASE</version>
</parent>
<properties>
<java.version>11</java.version>
<spring-boot.version>2.3.5.RELEASE</spring-boot.version>
<maven-pmd-plugin.version>3.13.0</maven-pmd-plugin.version>
<maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
<io.springfox.version>2.9.2</io.springfox.version>
<jacoco-maven.version>0.8.5</jacoco-maven.version>
<swagger-annotations.version>2.1.2</swagger-annotations.version>
<springdoc-openapi-ui.version>1.4.3</springdoc-openapi-ui.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- OPENAPI 3.0 libs -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc-openapi-ui.version}</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations.version}</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<executions>
<execution>
<id>validate</id>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
<executions>
<execution>
<id>validate</id>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-property</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>maven-group</id>
<url>https://XXXXX</url>
</repository>
</repositories>
Thanks.
Regards

Maven try to download a <packaing>pom</package> pom as a jar file and cannot find it

my maven pom.xml is quite simple:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.acb</groupId>
<artifactId>adfafa</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<!-- https://mvnrepository.com/artifact/org.pentaho/pentaho-aggdesigner -->
<groupId>org.pentaho</groupId>
<artifactId>pentaho-aggdesigner</artifactId>
<version>5.1.5-jhyde</version>
</dependency>
</dependencies>
</project>
From the pom.xml ,I just want pentaho-aggdesigner which is a parent pom of two modules pentaho-aggdesigner-core.jar and pentaho-aggdesigner-algorithm.jar , my remote repo is :http://repo.spring.io/plugins-release
so , I think ,maven will visit http://repo.spring.io/plugins-release/org/pentaho/pentaho-aggdesigner/5.1.5-jhyde/pentaho-aggdesigner-5.1.5-jhyde.pom to download the parent pom ,then , according to the pom, it will download two sub modules pentaho-aggdesigner-core.jar and pentaho-aggdesigner-algorithm.jar. The content of pentaho-aggdesigner-5.1.5-jhyde.pom is:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-aggdesigner</artifactId>
<packaging>pom</packaging>
<version>5.1.5-jhyde</version>
<name>Pentaho Aggregate Designer</name>
<description>Designs aggregate tables for the Mondrian OLAP engine</description>
<url>http://github.com/pentaho/mondrian</url>
<inceptionYear>2006</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<repository>
<id>conjars</id>
<name>Conjars</name>
<url>http://conjars.org/repo</url>
<layout>default</layout>
</repository>
</distributionManagement>
<issueManagement />
<scm>
<connection>scm:git:git://github.com/julianhyde/pentaho-aggdesigner.git</connection>
<developerConnection>scm:git:git#github.com:julianhyde/pentaho-aggdesigner.git</developerConnection>
<url>http://github.com/julianhyde/pentaho-aggdesigner/tree/master</url>
<tag>pentaho-aggdesigner-5.1.5-jhyde</tag>
</scm>
<modules>
<module>pentaho-aggdesigner-algorithm</module>
<module>pentaho-aggdesigner-core</module>
</modules>
<dependencyManagement>
<!-- Dependency versions for all sub-modules.
Sorted by groupId, artifactId. -->
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-aggdesigner-algorithm</artifactId>
<version>5.1.5-jhyde</version>
</dependency>
<dependency>
<groupId>pentaho</groupId>
<artifactId>mondrian</artifactId>
<version>3.6.9</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-beta-6</version>
</dependency>
<!-- Test dependencies. -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-junit4</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-legacy</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-aggdesigner-algorithm</artifactId>
<version>5.1.5-jhyde</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.17</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho</groupId>
<artifactId>mondrian-data-foodmart-hsqldb</artifactId>
<version>0.2</version>
</dependency>
</dependencies>
</dependencyManagement>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
</links>
</configuration>
</plugin>
</plugins>
</reporting>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>properties</id>
<goals>
<goal>properties</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>build.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- If we don't specify gitexe version, git doesn't
commit during release process. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.9.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
</plugins>
</build>
</project>
you can see , pom indicates clearly that I am not a jar pom but a package pom. But maven still consider it to be a jar pom and tries to download the pentaho-aggdesigner.jar from remote repo, of course , the jar file does not exist and throw this error:
[ERROR] Failed to execute goal on project adfafa: Could not resolve dependencies for project org.acb:adfafa:jar:0.0.1-SNAPSHOT: Could not find artifact org.pentaho:pentaho-aggdesigner:jar:5.1.5-jhyde in springmaven (http://repo.spring.io/plugins-release/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project adfafa:
Could not resolve dependencies for project org.acb:adfafa:jar:0.0.1-SNAPSHOT: Could not find artifact org.pentaho:pentaho-aggdesigner:jar:5.1.5-jhyde in springmaven (http://repo.spring.io/plugins-release/)
I had the same issue with pentaho-aggdesigner:pom:5.1.5-jhyde, this site solved my problem
https://www.programmersought.com/article/76106349302/
Basically, used aliyun as mirror in maven settings.xml. And for this case, do not use repo.spring.io as mirror as it requires login and will have an "Authentication" error.
Nah, maven doesn't work like that. See also How to use POMs as a dependency in Maven?
A parent is just a trick to combine configuration for it's child modules. It doesn't automatically introduce transitive dependencies.
So you need to specify the exact jar dependencies. Probably something like:
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-aggdesigner-algorithm</artifactId>
<version>5.1.5-jhyde</version>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-aggdesigner-core</artifactId>
<version>5.1.5-jhyde</version>
</dependency>
There are pom's that you can use like this, by including type 'pom' in your dependency:
<dependency>
<groupId>xxx.yyy</groupId>
<artifactId>pentaho-all</artifactId>
<type>pom</type>
<version>XXXX</version>
</dependency>
In this case, pentaho-all would be a pom with a list of direct dependencies that you then would import as transitive dependencies. But the aggregator pom you found does not have direct dependencies, only modules and dependency management, so that one won't work.
adding following dependency to pom.xml will help
<!-- https://mvnrepository.com/artifact/org.pentaho/pentaho-aggdesigner-algorithm -->
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-aggdesigner-algorithm</artifactId>
<version>5.1.5-jhyde</version>
<scope>test</scope>
</dependency>
Just download the file from any available repo and store in the proper folder e.g.
~/.m2/repository/org/pentaho/pentaho-aggdesigner-algorithm/5.1.5-jhyde/pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar

In Grails, the command "tomcat:deploy" does not generate the complete war as the command "dev war" does

The command "grails dev war" deploys perfectly in my local Tomcat6 server with a generated war which contains the next folders:
css
images
js
META-INF
plugins
WEB-INF
Unfortunately, I need that the command tomcat:deploy works too (I'm actually using: tomcat:redeploy -DskipTests). But Tomcat gives the next error:
2013-05-23 05:12:53,094 [http-8080-4] ERROR digester.Digester - Parse Fatal Error at line 1 column 1: Final de archivo prematuro.
org.xml.sax.SAXParseException; systemId: jndi:/localhost/Alojamiento/WEB-INF/web.xml; lineNumber: 1; columnNumber: 1; Final de archivo prematuro.
at
I added an empty web.xml in order to maven compiled. It is also empty in the generated war. So it is probably the cause of the problem ("grails dev war" generates a web.xml with code). Futhermore, the generated war only contains the next folders:
META-INF
WEB-INF
To be able to use "tomcat deploy", I added the next code to the pom.xml (after adding pom true, running "create-pom group" and other configuration changes):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://127.0.0.1:8080/manager</url>
<server>TomcatServer</server>
</configuration>
</plugin>
UPDATE 1
My full pom.xml:
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>alojamiento.ingenierosIW</groupId>
<artifactId>Alojamiento</artifactId>
<packaging>war</packaging>
<version>0.1</version>
<name>Alojamiento</name>
<description>Alojamiento</description>
<properties>
<grails.version>2.2.2</grails.version>
</properties>
<dependencies>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-dependencies</artifactId>
<version>${grails.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-test</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-testing</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.25</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>tomcat</artifactId>
<version>${grails.version}</version>
<scope>provided</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>spring-security-core</artifactId>
<version>1.2.7.3</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>cache</artifactId>
<version>1.0.1</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>resources</artifactId>
<version>1.2.RC2</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>db-reverse-engineer</artifactId>
<version>0.5</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>jquery</artifactId>
<version>1.8.3</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>database-migration</artifactId>
<version>1.3.2</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>hibernate</artifactId>
<version>2.2.2</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>tomcat</artifactId>
<version>2.2.2</version>
<scope>provided</scope>
<type>zip</type>
</dependency>
</dependencies>
<build>
<pluginManagement />
<plugins>
<!-- Disables the Maven surefire plugin for Grails applications, as we have our own test runner -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>plugins</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<configuration>
<!-- Whether for Fork a JVM to run Grails commands -->
<fork>true</fork>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<!--<ignorePackaging>true</ignorePackaging>-->
<addContextWarDependencies>true</addContextWarDependencies>
<url>http://127.0.0.1:8080/manager</url>
<server>TomcatServer</server>
<!--<username>admin</username>-->
<!-- <password>password</password>-->
<!-- <path>/u74937912-practica-WAR</path>-->
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>grails</id>
<name>grails</name>
<url>http://repo.grails.org/grails/core</url>
</repository>
<repository>
<id>grails-plugins</id>
<name>grails-plugins</name>
<url>http://repo.grails.org/grails/plugins</url>
</repository>
</repositories>
<profiles>
<profile>
<id>tools</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
It is perfectly working with this:
CONFIGURATION
Previously, if you are using Eclipse with the plugin m2e, here is explained how to configure Eclipse in order to use Tomcat with it:
tomcat-maven-plugin: Server returned HTTP response code: 403
Now, we need a proper settings.xml in the C:\Users\user.m2 with the same user and password than tomcat-users.xml. Then, we need to have our pom.xml configurated as follow:
<packaging>war</packaging>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://127.0.0.1:8080/manager</url>
<!-- The next server must be the same than the one in settings.xml (at C:\Users\user\.m2): -->
<server>TomcatServer</server>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>init</goal>
<goal>maven-clean</goal>
<goal>validate</goal>
<goal>config-directories</goal>
<goal>maven-compile</goal>
<goal>maven-test</goal>
<goal>maven-war</goal>
<goal>maven-functional-test</goal>
</goals>
</execution>
</executions>
</plugin>
MAVEN COMMANDS TO DEPLOY:
The next command get the configuration values of our database from datasource.groovy - production environmnent:
tomcat:redeploy
tomcat:redeploy -DskipTests
grails:war tomcat:redeploy -DskipTests
To get the values from the development environment, the commands are the next:
grails:war tomcat:redeploy -Dgrails.env=development grails:war
tomcat:redeploy -Dgrails.env=development -DskipTests
Note1: if we not add -DskipTests (to no running tests before to deploying), and some test fail, it won't deploy.
Note2: in eclipse (with the plugin m2e for maven installed), you have to type these commands in the next field:
Run - Run Configurations - Maven Build - Goals
UPDATE 1
Do not forget to create an empty web.xml under src/main/webapp/WEB-INF!
UPDATE 2
Do not forget to tell Grails to use the pom.xml: http://grails.org/doc/2.3.x/ref/Command%20Line/create-pom.html
Try
mvn grails:war tomcat:redeploy -DskipTests
That should hopefully get grails to attach the correct WAR artefact to the build so that the empty default one is not uploaded.

Maven Plugin Development - Include Current Project's Resources to Plugin - "include-project-dependencies" - "NoSuchElementException"

I am trying to develop a maven plugin that uses resource files of the project that uses it as a plugin. I implemented that suggestion into my maven-plugin project and it was builded well. But when i clean & build my project that uses the plugin, i get this exception:
"Failed to execute goal
sample.plugin:maven-plugin:1.0-SNAPSHOT:convertproperties (default) on
project temp: Unable to retrieve component configurator
include-project-dependencies for configuration of mojo
sample.plugin:maven-plugin:1.0-SNAPSHOT:convertproperties:
java.util.NoSuchElementException
role: org.codehaus.plexus.component.configurator.ComponentConfigurator
roleHint: include-project-dependencies"
POM file of the maven-plugin:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>sample.plugin</groupId>
<artifactId>maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>maven-plugin</name>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>[1.5.0, 1.5.1 ]</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.3</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.3</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0.9</version>
<exclusions>
<exclusion>
<artifactId>maven-artifact</artifactId>
<groupId>org.apache.maven</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>2.0.9</version>
<exclusions>
<exclusion>
<artifactId>maven-artifact</artifactId>
<groupId>org.apache.maven</groupId>
</exclusion>
<exclusion>
<artifactId>maven-repository-metadata</artifactId>
<groupId>org.apache.maven</groupId>
</exclusion>
<exclusion>
<artifactId>wagon-provider-api</artifactId>
<groupId>org.apache.maven.wagon</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
<version>1.0-beta-2</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
POM file of my project that uses the maven-plugin:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>temp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>temp</name>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.3</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.3</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>sample.plugin</groupId>
<artifactId>maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>convertproperties</goal>
</goals>
</execution>
</executions>
<configuration>
<sourcePath>/lang</sourcePath>
<destinationPath>lang_json</destinationPath>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>src\main\webapp\lang</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
Any help would be very useful, thanks.
I have found a very good solvation to use the resources of the project inside maven-plugin.
Firstly i gave up using that suggestion.
My plugin's aim was to convert some resource (.properties) files and save them into the location where jsp pages are stored inside the project. So, first step is to copy the needed resource files and rename them as needed by using another maven-plugin called "maven-antrun-plugin" by setting it like that:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>CopyLanguagePropertiesAsJson</id>
<phase>compile</phase>
<configuration>
<tasks>
<copy file="${basedir}\src\main\resources\x.properties"
tofile="${basedir}\src\main\webapp\x\y.z" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
After that movement, I send the opened properties file and destination file into my plugin as variables typed "file" and converted the properties file and stored into the converted file ==> x.properties --> y.z
I said opened because maven does the job exactly like tihs; at build time opens the files that are set as variables for some maven-plugins and sends those objects that are references of those files. The maven-plugin gains the ability to change those files by this way.
Like this:
<plugin>
<groupId>group.id</groupId>
<artifactId>artifact-id</artifactId>
<version>x.x.x</version>
<configuration>
<properties>
<file>${basedir}\src\main\resources\x.properties</file>
</properties>
<convertedFiles>
<file>${basedir}\src\main\webapp\x\y.z</file>
</jsons>
</convertedFiles>
</plugin>
And those files are taken inside the code (class extends AbstractMojo) of my plugin like this:
/**
* #parameter
*/
private File[] properties;
/**
* #parameter
*/
private File[] convertedFiles;
Those are the steps that fully achieves the aim on converting .properties files into another files and storing inside somewhere of a project.
In addition, i have faced with an exception that tells some classes are not found while executing the maven-plugin on the build time of the project which uses it. This is caused by not being able to find needed jar files of the maven-plugin at the build time of the current project. The solvation of that is to use plugin called "maven-assembly-plugin" that builds the jar of your maven-plugin including the dependency jar libraries that your maven-plugin uses. The configuration of the plugin inside the pom file of your maven-plugin :
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
If in some cases, the plugin fails to compile your jar as described, it may be caused by not containing a main class inside your maven-plugin. Because the resason to use such plugins that compile all jar files into one is to be bale to execute the jar of the current project alone itself, not needing any other classes on runtime (building standalone jar files). So, simply create a main class that uses the class of your maven-plugin (class extends AbstractMojo) and try to compile again. After a successfull compilation you can delete your main class, it would build your maven-plugin successfully again without a main class.
I vould be very happy if this post is helpful for somebody.

Resources