maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamlesh Sangani <>
Subject project artifacts returns empty collection
Date Sat, 17 Jan 2009 23:02:26 GMT
I have a mojo which is bound to generated-sources phase. In the mojo I am calling some third
party code which expects project's dependecies in the classpath. These dependencies are decalred
in the project which is calling my mojo. So before calling the third party code I need to
add these dependecies to the classpath. Is there a standard solution to this problem?

I have looked at the mailing list and there are some suggestions of using ${project.artifacts}
to get project dependecies and then change context classloader. I tried to decalre the following
configuration but artifacts is always empty set.

     * The set of artifact artifacts
     * @parameter expression = "${project.artifacts}"
     * @readonly
     * @requiresDependencyResolution runtime
    private Collection artifacts;

Do I need to have some other configuration in project/plugin pom to make this work? Any help
is appreciated.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message