HI guys,

I also noticed this issue.

It appeared after we used Shared dependencies as is (without the OSGI-rebranding) and, more importantly, after Studio has been integrated to a common build where Shared is built before it.

What I understand from the issue so far, is that, since Shared is built before the reference we get in the Studio plugin is not a reference to a jar file but a reference to a folder instead, the 'classes' folder which contains the compiled resources of the Shared dependencies.

Maybe we can force the behavior of the Studio plugin to get the linked jar file instead of the classes folder.


On 6 févr. 2011, at 19:51, Alex Karasulu wrote:

On Sun, Feb 6, 2011 at 8:36 PM, Stefan Seelmann <seelmann@apache.org> wrote:
Hi Alex,

On Sun, Feb 6, 2011 at 5:20 PM, Alex Karasulu <akarasulu@apache.org> wrote:
> Hi guys,
> ------------------------
> mvn -version
> -----
> Apache Maven 3.0.2 (r1056850; 2011-01-09 02:58:10+0200)
> Java version: 1.6.0_22, vendor: Sun Microsystems Inc.
> Java home: /usr/lib/jvm/java-6-sun-
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.35-24-generic", arch: "amd64", family:
> "unix"
> This is occurring in the m1 branch. Wondering if it's also happening on
> trunk.
> -----------------
> There's a failure that seems rather innocuous in the studio build when I run
> the following from trunks:
>     mvn -Dintegration test
> Here's what the non-debug out put looks like:
> [INFO] Apache Directory Studio Application ............... SUCCESS [0.011s]
> [INFO] Apache Directory Studio Application Plugins ....... FAILURE [0.027s]
> [INFO] Apache Directory Studio Application Features ...... SKIPPED
> [INFO] Apache Directory Studio Application Eclipse Plugins  SKIPPED
> [INFO] Apache Directory Studio Application Linux x86_64 .. SKIPPED
> [INFO] ApacheDS Manuals .................................. SKIPPED
> [INFO] Apache Directory Complete Build With All Projects . SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 8:21.718s
> [INFO] Finished at: Sun Feb 06 18:11:29 EET 2011
> [INFO] Final Memory: 254M/2024M
> [INFO]
> ------------------------------------------------------------------------
> -----------------------
> [ERROR] Failed to execute goal
> org.apache.directory.studio:studio-maven-plugin:1.0.4:copy-eclipse-artifact
> (copy-plugins) on project application-plugins: Can't copy file. Source
> '/ramdisk/Projects/m1/shared/ldap-client-api/target/classes' exists but is a
> directory -> [Help 1]
> As you can see the studio maven plugin is trying to copy the classes
> directory as if it were a file and hence we're getting this failure. I can
> run with a -X option if y'all like to shed more light on it if that's
> Any ideas of what might be happening? Does this happen in trunk as well?

Yes, it also happens on trunk.

In the application-plugins project the studio-maven-plugin is used to
collect all our artifacts (plugins and OSGi bundles) so that they can
later packaged into the installers. The artifacts are maven artifacts.
When these artifacts are included within a build then Maven resolves
Artifact.getFile() to the 'target' folder. This should be the
generated JAR. But if only the 'test' phase is executed no JAR is
packaged and Artifact.getFile() is resolved to target/classes.

A workaround is to run the 'package' phase.

OK thanks for the heads up.