I have come across an interesting issue:

Following the example in the maven-jar-plugin, I have my artifact deployed
to a dynamically created local repository which its path is passed to the
maven-invoker-plugin for the integration test projects.  I am finding that
the maven-dependency-plugin:copy is still downloading the last snapshot from
the inhouse repository regardless if it is newer or older, and then being
copied to a directory of my choosing from which it is deployed to a running
jboss server for testing.

I have a workaround: I manually specified the path
(${basedir}/../../../local-repo/groupid/artifactid/version-snapshot/filename.jar)
and that got it working the way I wanted--but of course this is not ideal
since i'll have to update the version identifier everytime i do a release,
or the path if the location of the integration project changes (i could
probably use the interpolated pom filtering feature to resolve the version
identifier issue).

What do you think should be the case to solve this kind of issue?  Perhaps I
am doing something wrong?  I tried tweaking some of the repository snapshot
update settings (tried setting to always update), and overwriting the
dependencies (via dependency:copy) to false (so they dont overwrite), but
nothing seems to work correctly.

-David

On Wed, Jan 23, 2008 at 12:41 PM, Olivier Lamy <[EMAIL PROTECTED]> wrote:

> Hi,
> You can have a look at the its in some maven plugins (jar plugin [1])
> to see how we organize execution of the maven-invoker-plugin.
> Look at the pom and the profile called integration-tests.
> But IMHO the maven-invoker-plugin is for maven plugins not for jar
> artifacts.
>
> --
> Olivier
> |1] https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-jar-plugin/
>
> 2008/1/23, David Siefert <[EMAIL PROTECTED]>:
>  > Hi,
> >
> > I am trying to get my integration tests to run as part of the main
> project
> > build using the maven-invoker-plugin.  However it is impossible (at
> least
> > without some hacking) to have the IT projects run because of the maven
> build
> > lifecycle.
> >
> > compile
> > package <-- JAR created
> > integration-test  <-- invoke maven it projects [FAILS: Cannot load
> artifact
> > that was built during package phase]
> > verify <-- Reports success anyway even though build has failed due to
> above
> > artifact issue!
> >
> > I could see a possible solution: use ant task to copy the project
> artifact,
> > or use a systemPath dependency--however this could be error prone
> (location
> > of the artifact).
> >
> > Any suggestions?
> >
> > Thanks,
> >
> > David
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to