You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jason Pyeron <jp...@pdinc.us> on 2016/10/21 14:19:26 UTC
Sister module dependency and artifact copy
I am converting a legacy code base to a maven build and the packaged artifact of "module-a" is part of the "source" of "module-b".
I thought to use the maven-dependency-plugin:copy and list module-a's artifact, but this fails if the lifecycle did not reach the install phase, even though it did reach the package phase.
What is the most maven way to copy ../moudule-a/target/module-a-1234.jar to src/lib/generated/legacy-named.jar ?
Googling has led me to com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0:copy , but I feel maven-assembly-plugin likely performs the required tasks. I have not, yet, been able to grok the maven-assembly-plugin configuration.
[I am looking for a more elegant solution than using the exec or antrun plugins].
v/r,
Jason Pyeron
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: [maven] RE: Sister module dependency and artifact copy
Posted by Jason Pyeron <jp...@pdinc.us>.
> -----Original Message-----
> From: Martin Gainty
> Sent: Friday, October 21, 2016 10:36
>
> > From: Jason Pyeron
> > Date: Fri, 21 Oct 2016 10:19:26 -0400
> >
> > I am converting a legacy code base to a maven build and the
> packaged artifact of "module-a" is part of the "source" of "module-b".
> >
> > I thought to use the maven-dependency-plugin:copy and list
> module-a's artifact, but this fails if the lifecycle did not
> reach the install phase, even though it did reach the package phase.
> >
> > What is the most maven way to copy
> ../moudule-a/target/module-a-1234.jar to
> src/lib/generated/legacy-named.jar ?
I should have been more explict, the artifact needs to be renamed here. The default Maven naming is not consistent with the legacy
systems expectation.
> >
> > Googling has led me to
> com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0:copy
> , but I feel maven-assembly-plugin likely performs the
> required tasks. I have not, yet, been able to grok the
> maven-assembly-plugin configuration.
> >
> > [I am looking for a more elegant solution than using the
> exec or antrun plugins].
> >
> > v/r,
> >
> > Jason Pyeron
> MG>Hi Jason ..for copying resources i will implement
> copy-resources goal from maven-resources-plugin
> MG>https://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html
> MG>does this address your requirement?
I looked at that first, but could not find a rename capability and the only way to copy was filter by include and target a
destination _directory_ .
In a perfect world, I would use the "copy-artifact-or-dependency" plugin and specify <groupId>my.group</groupId>,
<artifactId>module-a</artifactId>, and <targetName>path/new-name.jar</targetName>
-Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Sister module dependency and artifact copy
Posted by Martin Gainty <mg...@hotmail.com>.
> From: jpyeron@pdinc.us
> To: users@maven.apache.org
> Subject: Sister module dependency and artifact copy
> Date: Fri, 21 Oct 2016 10:19:26 -0400
>
> I am converting a legacy code base to a maven build and the packaged artifact of "module-a" is part of the "source" of "module-b".
>
> I thought to use the maven-dependency-plugin:copy and list module-a's artifact, but this fails if the lifecycle did not reach the install phase, even though it did reach the package phase.
>
> What is the most maven way to copy ../moudule-a/target/module-a-1234.jar to src/lib/generated/legacy-named.jar ?
>
> Googling has led me to com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0:copy , but I feel maven-assembly-plugin likely performs the required tasks. I have not, yet, been able to grok the maven-assembly-plugin configuration.
>
> [I am looking for a more elegant solution than using the exec or antrun plugins].
>
> v/r,
>
> Jason Pyeron
MG>Hi Jason ..for copying resources i will implement copy-resources goal from maven-resources-plugin
MG>https://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html
MG>does this address your requirement?
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> - -
> - Jason Pyeron PD Inc. http://www.pdinc.us -
> - Principal Consultant 10 West 24th Street #100 -
> - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
> - -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>