Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Build Features separately

Timo,

you are right. It seems Tycho keep only the last version of a plugin when it is installed and if qualifier is used. This is related to Tycho and how it is using the local Maven repository.
If you wan't a woraround, I'm afraid you need to deploy on an MRM (I'm using Nexus + P2 Plugin).

Regards
Jeff MAURY


On Thu, Dec 20, 2012 at 11:48 AM, Timo Lange <lange@xxxxxxxxxxx> wrote:
Hi Jeff,

yes of course.

I created for every Feature a own Jenkins-job and a Parent-POM which contains the Modules (Feature + Plugin(s)).
So i'm using the Maven2/3 Job-type in Jenkins and using the Jenkins-SVN-Plugin for automatic checkout/update.

I'm using "mvn install" to install the artifact into the local-repository. Not deploy, we don't have a maven-artifact-manager.
All jobs sharing the same local maven-repository.

You're right, that the previous version is available.
When i re-build Feature1, the Feature2 is still available. Yes, but: Not the plugin he depends on!

There is a mistake im my exmaple. Not the Feature is the problem. It is the Plugin, that the Feature can't resolve.
I'm trying to give a better example:


The Jenkins-Job called "Basic" builds the Feature Basic with the Plugin XYZ-1.0.0.qualifier (let's say qualifier == 1220)
After the "mvn install" Maven will install the Plugin XYZ-1.0.0.1220 into the local repository.


Now the Jenkins-Job will build the Feature "Advanced" which depends on the same Plugin XYZ.
(Only depends, this Job will not build XYZ!)
Tycho/Maven will see that Plugin XYZ-1.0.0.1220 is available in the local-repository and will resolve it.
Again: After "mvn install" the Feature "Advanced-1.0.0.qualifier" (let's say 1230) is getting deployed too!

So far so good.

Now anyone re-builds Feature "Basic" which will re-build the Plugin XYZ!!
Tycho/Maven will change the qualifier to e.g. XYZ-1.0.0.1235 and will deploy it again! (and overwrite the old one)

Here it comes:
The Feature "Special" depends on Feature "Advanced". Maven/Tycho trying to resolve it and will see
that the Feature is in the local-repository. So he will trying resolve Feature Advanced-1.0.0.1230.

But he can't resolve it! Feature Advanced had the Plugin XYZ-1.0.0.1220 which is already overwritten by 1235!!
Resolve FAILED!

So yes, the Feature "Advanced" is still available. But not the Plugins that are declared in his feature.xml!

Hope this make it a bit clearer.
Thanks

MfG,
Timo L.




On 12/19/2012 04:02 PM, Jeff MAURY wrote:
I don't understand why the build fails because even if Feaure1 has been rebuild, the previous version should be available, no ?
Can you describe your archictecture, do you deploy the artifacts, do you work with multiple Jenkins jobs ?

Regards
Jeff MAURY



On Wed, Dec 19, 2012 at 3:29 PM, Timo Lange <lange@xxxxxxxxxxx> wrote:
Hi all tycho-users,

my project contains several features, each of them has his own maven-build/jenkins-job.
I want to build separately because otherwise the build will take a long time to build but i want a fast feedback.
That's what jenkins/hudson (CI-Server) made for!!

The problem i'm facing is that i'm not able to build them separately, because of the Qualifier/SNAPSHOT.

For example:
I'm building Feature1 which contains Plugin1. Tycho will generate the qualifier "1219" for instance.
Now i'm building Feature2 which depends on Feature1! So tycho will generate a new qualifier (e.g. 1220) for Feature2 with the Qualifier of Feature1 (1219) in the feature.xml.
Now somebody change code in Plugin1 from Feature1. Feature1 will re-build -> new Qualifier -> 1921

Here it comes: I'm building Feature3 which uses Feature2! But Feature2 can't resolve his dependencies, because Feature1 has a new Qualifier! So the build fail!

So i'm always need to build in the right order (or remove the qualifier) but this can't be the solution. Do you guys making all full-builds? How do you deal with it?

Thanks alot in advance!
MfG,
Timo L.


-- 

============================================================================
FLENSBURGER SCHIFFBAU-GESELLSCHAFT mbH & Co. KG
Batteriestrasse 52, 24939 Flensburg

Sitz der Gesellschaft / Place of business : Flensburg
Geschaeftsfuehrer / CEO : Peter Sierk
Handelregister / Commercial register : Amtsgericht Flensburg, HRA 3140
Steuer Nr. / Tax number: 1528040009
USt.-Id-Nr. / VAT no : DE 134633705
Amtsgericht / District court : Flensburg HRB 2036
============================================================================

The information contained in this email message may be privileged and
confidential. If you have received this communication in error, please
notify the sender immediately by telephoning (+49-461-49400) and return this
message to the above address. Thank you.

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user




--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


-- 

============================================================================
FLENSBURGER SCHIFFBAU-GESELLSCHAFT mbH & Co. KG
Batteriestrasse 52, 24939 Flensburg

Sitz der Gesellschaft / Place of business : Flensburg
Geschaeftsfuehrer / CEO : Peter Sierk
Handelregister / Commercial register : Amtsgericht Flensburg, HRA 3140
Steuer Nr. / Tax number: 1528040009
USt.-Id-Nr. / VAT no : DE 134633705
Amtsgericht / District court : Flensburg HRB 2036
============================================================================

The information contained in this email message may be privileged and
confidential. If you have received this communication in error, please
notify the sender immediately by telephoning (+49-461-49400) and return this
message to the above address. Thank you.

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user




--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Back to the top