I'm looking for the simple way to generate the child project artifact in the parent project directory using maven.
I have tried directory-maven-plugin and assigned a variable to the parent project. And I've provided this variable in the child pom. Now the child is trying to create a folder with Parent name in it instead of copying the dependencies to parent project folder
Parent.pom
<modelVersion>4.0.0</modelVersion>
<groupId>com.parent.project</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>0.1</version>
<executions>
<execution>
<id>directories</id>
<goals>
<goal>highest-basedir</goal>
</goals>
<phase>initialize</phase>
<configuration>
<property>main.basedir</property>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<modules>
<module>child</module>
</modules>
child.pom
<groupId>com.wellsfargo.1coh</groupId>
<artifactId>child</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>com.parent.project</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
</parent>
<build>
<directory>${main.basedir}/target/</directory>
</build>
Child jar file is getting generated inside child folder instead of parent folder like below- child/c:/foldername/workspace/parent/target/child.jar
What I'm looking for should be like this- parent/target/child.jar