Schema Class Generations Failing with XMLBeans version 5.0.1 and xmlbeans-maven-plugin 5.0.1 - xmlbeans-maven-plugin

While generating classes using below new xmlbeans-maven-plugin 5.0.1, i am getting exception
<plugin>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>5.0.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDir>${basedir}/xsd</sourceDir>
<javaTargetDir>src/main/java</javaTargetDir>
<debug>true</debug>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.14.0</version>
</dependency>
</dependencies>
</plugin>
Exception:
Cannot find symbol: class XMLInputStream
[exec] location: package org.apache.xmlbeans.xml.stream
Cannot find symbol: symbol: class XMLStreamException
[exec] location: package org.apache.xmlbeans.xml.stream
I know this issue occurs because the new xmlbeans 5.0.1 doesnt have the 2 classes mentioned above. But i want to upgrade to latest xmlbeans version and also used the latest maven-plugin provided by xmlbeans.
Still facing the issue.
Could anyone help me to solve this issue?

You should add extentions part in configuration.
<configuration>
...
<repackage>com.xxx.yyy.metadata</repackage>
<name>pgmessages</name>
<partialMethods>ALL,-GET_LIST,-XGET_LIST,-XGET_ARRAY</partialMethods>
<extensions>
<extension>
<className>org.apache.xmlbeans.impl.tool.Extension</className>
</extension>
</extensions>
</configuration>

Related

Dependencies in fat jar not working outside of IDE (Java 8)

So im working on this JavaFx application (Java 8) which copies a .xlsx file and fills it with data from a .txt-file, for this I use the apache poi dependency. I have successfully build a fat jar through the maven-assembly-plugin. Here my pom.xml:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<archive>
<manifest>
<mainClass>sample.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
</dependencies>
I build it with:
mvn clean compile assembly:single
The application and its dependencies work fine when I run the main.java in IntelliJ, also the built fat jar starts and works fine when I run it through IntelliJ (performes all functions without a problem).
Only when I start my fat jar outside of the IDE, through a cmd-file (to start the JavaFx application), I'm encountering problems. It starts and loads the .txt-file just fine, but at the point where it's supposed to use the dependency and create a worksheet the program does nothing. Here's what I run in .cmd-file:
start javaw -jar ExcelConverter-1.0-jar-with-dependencies.jar
I've tried building it with various other plugins (shade etc), all seem to have the same problem.
I've also tried building it through intelliJ as an artifact, same issue.
Dependency order is also not an issue as I only use one.
use maven shade plugin for this .check http://maven.apache.org/plugins/maven-shade-plugin/index.html.
below is the sample
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
The problem wasn't the plugins or dependencies not working but that the apache-poi dependency was too memory intensive and thus my JVM ran out of memory. The IntelliJ IDE I've installed uses JVM 64-bit by default, my system on the other hand was using a 32-bit version. I was able to update my JVM to 64 bit and getting it to work fine.

not able to build executable jar using maven shade plugin

i need to check the anagram java file using the maven shade plugin and need to add the manifest and build number . i have tried below code.
<project XML="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>com.fresco.play</groupId>
<artifactId>maven-anagram-finder</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>maven-anagram-finder</name>
<url>http://maven.apache.org</url>
<!-- Insert test dependency here -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<configuration>
<transformers>
<transformer>
<manifestEntries>
<mainClass>com.fresco.play.Anagram</mainClass>
<Build-Number>10</Build-Number>
</manifestEntries>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
this is the error i am getting while trying to build using the jdk1.8 version. all the test cases are passing but build is failing with this error
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.286 s
[INFO] Finished at: 2020-06-25T09:23:24+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.1:shade (default) on project maven-anagram-finder: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:2.1:shade for parameter transformer: Cannot create instance of interface org.apache.maven.plugins.shade.resource.ResourceTransformer: org.apache.maven.plugins.shade.resource.ResourceTransformer.<init>() -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException
i have tried all the ways. but not able to resolve. could you please help on this??
i have resolved the issue by adding the transformer implementation. Thank you.
4.0.0
com.fresco.play
maven-anagram-finder
jar
0.0.1-SNAPSHOT
maven-anagram-finder
http://maven.apache.org
<!-- Insert test dependency here -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
</dependency>
</dependencies>
<build>
<finalName>maven-anagram-finder</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.fresco.play.Anagram</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.fresco.play.Anagram</Main-Class>
<Build-Number>10</Build-Number>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Payara Micro: How to log with slf4j (or log4j2)?

