Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Run task before the target is resolved (target-resolve phase..)?

I think you are mixing several separate issues here.

There is currently no IDE support for Tycho project is a problem, so we
have to play various tricks to make Tycho projects usable with PDE.

Integration between Tycho and OSGi bundles produced by other Maven tools
(maven-bundle-plugin comes to mind, but there are others), is another
problem. This is made worse by the lack of proper IDE support, so we
have to deal with Tycho and PDE configuration separately.

And there is dependency resolution timing, which can be seen as a
feature or inconvenience depending on your point of view. Moving
dependency resolution to a later build stage will allow more
tricks to workaround other two problems, but I don't believe it brings
actual resolution to any of them.

Having said that, I'm willing to accept a patch that defers Tycho
dependency resolution until it is actually necessary and can provide
pointers on tycho-dev.

--
Regards,
Igor


On 11-07-26 2:30 PM, Niels Nielsen wrote:
I for one happen to like the deferred dependency resolution even though I have seen problems related to this as you mention. These are mostly solved by manually adjusting the modules order. I cannot see why tycho should be any different.

While target platforms are some order of PDE limitations, I completely agree with that view, they are nevertheless very much used, and in many projects form the basis of compilation. I sit in (yet another) imperfect project with a PDE legacy that is not easily solved by tycho. Because of this I need to use<pomDependencies>consider</pomDependencies>  to specify all transitive dependencies for the plugin (we only have p2 repo for eclipse artifacts), but a few of the features cannot be build without explicitly referencing a tycho target platform (possible discrepancy in tycho there, but that is a separate issue).

Secondly, since the developers also needs a target platform for the PDE development anyway, it makes sense to populate it from the same maven configuration that builds the project in order to control project dependencies. I usually 'sell' maven builds by telling how the same build forms the basis of IDE, local build, CI and release.

Personally, I think booting up the p2 resolver during reactor ordering is overkill. There is so much functionality involved, so much configuration in the project that is eagerly executed without any possibility to interfere, when essentially the only goal is to order project dependencies.

Essentially a bad configuration in one of the tycho projects will invalidate the entire build, whereas a standard maven dependency problem will usually just cause the individual module to fail, hence all other non-related modules can be build.

While reactor reordering is a nice feature, I think it should be toned down from executing the individual module builds.


Regards
/Niels



-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
Sent: 26 July 2011 10:57
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] Run task before the target is resolved (target-resolve phase..)?

You are solving wrong problem, I think. The only reason you want to create target platform before dependency resolution is to workaround PDE limitations. ;-)

Maven defers dependency resolution until it is actually necessary at the cost of less precise ordering of reactor modules (it is theoretically possible to have wrong reactor order when there is indirect dependency between modules and remote artifacts). We can implement similar approach in Tycho, i.e. calculate module order based on project metadata only and resolve project target platform and dependencies at a later stage. Not sure if this is worth the hassle, however.

--
Regards,
Igor

On 11-07-26 1:47 PM, Oberlies, Tobias wrote:
Dependency resolution needs to happen before the module build starts, because it determines the module build order.

My idea to solve this issue was to introduce a lifecycle phase before module ordering (and just execute that phase in an arbitrary order), but I couldn't convince the Maven guys to implement this for me, so this will probably not come - unless you or someone else is willing to implement this in Maven...

Regards
Tobias


-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-
bounces@xxxxxxxxxxx] On Behalf Of Niels Nielsen
Sent: 25 July 2011 17:49
To: Tycho user list
Subject: Re: [tycho-user] Run task before the target is resolved
(target- resolve phase..)?

Hi,

I have been using Tycho on and off for the last year without ever
going into details.
However, it has always been strange to me this fact that dependency
resolution has to happen before the build cycle starts.
I assume this is eclipse resolver specifics, but it does have some
drawbacks

1) It is error prone to any propertybased specification of resolver
definition in parent poms as the parent pom is not build before
subprojects are analyzed
2) It prevents generating a target platform without having to have a
bootstrap mechanism.
3) Problems wrt dependency resolution is highlighted outside of the
individual project containing the error, which is confusing and
difficult to trace.

Now, given that it is so contrary to normal maven dependency
resolutions, how come it is not possible to work around it or at
least lazy load the dependency mechanism?

Regards
/Niels

-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-
bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
Sent: 16 July 2011 07:24
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] Run task before the target is resolved
(target- resolve phase..)?

Dependency resolution has to happen before build lifecycle starts, so
it is not possible to run any maven goals before it.

--
Regards,
Igor

On 11-07-15 5:22 PM, motes motes wrote:
In a maven3/tycho project I would like to run an ant task before the
target is resolved. But it seems that the target is resolved before
any of the standard maven phases is run. Is there someway to do
stuff before the target is resolved, I have tried:

						<phase>generate-resources</phase>
						<goals>
							<goal>copy</goal>
						</goals>

but still the target is resolved (and the projec fails if the
resolve
fails) before this task is executed.
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top