Discussion:
Resolve dependencies from workspace projects: classifier resolution not working
(too old to reply)
Seref Arikan
2012-09-03 09:18:50 UTC
Permalink
Greetings,
I have project A which pulls dependencies from an Eclipse P2 repo via Tycho
maven plugin, and it packages these dependencies with emflib classifier
during packaging. Project A's pom has eclipse-plugin packaging.
Project B is the master pom container, that declares a dependency on A as
follows;


<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</artifactId>
<version>0.0.1</version>
<classifier>emflib</classifier>
</dependency>
</dependencies>

Finally project C declares B as its parent, and uses classes from the
repackaged jar from A.

The problem is, the classes required in C is not resolved into Eclipse
project's class path for C when Resolve dependencies from workspace
projects is checked. So m2e is not checking the local repository (which has
the required jar). mvn compile from terminal for project C works fine.

Likewise, if Resolve dependencies is checked for project B, then no matter
what I write into classifer, I don't get an error in Eclipse, that is, it
does not check the repository for the classifier.
Would I have any trouble if I keep Resolve dependencies from workspace...
unchecked? I'd like to run everything based on Maven anyway, for other
teams who would use my code base and would not use Eclipse.
As a secondary question: am I getting something wrong here?

This is maven 3, with JDK 1.7 under 64 bit Ubuntu 12.04, using Eclipse
Indigo.

Kind regards
Seref
Igor Fedorenko
2012-09-03 11:26:11 UTC
Permalink
m2e does not support workspace resolution for classified dependencies.
As a workaround, you need to install these dependencies to local
repository and make sure source project is not present in workspace.

I'll be explaining this and other limitations m2e currently has during
my eclipsecon eu talk [1], if you are interested to know why.


[1]
http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water

--
Regards,
Igor
Post by Seref Arikan
Greetings,
I have project A which pulls dependencies from an Eclipse P2 repo via
Tycho maven plugin, and it packages these dependencies with emflib
classifier during packaging. Project A's pom has eclipse-plugin packaging.
Project B is the master pom container, that declares a dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</artifactId>
<version>0.0.1</version>
<classifier>emflib</classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses classes from the
repackaged jar from A.
The problem is, the classes required in C is not resolved into Eclipse
project's class path for C when Resolve dependencies from workspace
projects is checked. So m2e is not checking the local repository (which
has the required jar). mvn compile from terminal for project C works fine.
Likewise, if Resolve dependencies is checked for project B, then no
matter what I write into classifer, I don't get an error in Eclipse,
that is, it does not check the repository for the classifier.
Would I have any trouble if I keep Resolve dependencies from
workspace... unchecked? I'd like to run everything based on Maven
anyway, for other teams who would use my code base and would not use
Eclipse.
As a secondary question: am I getting something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu 12.04, using Eclipse
Indigo.
Kind regards
Seref
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Seref Arikan
2012-09-03 11:51:20 UTC
Permalink
Thanks Igor,
I have no problem with this. Can you see any problems with me disabling the
workspace resolution? I want maven based configuration to run things,
including Eclipse development time classpaths.