I'm using Payara Micro (bundled ueberjar) for a recent project, but I have difficulties with logging. Seems like Payara Micro uses JUL by default, which does not suit my needs. I'd like to use Log4J 2 instead, preferably through slf4j. Unfortunately, I couldn't find much information. To start with, I'd like refer to the following link...
https://blog.payara.fish/the-basics-of-logging-in-payara-server
... which says: "Payara Micro can also be adjusted to use other logging frameworks like Logback and Log4J2." Sounds great, but the only source that deals with that matter seems to be the following example project: https://github.com/hei1233212000/payara-micro-log4j2. Yet it is from 2017 and seems to be outdated as it doesn't use the payara micro maven plugin. Still, I guess the point is:
add the necessary logging jars to the bundle
adjust Manifest file by adding the jars to the classpath
use the SLF4JBridgeHandler for Payara Micro
I tried my luck adding the jars as customJars via the payara micro maven plugin, which indeed resulted in a bundled jar containing those libs under MICRO-INF/lib. From what I read, the jars should also be on classpath, though they don't appear in the Manifest file. Also, I added the logging.properties tih the following simple content under src/main/resources:
handlers=org.slf4j.bridge.SLF4JBridgeHandler
Now, if I run the bundled jar, it says Can't load log handler "org.slf4j.bridge.SLF4JBridgeHandler", followed by an ugly stacktrace. Yet the class org.slf4j.bridge.SLF4JBridgeHandler is in one of the jars I added. I already experimented with the groovy script from the example I linked above to edit the Manifest file, but I couldn't figure out how to set it up properly. I mean, the script worked and I get an edited Manifest file, but it is not added to the bundled jar - I guess my timing is bad. Not to mention that this is kind of hackish as the author of the example said.
Interestingly, if I don't add the logging.properties to the jar, thus leaving Payara Micros logging setup untouched, I can reroute logging output from 3rd party libraries (such as hibernate) coming with Payara Micro while its own logs are logged to the console. Yet that's not my goal as I am more interested in the latter logs.
So, I'd be thankful if someone could give me a hand. Thanks for reading. For completeness, here is my pom.xml (I am using the package profile, the other is for cucumber tests only):
<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>de.kepes.payara-micro</groupId>
<artifactId>payara-micro</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
<skipTests>true</skipTests>
<payara-micro.version>5.194</payara-micro.version>
<payara-micro.plugin.version>1.0.6</payara-micro.plugin.version>
<jakarta.version>8.0.0</jakarta.version>
<maven-failsafe.plugin.version>2.22.2</maven-failsafe.plugin.version>
<cucumber.version>5.4.0</cucumber.version>
<websocket.version>1.4.0</websocket.version>
<log4j.version>2.13.0</log4j.version>
<slf4j.version>1.7.30</slf4j.version>
</properties>
<profiles>
<profile>
<id>package</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>fish.payara.maven.plugins</groupId>
<artifactId>payara-micro-maven-plugin</artifactId>
<version>${payara-micro.plugin.version}</version>
<executions>
<execution>
<id>bundle</id>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
<execution>
<id>start</id>
<goals>
<goal>start</goal>
</goals>
</execution>
</executions>
<configuration>
<useUberJar>true</useUberJar>
<deployWar>true</deployWar>
<payaraVersion>${payara-micro.version}</payaraVersion>
<customJars>
<customJar>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
</customJar>
<customJar>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</customJar>
<customJar>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</customJar>
<customJar>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</customJar>
<customJar>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</customJar>
</customJars>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test</id>
<properties>
<skipTests>false</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>fish.payara.maven.plugins</groupId>
<artifactId>payara-micro-maven-plugin</artifactId>
<version>${payara-micro.plugin.version}</version>
<executions>
<execution>
<id>pre-integration-payara</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>post-integration-payara</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<payaraVersion>${payara-micro.version}</payaraVersion>
<deployWar>true</deployWar>
<contextRoot>/</contextRoot>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>${jakarta.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.java-websocket</groupId>
<artifactId>Java-WebSocket</artifactId>
<version>${websocket.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
this isn't possible just by adding logging libraries as custom JARs as logging is initialized before those libraries are loaded.
However, there's a solution how to use alternative logging libraries. You need to run Payara Micro in a different way. If you put it on the classpath and run the Payara Micro main class directly, you can put custom logging libraries on the classpath too and they will be picked up at boot time, before logging is initialized. If you have payara-micro.jar, slf4j.jar, log4j.jar and jul-to-slf4j.jar in the current directory, you can launch Payara Micro like this:
java -cp ./payara-micro.jar:slf4j.jar:log4j2.jar:jul-to-slf4j.jar fish.payara.micro.PayaraMicro some.war
Alternatively, you can move those logging JARs to a subdirectory lib and shorten the command line:
java -cp "./payara-micro.jar:lib/*" fish.payara.micro.PayaraMicro some.war
You can pass the same arguments to the PayaraMicro class which are accepted by the Payara Micro JAR.

I can't debug an application using netbeans 11 with JavaFX 12

I've downloaded netbeans 11 with support for java 12
So I followed up the steps from the Gluon webpage running JavaFX and Netbeans Non modular with maven > https://openjfx.io/openjfx-docs/#next-steps
I have configured as showed in the instructions the action to run this app.
Run Project
clean javafx:run
But there is nothing specified to debug the project.
Is there a way to debug this javaFX project?
<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>com.mycompany</groupId>
<artifactId>SimonSaysGFX</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>12</maven.compiler.source>
<maven.compiler.target>12</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>12.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>12.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>12.0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>12</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.2</version>
<configuration>
<mainClass>com.mycompany.simonsaysgfx.App</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<name>SimonSaysGFX</name>
</project>
If you see the documentation of the javafx-maven-plugin, you can add some VM arguments to the run goal in order to debug your project in NetBeans.
However, to keep the usual run goal ready to just run the project and not debug, without commenting out the added options, we can add a second execution to the plugin.
Modify your plugin like this:
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.2</version>
<executions>
<execution>
<!-- Default configuration for running -->
<id>default-cli</id>
<configuration>
<mainClass>com.mycompany.simonsaysgfx.App</mainClass>
</configuration>
</execution>
<execution>
<!-- Configuration for debugging -->
<id>debug</id>
<configuration>
<options>
<option>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:8000</option>
</options>
<mainClass>com.mycompany.simonsaysgfx.App</mainClass>
</configuration>
</execution>
</executions>
</plugin>
Now you can run from command line:
mvn clean javafx:run
to run as usual your application, and:
mvn clean javafx:run#debug
to start debug mode. Then you will see something like:
[INFO] --- javafx-maven-plugin:0.0.2:run (debug) # Project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /path/to/project/target/classes
Listening for transport dt_socket at address: 8000
At this point, you need to set your breakpoints and attach a debugger from NetBeans -> Debug -> Attach Debugger to port 8000:
Click OK and you will be able to debug your projects.
Note that you can also define custom NetBeans actions to use the Run and Debug buttons. Add a nbactions.xml file to the root of your project, with this two actions:
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<goals>
<goal>clean</goal>
<goal>javafx:run</goal>
</goals>
</action>
<action>
<actionName>jlink</actionName>
<goals>
<goal>clean</goal>
<goal>javafx:jlink</goal>
</goals>
</action>
<action>
<actionName>debug</actionName>
<goals>
<goal>clean</goal>
<goal>javafx:run#debug</goal>
</goals>
</action>
</actions>
Now you can use NetBeans run and debug buttons.
José's answer is good. Just go little bit further.
In pom.xml set the
address=${jpda.address} instead of address=*:8000
<execution>
<!-- Configuration for debugging -->
<id>debug</id>
<configuration>
<options>
<option>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</option>
</options>
<mainClass>cz.masci.mvcpattern.mvc.App</mainClass>
</configuration>
</execution>
Be aware of set server=n, otherwise the application will not start.
In the debug action set jpda.listen=true property
...
<action>
<actionName>debug</actionName>
<goals>
<goal>clean</goal>
<goal>javafx:run#debug</goal>
</goals>
<properties>
<jpda.listen>true</jpda.listen>
</properties>
</action>
Then you don't need to attach debuger anymore. Netbeans does it for you.

Error reading assemblies: No assembly descriptors found

I get Error reading assemblies: No assembly descriptors found when building my project. I'm trying to set permissions for my .sh files and exclude a nasty .jar file that makes my application crash...I don't think the problem is about that though....
My maven-assembly plugin is added like this in my pom.xml file:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
My assembly descriptor looks like this:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>my-assembly-descriptor</id>
<formats>
<format>jar</format>
<format>war</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>${project.build.directory}</outputDirectory>
<includes>
<include>*.sh</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<excludes>
<exclude>spring-2.5.4.jar</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>
The structure in my project is:
Interface - src - main - assembly - src.xml
- pom.xml
When trying to do Run as -> Debug as -> and then in goal putting
assembly:single
I get the same error. I tried in console, with assembly:assembly, and I got nothing. I even tried to put a wrong path to my assembly descriptor, but the error didn't change. When putting ${basedir}/ before the path to my assembly descriptor, I get the same.
I have Ubuntu 10.10 Maverick Meerkat, and I'm working with Eclipse EE,...
Thanks!
I have been using version 2.3 of maven-assembly-plugin, but I believe the problem is the same: if the assembly configuration is declared inside an execution, it works from mvn package, but does not work from mvn assembly:assembly.
The solution I have found is to declare the configuration in the top-level configuration of the plugin, and keep the execution as small as possible:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/standalone.xml</descriptor>
</descriptors>
<finalName>standalone</finalName>
</configuration>
<executions>
<execution>
<id>standalone</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
It seems that you have configured the assembly plugin in <build>...<pluginManagement>...<plugins>. It should work if you configure the plugin in <build>...<plugins>.
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
I was also facing the same issue with below command
$mvn clean assembly:single
But below command worked for me
$mvn clean assembly:assembly

Resources