I'm trying to merge openwebbeans.properties files which are appeared in 2 of the dependencies(openwebbeans-impl, openejb-core) in one of my OSGi bundle using the shades plugin. I follow the shades doc on My configuration is as follows https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#AppendingTransformer
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/openwebbeans/openwebbeans.properties</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
But when I try mvn clean install it fails with following error
[INFO] --- maven-shade-plugin:2.3:shade (default) @ tomee ---
[ERROR] The project main artifact does not exist. This could have the following
[ERROR] reasons:
[ERROR] - You have invoked the goal directly from the command line. This is not
[ERROR] supported. Please add the goal to the default lifecycle via an
[ERROR] <execution> element in your POM and use "mvn package" to have it run.
[ERROR] - You have bound the goal to a lifecycle phase before "package". Please
[ERROR] remove this binding from your POM such that the goal will be run in
[ERROR] the proper phase.
[ERROR] - You removed the configuration of the maven-jar-plugin that produces the main artifact.
[INFO] ------------------------------------------------------------------------
Could someone tell me is there any errors in my configuration? What is the correct way to do this?
Edited
According to the answer provided by struberg it seems that my attempt is not applicable for the openwebebans context. But still I'm wonder what is the correct way of merging properties file. Or how to fix this issue.