I have a maven multi module project structure.
I want to build the jar of a child project using maven-antrun-plugin by declaring it inside the parent project's pom.
Here is my parent-pom:
<groupId>com.package.abc</groupId>
<artifactId>parent-pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>concat-build-classpath</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<jar destfile="${project.build.directory}/${project.build.finalName}.jar"
basedir="src/main">
<manifest>
<attribute name="Main-Class" value="com.package.abc.Application" />
</manifest>
</jar>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>never</phase>
<configuration>
<finalName>unwanted</finalName>
<classifier>unwanted</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build></project>
and here is my child project's pom:
<modelVersion>4.0.0</modelVersion>
<artifactId>sample-project</artifactId>
<parent>
<groupId>com.package.abc</groupId>
<artifactId>parent-pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<build>
<finalName>sample-project</finalName>
</build></project>
When I am building child project it shows the error as:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project sample-project: The packaging for this project did not assign a file to the build artifact -> [Help 1]
You can set <inherited> to false in <plugin> element:
...
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.5</version>
<inherited>false</inherited>
...
More info at:
https://maven.apache.org/pom.html#plugins
https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_inherited_Tag_In_Build_Plugins
Related
I want to debug and run my Maven JavaFx project on Raspberry pi 3B+ from my workstation. I've tried Maven with Standard Java application and JavaFx application without Maven, in both situation it works successfully. But when I try with JavaFx Maven it gives me an error.
I've use "ssh-exec-maven-plugin" plugin with Maven Java Application and it works.
If Maven not used, both Java application and JavaFx can be remotely run with Netbeans Remote Runtime Platform. When I tried "ssh-exec-maven-plugin" plugin with Maven JavaFx project it gives me an error
Failed to execute goal org.rogueware.mojo:ssh-exec-maven-plugin:1.2:exec (default-cli) on project mavenproject1: Execution default-cli of goal org.rogueware.mojo:ssh-exec-maven-plugin:1.2:exec failed. NullPointerException -> [Help 1]
Resources that I've use,
https://www.raspberrypi.org/forums/viewtopic.php?p=1049839&sid=37a34bec94c20b0febe687740aba2488#p1049839
http://artem.gratchev.com/2015/03/java-application-jar-raspberry-pi-maven-eclipse/
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.erenay</groupId>
<artifactId>mavenproject1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mavenproject1</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>com.erenay.mavenproject1.MainApp</mainClass>
</properties>
<organization>
<!-- Used as the 'Vendor' for JNLP generation -->
<name>Your Organisation</name>
</organization>
<build>
<plugins>
<!-- PART I ADD -->
<plugin>
<groupId>org.rogueware.mojo</groupId>
<artifactId>ssh-exec-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<sshHost>10.0.0.124</sshHost>
<sshUsername>pi</sshUsername>
<sshPassword>123456</sshPassword>
<remoteExecutable>export DISPLAY=:0.0;java</remoteExecutable>
</configuration>
</plugin>
<!-- END of PART I ADD -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeScope>system</excludeScope>
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/../bin/javafxpackager</executable>
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>${mainClass}</argument>
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
<argument>-outdir</argument>
<argument>${project.build.directory}</argument>
<argument>-outfile</argument>
<argument>${project.build.finalName}.jar</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>default-cli</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<commandlineArgs>${runfx.args}</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${java.home}/lib/jfxrt.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>
</project>
Also Project Properties->Actions->Run Project and Debug Project->Execute Goals
are replaced by clean package org.rogueware.mojo:ssh-exec-maven-plugin:1.2:exec
Thanks.
I have 2 maven projects. Project A and Project B. Project B is dependent on Project A but not the other way around.
In my project B pom I have this:
<dependency>
<groupId>com</groupId>
<artifactId>ProjectA</artifactId>
<type>pom</type>
<version>1.0-SNAPSHOT</version>
</dependency>
When i try to package the project it fails with this error:
[ERROR] Failed to execute goal on project ProjectB: Could not resolve dependencies for project com:ProjectB:war:1.0-SNAPSHOT: Could not find artifact com:ProjectA:pom:1.0-SNAPSHOT -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project ProjectB: Could not resolve dependencies for project com:ProjectB:war:1.0-SNAPSHOT: Could not find artifact com:ProjectA:pom:1.0-SNAPSHOT
So it can't find my ProjectA pom. Do I need to put it in my project? Where should it be located in my file structure.
For what it's worth, I am using intelliJ IDE.
Thanks in advance.
EDIT: When i run install on projectA I get this error:
The packaging for this project did not assign a file to the build artifact
EDIT2 - Adding ProjectA pom:
<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>edu</groupId>
<artifactId>ProjectA</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>ProjectA</name>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>install-jar-lib</id>
<phase>validate</phase>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>prepare-package</id>
<phase>prepare-package</phase>
<configuration>
<target>
<copy file="${basedir}/src/main/webapp/META-INF/context-${app.environment}.xml"
tofile="${basedir}/src/main/webapp/META-INF/context.xml" />
<copy file="${basedir}/src/main/webapp/WEB-INF/web-${app.environment}.xml"
tofile="${basedir}/src/main/webapp/WEB-INF/web.xml" />
<copy file="${basedir}/src/main/resources/log4j-${app.environment}.xml"
tofile="${basedir}/src/main/resources/log4j.xml" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<phase>compile</phase>
<configuration>
<target>
<copy file="${project.build.directory}/classes/log4j-${app.environment}.xml"
tofile="${project.build.directory}/classes/log4j.xml" />
<delete>
<fileset dir="${project.build.directory}/classes" includes="**/*-local.*"/>
<fileset dir="${project.build.directory}/classes" includes="**/*-test.*"/>
<fileset dir="${project.build.directory}/classes" includes="**/*-prod.*"/>
</delete>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>package</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete file="${basedir}/src/main/webapp/META-INF/context.xml" />
<delete file="${basedir}/src/main/webapp/WEB-INF/web.xml" />
<tstamp>
<format property="last.timestamp" pattern="yyyyMMddHHmmss"/>
</tstamp>
<property name="build.time" value="${last.timestamp}" />
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<failOnMissingWebXml>true</failOnMissingWebXml>
<!--<webResources>
<resource>
<directory>src/main/WEB-INF/lib</directory>
<targetPath>WEB-INF/lib</targetPath>
<filtering>false</filtering>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</webResources>-->
</configuration>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>rename-file</id>
<phase>package</phase>
<goals>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/${artifactId}-${version}.war</sourceFile>
<destinationFile>${project.build.directory}/ProjectA##${build.time}.war</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
You have to install ProjectA in your local Maven repo (or otherwise make it available in whatever remote repositories your pom.xml or settings.xml point at). For example:
cd whereever/projectA/lives
mvn clean install
This will write com/ProjectA/ProjectA.pom to your local Maven repo and when you do this ...
cd wherever/projectB/lives
mvn clean install
... Maven will resolve ProjectA.pom from that location.
Note: the dependency you have declared on ProjectA:
<dependency>
<groupId>com</groupId>
<artifactId>ProjectA</artifactId>
<type>pom</type>
<version>1.0-SNAPSHOT</version>
</dependency>
... will transitively add all dependencies declared in com:ProjectA to ProjectB's POM, is that definitely your intention? This only makes sense if ProjectA is packaged as a POM, if it is packaged as a JAR then you need to update the dependency declaration in ProjectB to remove this line: <type>pom</type>.
I have a parent aggregator POM with multiple modules. I have a build/pluginManagement in the parent since plugin execution is the same for each sub module.
If I execute in each sub module (mvn package) it works fine. If I execute in the parent: mvn package -Pmytest, I want to skip plugin execution in the parent module, so I added:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
However, it's not working.
Parent pom.xml:
<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.xyz.jboss.config</groupId>
<artifactId>jboss-config</artifactId>
<packaging>pom</packaging>
<version>1.2-SNAPSHOT</version>
<name>jboss-config</name>
<url>http://maven.apache.org</url>
<profiles>
<profile>
<id>mytest</id>
<modules>
<module>jboss-system-properties</module>
<module>jboss-security</module>
</modules>
</profile>
</profiles>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>process-package</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/processed/scripts</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/resources/scripts</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>process-clean</id>
<phase>clean</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/processed/scripts</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/resources/scripts</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<executions>
<execution>
<id>add-${project.artifactId}</id>
<phase>package</phase>
<goals>
<goal>execute-commands</goal>
</goals>
<configuration>
<execute-commands>
<scripts>
<script>${basedir}/processed/scripts/add-${project.artifactId}.cli</script>
</scripts>
</execute-commands>
</configuration>
</execution>
<execution>
<id>remove-${project.artifactId}</id>
<phase>clean</phase>
<goals>
<goal>execute-commands</goal>
</goals>
<configuration>
<execute-commands>
<scripts>
<script>${basedir}/processed/scripts/remove-${project.artifactId}.cli</script>
</scripts>
</execute-commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Child pom.xml
<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>
<parent>
<groupId>com.xyz.jboss.config</groupId>
<artifactId>jboss-config</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>
<artifactId>jboss-system-properties</artifactId>
<packaging>ear</packaging>
<name>jboss-system-properties</name>
<url>http://maven.apache.org</url>
</project>
I'm getting a file not found error. The file is not supposed to exists here. The issue is why it's not skipping parent module execution.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] jboss-config ....................................... FAILURE [ 20.238 s]
[INFO] jboss-system-properties ............................ SKIPPED
[INFO] jboss-security ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:
execute-commands (add-jboss-config) on project jboss-config:
Execution add-jboss-config of goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:execute-commands failed:
Failed to process file 'H:\projects\xyz\jboss\trunk\jboss-configuration\processed\scripts\add-jboss-config.cli':
H:\projects\xyz\jboss\trunk\jboss-configuration\processed\scripts\add-jboss-config.cli
(The system cannot find the path specified)
I found the issue. If the execution id is parameterized, in my case:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<executions>
<execution>
<id>add-${project.artifactId}</id>
...
...
<executions>
<execution>
<id>remove-${project.artifactId}</id>
...
...
to skip plugin execution, you'd have to explicitly specify the execution id and phase:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<executions>
<execution>
<id>add-jboss-config</id>
<phase/>
</execution>
<execution>
<id>remove-jboss-config</id>
<phase/>
</execution>
</executions>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
Now, it skips the parent, executes in all the children modules, and I only have one place for plugin configuration.
Note: I tried using static execution ids, but it has the side effect of skipping execution in the children modules as well. Also, I'm not sure if all of these issues are just in wildfly-maven-plugin.
I have a build set up to run a variety of tasks when I run mvn release:prepare and mvn:release:perform. Specifically, I have a phase set up so that my javadocs and source-plugins are run only when I release. This allows my build to avoid a lot of time for the common case of mvn clean install. I'd like to add to this my maven-assembly-plugin jar-with-dependencies so only when I release the assembly plugin is run.
Here's what my build looks like:
<?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>example</groupId>
<artifactId>example</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Example</name>
<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<doclet>org.asciidoctor.Asciidoclet</doclet>
<docletArtifact>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoclet</artifactId>
<version>0.1.3</version>
</docletArtifact>
<linksource>true</linksource>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
the maven-source-plugin and maven-javadoc-plugin both run during the release phase, but the maven-assembly-plugin does not. What do I have to do to make this plugin run during a maven release?
The single isn't bound to a default phase, so you have to specify it in the execution-block.
If you compare it with the javadoc:jar you'll see that this goal is by default bound to the package phase.
I have different independent maven projects and want to build it with single pom. So I am using following pom
<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>a.b</groupId>
<artifactId>my-sdk</artifactId>
<name>my-sdk</name>
<version>1.0</version>
<packaging>pom</packaging>
<description>Generating SDK</description>
<modules>
<module>project1</module>
<module>project2</module>
<module>project3</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>process-sources</id>
<phase>process-classes</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<configuration>
<tasks>
<ant antfile="build.xml" target="init" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jboss-repo</id>
<url>http://repository.jboss.org/maven2</url>
</repository>
</repositories>
I have the following questions:-
Javadoc is not generating, so where I am doing wrong. If I run "mvn javadoc:javadoc package" command it generates java doc. But if I run "mvn package" it doesn't.
In project2 there is assembly plugin to generate fat jar, it generates jar of project2 but unable to generate fat jar. If I build project2 independently it generate fat jar successfully.
Follwing section is from project2 pom to generate fat jar which works successfully if I run the build independently
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<configuration>
<archive>
<manifest>
<mainClass>[MAIN CLASS]</mainClass>
</manifest>
<manifestEntries>
<Class-Path>.</Class-Path>
</manifestEntries>
</archive>
</configuration>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Any Suggestions.
I'd say check the documentation for both of your questions ;-)
javadoc (http://maven.apache.org/plugins/maven-javadoc-plugin/plugin-info.html)
javadoc:jar and javadoc:javadoc should not be used for an aggregator project, use javadoc:aggregate or (in your case) javadoc:aggregate-jar
assembly (http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html)
first, assembly:assembly is deprecated and second, it should only be used on the command line. I guess using goal single will help.