Best regards
Seref
Post by Igor Fedorenko
m2e does not support workspace resolution for classified dependencies.
As a workaround, you need to install these dependencies to local
repository and make sure source project is not present in workspace.
I'll be explaining this and other limitations m2e currently has during
my eclipsecon eu talk [1], if you are interested to know why.
[1] http://www.eclipsecon.org/**europe2012/sessions/m2e-**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water>
--
Regards,
Igor
Post by Seref Arikan
Greetings,
I have project A which pulls dependencies from an Eclipse P2 repo via
Tycho maven plugin, and it packages these dependencies with emflib
classifier during packaging. Project A's pom has eclipse-plugin packaging.
Project B is the master pom container, that declares a dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</**artifactId>
<version>0.0.1</version>
<classifier>emflib</**classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses classes from the
repackaged jar from A.
The problem is, the classes required in C is not resolved into Eclipse
project's class path for C when Resolve dependencies from workspace
projects is checked. So m2e is not checking the local repository (which
has the required jar). mvn compile from terminal for project C works fine.
Likewise, if Resolve dependencies is checked for project B, then no
matter what I write into classifer, I don't get an error in Eclipse,
that is, it does not check the repository for the classifier.
Would I have any trouble if I keep Resolve dependencies from
workspace... unchecked? I'd like to run everything based on Maven
anyway, for other teams who would use my code base and would not use
Eclipse.
As a secondary question: am I getting something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu 12.04, using Eclipse
Indigo.
Kind regards
Seref
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
Igor Fedorenko
2012-09-03 11:55:09 UTC
Permalink
It is possible to disable workspace resolution for consumer projects,
not for providers. In your case this means workspace dependency
resolution will have to be disabled for project C and it won't be able
to use any other workspace project, not just project A.

--
Regards,
Igor
Post by Seref Arikan
Thanks Igor,
I have no problem with this. Can you see any problems with me disabling
the workspace resolution? I want maven based configuration to run
things, including Eclipse development time classpaths.
Best regards
Seref
m2e does not support workspace resolution for classified dependencies.
As a workaround, you need to install these dependencies to local
repository and make sure source project is not present in workspace.
I'll be explaining this and other limitations m2e currently has during
my eclipsecon eu talk [1], if you are interested to know why.
[1]
http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water
<http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water>
--
Regards,
Igor
Greetings,
I have project A which pulls dependencies from an Eclipse P2 repo via
Tycho maven plugin, and it packages these dependencies with emflib
classifier during packaging. Project A's pom has eclipse-plugin packaging.
Project B is the master pom container, that declares a
dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</__artifactId>
<version>0.0.1</version>
<classifier>emflib</__classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses classes from the
repackaged jar from A.
The problem is, the classes required in C is not resolved into Eclipse
project's class path for C when Resolve dependencies from workspace
projects is checked. So m2e is not checking the local repository (which
has the required jar). mvn compile from terminal for project C works fine.
Likewise, if Resolve dependencies is checked for project B, then no
matter what I write into classifer, I don't get an error in Eclipse,
that is, it does not check the repository for the classifier.
Would I have any trouble if I keep Resolve dependencies from
workspace... unchecked? I'd like to run everything based on Maven
anyway, for other teams who would use my code base and would not use
Eclipse.
As a secondary question: am I getting something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu 12.04, using Eclipse
Indigo.
Kind regards
Seref
_________________________________________________
m2e-users mailing list
https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>
_________________________________________________
m2e-users mailing list
https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Seref Arikan
2012-09-03 11:58:06 UTC
Permalink
Thanks Igor,
I've disabled it for all projects, and everything still works as expected.
When you say it is possible, so you mean I should not disable it for all
projects, or do you mean it is enough that I disable it for C only?

Best regards
Seref
Post by Igor Fedorenko
It is possible to disable workspace resolution for consumer projects,
not for providers. In your case this means workspace dependency
resolution will have to be disabled for project C and it won't be able
to use any other workspace project, not just project A.
--
Regards,
Igor
Post by Seref Arikan
Thanks Igor,
I have no problem with this. Can you see any problems with me disabling
the workspace resolution? I want maven based configuration to run
things, including Eclipse development time classpaths.
Best regards
Seref
m2e does not support workspace resolution for classified dependencies.
As a workaround, you need to install these dependencies to local
repository and make sure source project is not present in workspace.
I'll be explaining this and other limitations m2e currently has during
my eclipsecon eu talk [1], if you are interested to know why.
[1]
http://www.eclipsecon.org/__**europe2012/sessions/m2e-__**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/**europe2012/sessions/m2e-**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water>
--
Regards,
Igor
Greetings,
I have project A which pulls dependencies from an Eclipse P2 repo via
Tycho maven plugin, and it packages these dependencies with emflib
classifier during packaging. Project A's pom has eclipse-plugin
packaging.
Project B is the master pom container, that declares a dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</__**artifactId>
<version>0.0.1</version>
<classifier>emflib</__**classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses classes from the
repackaged jar from A.
The problem is, the classes required in C is not resolved into Eclipse
project's class path for C when Resolve dependencies from workspace
projects is checked. So m2e is not checking the local repository (which
has the required jar). mvn compile from terminal for project C
works fine.
Likewise, if Resolve dependencies is checked for project B, then no
matter what I write into classifer, I don't get an error in Eclipse,
that is, it does not check the repository for the classifier.
Would I have any trouble if I keep Resolve dependencies from
workspace... unchecked? I'd like to run everything based on Maven
anyway, for other teams who would use my code base and would not use
Eclipse.
As a secondary question: am I getting something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu 12.04, using Eclipse
Indigo.
Kind regards
Seref
______________________________**___________________
m2e-users mailing list
https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**___________________
m2e-users mailing list
https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
Igor Fedorenko
2012-09-03 12:08:36 UTC
Permalink
Yes, you need to disable workspace dependency resolution for all
projects that directly or indirectly depend on project A, and,
personally, I consider this a showstopper. I would keep workspace
dependency resolution on, but close project A (or remove it from
workspace altogether), and use RunAs->MavenBuild to install new emflib
artifact whenever I need it.

--
Regards,
Igor
Post by Seref Arikan
Thanks Igor,
I've disabled it for all projects, and everything still works as
expected. When you say it is possible, so you mean I should not disable
it for all projects, or do you mean it is enough that I disable it for C
only?
Best regards
Seref
It is possible to disable workspace resolution for consumer projects,
not for providers. In your case this means workspace dependency
resolution will have to be disabled for project C and it won't be able
to use any other workspace project, not just project A.
--
Regards,
Igor
Thanks Igor,
I have no problem with this. Can you see any problems with me disabling
the workspace resolution? I want maven based configuration to run
things, including Eclipse development time classpaths.
Best regards
Seref
On Mon, Sep 3, 2012 at 12:26 PM, Igor Fedorenko
m2e does not support workspace resolution for classified dependencies.
As a workaround, you need to install these dependencies to local
repository and make sure source project is not present in workspace.
I'll be explaining this and other limitations m2e currently has during
my eclipsecon eu talk [1], if you are interested to know why.
[1]
http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water
<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water
<http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water>>
--
Regards,
Igor
Greetings,
I have project A which pulls dependencies from an
Eclipse P2
repo via
Tycho maven plugin, and it packages these dependencies with emflib
classifier during packaging. Project A's pom has eclipse-plugin
packaging.
Project B is the master pom container, that declares a
dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</____artifactId>
<version>0.0.1</version>
<classifier>emflib</____classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses
classes
from the
repackaged jar from A.
The problem is, the classes required in C is not
resolved into
Eclipse
project's class path for C when Resolve dependencies
from workspace
projects is checked. So m2e is not checking the local
repository
(which
has the required jar). mvn compile from terminal for project C
works fine.
Likewise, if Resolve dependencies is checked for
project B, then no
matter what I write into classifer, I don't get an
error in Eclipse,
that is, it does not check the repository for the classifier.
Would I have any trouble if I keep Resolve dependencies from
workspace... unchecked? I'd like to run everything based on Maven
anyway, for other teams who would use my code base and
would not use
Eclipse.
As a secondary question: am I getting something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu
12.04, using
Eclipse
Indigo.
Kind regards
Seref
___________________________________________________
m2e-users mailing list
https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>>
___________________________________________________
m2e-users mailing list
https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>>
_________________________________________________
m2e-users mailing list
https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>
_________________________________________________
m2e-users mailing list
https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Seref Arikan
2012-09-03 12:50:17 UTC
Permalink
The showstopper bit is what I'm trying to understand :) Why is this bad?

If I move A out of the workspace, I still can't use its output from any
project, because it generates its output as somelib-0.0.1-emflib.jar and I
can't reference this since I need to use <classifier>, which does not work
with workspace dependency on. So under my circumstances, it appears I can't
have workspace dependency on, in any configuration unless I rename the
emflib.jar to something else and add a dependency to that directly without
the classifier.

Thanks a lot for your help, I think I got it now, just trying to understand
what I'm losing with not having workspace dependency on :)

Best regards
Seref
Post by Igor Fedorenko
Yes, you need to disable workspace dependency resolution for all
projects that directly or indirectly depend on project A, and,
personally, I consider this a showstopper. I would keep workspace
dependency resolution on, but close project A (or remove it from
workspace altogether), and use RunAs->MavenBuild to install new emflib
artifact whenever I need it.
--
Regards,
Igor
Post by Seref Arikan
Thanks Igor,
I've disabled it for all projects, and everything still works as
expected. When you say it is possible, so you mean I should not disable
it for all projects, or do you mean it is enough that I disable it for C
only?
Best regards
Seref
It is possible to disable workspace resolution for consumer projects,
not for providers. In your case this means workspace dependency
resolution will have to be disabled for project C and it won't be able
to use any other workspace project, not just project A.
--
Regards,
Igor
Thanks Igor,
I have no problem with this. Can you see any problems with me disabling
the workspace resolution? I want maven based configuration to run
things, including Eclipse development time classpaths.
Best regards
Seref
On Mon, Sep 3, 2012 at 12:26 PM, Igor Fedorenko
m2e does not support workspace resolution for classified
dependencies.
As a workaround, you need to install these dependencies to local
repository and make sure source project is not present in workspace.
I'll be explaining this and other limitations m2e currently
has during
my eclipsecon eu talk [1], if you are interested to know why.
[1]
http://www.eclipsecon.org/____**europe2012/sessions/m2e-____**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/__**europe2012/sessions/m2e-__**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/__**europe2012/sessions/m2e-__**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/**europe2012/sessions/m2e-**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water>
**>
--
Regards,
Igor
Greetings,
I have project A which pulls dependencies from an
Eclipse P2
repo via
Tycho maven plugin, and it packages these dependencies
with emflib
classifier during packaging. Project A's pom has eclipse-plugin
packaging.
Project B is the master pom container, that declares a
dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</____**artifactId>
<version>0.0.1</version>
<classifier>emflib</____**classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses
classes
from the
repackaged jar from A.
The problem is, the classes required in C is not
resolved into
Eclipse
project's class path for C when Resolve dependencies
from workspace
projects is checked. So m2e is not checking the local
repository
(which
has the required jar). mvn compile from terminal for project C
works fine.
Likewise, if Resolve dependencies is checked for
project B, then no
matter what I write into classifer, I don't get an
error in Eclipse,
that is, it does not check the repository for the classifier.
Would I have any trouble if I keep Resolve dependencies from
workspace... unchecked? I'd like to run everything
based on Maven
anyway, for other teams who would use my code base and
would not use
Eclipse.
As a secondary question: am I getting something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu
12.04, using
Eclipse
Indigo.
Kind regards
Seref
______________________________**_____________________
m2e-users mailing list
https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_____________________
m2e-users mailing list
https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**___________________
m2e-users mailing list
https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**___________________
m2e-users mailing list
https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
Igor Fedorenko
2012-09-03 12:52:48 UTC
Permalink
Workspace dependency resolution provide too much productivity gain, imho.

m2e is expected to resolve somelib-0.0.1-emflib.jar from local
repository after you remove project A from workspace.

--
Regards,
Igor
Post by Seref Arikan
The showstopper bit is what I'm trying to understand :) Why is this bad?
If I move A out of the workspace, I still can't use its output from any
project, because it generates its output as somelib-0.0.1-emflib.jar and
I can't reference this since I need to use <classifier>, which does not
work with workspace dependency on. So under my circumstances, it appears
I can't have workspace dependency on, in any configuration unless I
rename the emflib.jar to something else and add a dependency to that
directly without the classifier.
Thanks a lot for your help, I think I got it now, just trying to
understand what I'm losing with not having workspace dependency on :)
Best regards
Seref
Yes, you need to disable workspace dependency resolution for all
projects that directly or indirectly depend on project A, and,
personally, I consider this a showstopper. I would keep workspace
dependency resolution on, but close project A (or remove it from
workspace altogether), and use RunAs->MavenBuild to install new emflib
artifact whenever I need it.
--
Regards,
Igor
Thanks Igor,
I've disabled it for all projects, and everything still works as
expected. When you say it is possible, so you mean I should not disable
it for all projects, or do you mean it is enough that I disable it for C
only?
Best regards
Seref
On Mon, Sep 3, 2012 at 12:55 PM, Igor Fedorenko
It is possible to disable workspace resolution for consumer projects,
not for providers. In your case this means workspace dependency
resolution will have to be disabled for project C and it won't be able
to use any other workspace project, not just project A.
--
Regards,
Igor
Thanks Igor,
I have no problem with this. Can you see any problems
with me
disabling
the workspace resolution? I want maven based
configuration to run
things, including Eclipse development time classpaths.
Best regards
Seref
On Mon, Sep 3, 2012 at 12:26 PM, Igor Fedorenko
m2e does not support workspace resolution for classified
dependencies.
As a workaround, you need to install these
dependencies to
local
repository and make sure source project is not
present in
workspace.
I'll be explaining this and other limitations m2e currently
has during
my eclipsecon eu talk [1], if you are interested to know why.
[1]
http://www.eclipsecon.org/______europe2012/sessions/m2e-______exercise-mixing-oil-and-water
<http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water
<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>>
<http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water
<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water
<http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water>>__>
--
Regards,
Igor
Greetings,
I have project A which pulls dependencies from an
Eclipse P2
repo via
Tycho maven plugin, and it packages these dependencies
with emflib
classifier during packaging. Project A's pom has
eclipse-plugin
packaging.
Project B is the master pom container, that declares a
dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</______artifactId>
<version>0.0.1</version>
<classifier>emflib</______classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses
classes
from the
repackaged jar from A.
The problem is, the classes required in C is not
resolved into
Eclipse
project's class path for C when Resolve dependencies
from workspace
projects is checked. So m2e is not checking the local
repository
(which
has the required jar). mvn compile from
terminal for
project C
works fine.
Likewise, if Resolve dependencies is checked for
project B, then no
matter what I write into classifer, I don't get an
error in Eclipse,
that is, it does not check the repository for the
classifier.
Would I have any trouble if I keep Resolve
dependencies
from
workspace... unchecked? I'd like to run everything
based on Maven
anyway, for other teams who would use my code base and
would not use
Eclipse.
As a secondary question: am I getting
something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu
12.04, using
Eclipse
Indigo.
Kind regards
Seref
_____________________________________________________
m2e-users mailing list
https://dev.eclipse.org/______mailman/listinfo/m2e-users
<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>>
<https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>>>
_____________________________________________________
m2e-users mailing list
https://dev.eclipse.org/______mailman/listinfo/m2e-users
<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>>
<https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>>>
___________________________________________________
m2e-users mailing list
https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>>
___________________________________________________
m2e-users mailing list
https://dev.eclipse.org/____mailman/listinfo/m2e-users
<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>>
_________________________________________________
m2e-users mailing list
https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>
_________________________________________________
m2e-users mailing list
https://dev.eclipse.org/__mailman/listinfo/m2e-users
<https://dev.eclipse.org/mailman/listinfo/m2e-users>
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Seref Arikan
2012-09-03 15:03:41 UTC
Permalink
Thanks Igor,
I've moved the Tycho plugin based project to another workspace, and it
works now.

Kind regards
Seref
Post by Igor Fedorenko
Workspace dependency resolution provide too much productivity gain, imho.
m2e is expected to resolve somelib-0.0.1-emflib.jar from local
repository after you remove project A from workspace.
--
Regards,
Igor
Post by Seref Arikan
The showstopper bit is what I'm trying to understand :) Why is this bad?
If I move A out of the workspace, I still can't use its output from any
project, because it generates its output as somelib-0.0.1-emflib.jar and
I can't reference this since I need to use <classifier>, which does not
work with workspace dependency on. So under my circumstances, it appears
I can't have workspace dependency on, in any configuration unless I
rename the emflib.jar to something else and add a dependency to that
directly without the classifier.
Thanks a lot for your help, I think I got it now, just trying to
understand what I'm losing with not having workspace dependency on :)
Best regards
Seref
Yes, you need to disable workspace dependency resolution for all
projects that directly or indirectly depend on project A, and,
personally, I consider this a showstopper. I would keep workspace
dependency resolution on, but close project A (or remove it from
workspace altogether), and use RunAs->MavenBuild to install new emflib
artifact whenever I need it.
--
Regards,
Igor
Thanks Igor,
I've disabled it for all projects, and everything still works as
expected. When you say it is possible, so you mean I should not disable
it for all projects, or do you mean it is enough that I disable it for C
only?
Best regards
Seref
On Mon, Sep 3, 2012 at 12:55 PM, Igor Fedorenko
It is possible to disable workspace resolution for consumer
projects,
not for providers. In your case this means workspace dependency
resolution will have to be disabled for project C and it
won't be able
to use any other workspace project, not just project A.
--
Regards,
Igor
Thanks Igor,
I have no problem with this. Can you see any problems
with me
disabling
the workspace resolution? I want maven based
configuration to run
things, including Eclipse development time classpaths.
Best regards
Seref
On Mon, Sep 3, 2012 at 12:26 PM, Igor Fedorenko
m2e does not support workspace resolution for classified
dependencies.
As a workaround, you need to install these
dependencies to
local
repository and make sure source project is not
present in
workspace.
I'll be explaining this and other limitations m2e currently
has during
my eclipsecon eu talk [1], if you are interested
to know why.
[1]
http://www.eclipsecon.org/____**__europe2012/sessions/m2e-____**
__exercise-mixing-oil-and-**water<http://www.eclipsecon.org/______europe2012/sessions/m2e-______exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/___**_europe2012/sessions/m2e-____**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/___**_europe2012/sessions/m2e-____**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/__**europe2012/sessions/m2e-__**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
**>
<http://www.eclipsecon.org/___**_europe2012/sessions/m2e-____**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/____europe2012/sessions/m2e-____exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/__**europe2012/sessions/m2e-__**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/__**europe2012/sessions/m2e-__**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/__europe2012/sessions/m2e-__exercise-mixing-oil-and-water>
<http://www.eclipsecon.org/**europe2012/sessions/m2e-**
exercise-mixing-oil-and-water<http://www.eclipsecon.org/europe2012/sessions/m2e-exercise-mixing-oil-and-water>
**>__>
--
Regards,
Igor
Greetings,
I have project A which pulls dependencies from an
Eclipse P2
repo via
Tycho maven plugin, and it packages these dependencies
with emflib
classifier during packaging. Project A's pom has
eclipse-plugin
packaging.
Project B is the master pom container, that declares a
dependency on A
as follows;
<dependencies>
<dependency>
<groupId>com.arikan</groupId>
<artifactId>p2tests</______**
artifactId>
<version>0.0.1</version>
<classifier>emflib</______**
classifier>
</dependency>
</dependencies>
Finally project C declares B as its parent, and uses
classes
from the
repackaged jar from A.
The problem is, the classes required in C is not
resolved into
Eclipse
project's class path for C when Resolve dependencies
from workspace
projects is checked. So m2e is not checking the local
repository
(which
has the required jar). mvn compile from
terminal for
project C
works fine.
Likewise, if Resolve dependencies is checked for
project B, then no
matter what I write into classifer, I don't get an
error in Eclipse,
that is, it does not check the repository for the
classifier.
Would I have any trouble if I keep Resolve
dependencies
from
workspace... unchecked? I'd like to run everything
based on Maven
anyway, for other teams who would use my code base and
would not use
Eclipse.
As a secondary question: am I getting
something wrong here?
This is maven 3, with JDK 1.7 under 64 bit Ubuntu
12.04, using
Eclipse
Indigo.
Kind regards
Seref
______________________________**_______________________
m2e-users mailing list
https://dev.eclipse.org/______**mailman/listinfo/m2e-users<https://dev.eclipse.org/______mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____**
mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**
_______________________
m2e-users mailing list
https://dev.eclipse.org/______**mailman/listinfo/m2e-users<https://dev.eclipse.org/______mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____**
mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_____________________
m2e-users mailing list
https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_____________________
m2e-users mailing list
https://dev.eclipse.org/____**mailman/listinfo/m2e-users<https://dev.eclipse.org/____mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**___________________
m2e-users mailing list
https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**___________________
m2e-users mailing list
https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users>
<https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
______________________________**_________________
m2e-users mailing list
https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
Greg Thomas
2012-09-03 12:58:05 UTC
Permalink
Post by Seref Arikan
Thanks a lot for your help, I think I got it now, just trying to understand
what I'm losing with not having workspace dependency on :)
With workspace resolution, if project A depends on project B, I can
make changes to project B and project A will pick them up immediately.

Without workspace resolution, I have to remember to mvn install
project B before project A picks them up.

Greg
Seref Arikan
2012-09-03 14:09:45 UTC
Permalink
Ah, got it now. A purely maven based dependency relation would require mvn
install at every step :)
Both Igor and and Greg, thanks a lot for your help. you've really saved me
hours of document hunting!

Kind regards
Seref
Post by Seref Arikan
Post by Seref Arikan
Thanks a lot for your help, I think I got it now, just trying to
understand
Post by Seref Arikan
what I'm losing with not having workspace dependency on :)
With workspace resolution, if project A depends on project B, I can
make changes to project B and project A will pick them up immediately.
Without workspace resolution, I have to remember to mvn install
project B before project A picks them up.
Greg
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Continue reading on narkive:
Loading...