Bug in Workspace Dependecy Resolution?

View: New views
4 Messages — Rating Filter:   Alert me  

Bug in Workspace Dependecy Resolution?

by jan-mirko.kanzleiter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

it seems that the newest version of m2 has an bug in the workspace depedency resolution.

The following occurs:
I have one project with one or more nested modules that is dependent from another project.
For both projects I have workspace resolution enabled. Both projects compile nicely via Eclipse, Maven invoked in Eclipse via M2 and Maven via the command shell.
But If I try to execute a Junit Test-Case in the dependent project the Test fails with a ClasNotFound-Exception.

If I disable the workspace resolution the test runs but only if i invoked "mvn install" in advance of starting the test.

In the attachment of this mail I send you two projects to reproduce this bug.

I am using Eclipse 3.4 and M2 in the newest version 0.9.5.20080627-1152. The bug also occurs in the current stable version 0.9.4.20080603-0114.
In version 0.9.3.20080421-2352 the plugin behaves well.

Best regards
Jan-Mirko Kanzleiter



http://www.biotronik.com

*********************************************************************************
BIOTRONIK GmbH & Co. KG
Woermannkehre 1, 12359 Berlin, Germany
Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRA 6501

Vertreten durch ihre Komplementaerin:
BIOTRONIK Mess- und Therapiegeraete GmbH
Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRB 2918
Geschaeftsfuehrer: Dr. Max Schaldach, Christoph Boehmer, Dr. Werner Braun, Dr. Lothar Krings
*********************************************************************************

This email and the information it contains including attachments are confidential and meant
only for use by the intended recipient(s); disclosure or copying is strictly prohibited. If you are
not addressed, but in the possession of this email, please notify the sender immediately.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

workspace-resolution-bug.zip (31K) Download Attachment

Re: Bug in Workspace Dependecy Resolution?

by Benjamin Lerman-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Hi,

 Hi,

> I am using Eclipse 3.4 and M2 in the newest version 0.9.5.20080627-1152. The
> bug also occurs in the current stable version 0.9.4.20080603-0114.
> In version 0.9.3.20080421-2352 the plugin behaves well.

 I might be wrong, but my experience with this kind of problem tell me
that your have set output directories in your project that are not
target/classes and target/test-classes. From 0.9.4, m2eclipse does not
work, out of the box, with separate output folders. See the following
post from Eugene:
http://www.jroller.com/eu/entry/configuring_separate_maven_output_folders
to allow separate folders for maven and eclipse.

--
        Benjamin LERMAN

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Bug in Workspace Dependecy Resolution?

by Eugene Kuleshov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

jan-mirko.kanzleiter@... wrote:

>  it seems that the newest version of m2 has an bug in the workspace
>  depedency resolution.
>
>  The following occurs: I have one project with one or more nested
>  modules that is dependent from another project. For both projects I
>  have workspace resolution enabled. Both projects compile nicely via
>  Eclipse, Maven invoked in Eclipse via M2 and Maven via the command
>  shell. But If I try to execute a Junit Test-Case in the dependent
>  project the Test fails with a ClasNotFound-Exception.
>
>  If I disable the workspace resolution the test runs but only if i
>  invoked "mvn install" in advance of starting the test.
>
>  In the attachment of this mail I send you two projects to reproduce
>  this bug.
>
>  I am using Eclipse 3.4 and M2 in the newest version
>  0.9.5.20080627-1152. The bug also occurs in the current stable
>  version 0.9.4.20080603-0114. In version 0.9.3.20080421-2352 the
>  plugin behaves well.

  After updating to 0.9.4 version you need to run "Maven / Update
Project Configuration" action on your Maven projects in Eclipse
workspace. That would reconfigure projects to the changed defaults as
described in release notes and New and Noteworthy [1] for 0.9.4 release.

  regards,
  Eugene

[1] http://docs.codehaus.org/display/M2ECLIPSE/New+and+Noteworthy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: Bug in Workspace Dependecy Resolution?

by jan-mirko.kanzleiter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

thanks for your advice, Eugene.

I updated the Projects with "Update Project Configuration" and it worked again.

Regards
Jan

http://www.biotronik.com

*********************************************************************************
BIOTRONIK GmbH & Co. KG
Woermannkehre 1, 12359 Berlin, Germany
Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRA 6501

Vertreten durch ihre Komplementaerin:
BIOTRONIK Mess- und Therapiegeraete GmbH
Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRB 2918
Geschaeftsfuehrer: Dr. Max Schaldach, Christoph Boehmer, Dr. Werner Braun, Dr. Lothar Krings
*********************************************************************************

This email and the information it contains including attachments are confidential and meant
only for use by the intended recipient(s); disclosure or copying is strictly prohibited. If you are
not addressed, but in the possession of this email, please notify the sender immediately.