Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Testing staged Tycho 2.0.0

Hi,

Thanks for the hint about pomless Tycho and the settings.xml. After adding the repository to the settings.xml and restarting the build using 

mvn -U clean verify

the build succeeds.

From my understanding the -U parameter should "force" the update:

-U	Forces a check for missing releases and updated snapshots on remote repositories


One thing I noticed though is that the .polyglot files generated by pomless Tycho are not deleted if the build fails at an early stage on my Windows machine. Once the build was fixed things are working correctly. Not sure why the created files are not deleted I that scenario.


About the javax.annotation import, well IMHO it is a Tycho issue. I have a build that creates a headless application. So there is no Eclipse platform dependency where javax.annotation is transitively imported. In another project where we are using the Eclipse platform, the error does not come up. The Tycho Surefire plugin has a dependency to javax.annotation. But the reactor does not add javax.annotation to the test runtime if it is not required by the bundles under test. But as Tycho Surefire has the dependency it should add its own requirements to the test runtime and not expect that the bundles under test solve that requirement. And my understanding of the linked ticket was that exactly this was fixed with 1.4. But probably I misunderstood this.

Not sure if the javax.annotation thing is a bug or not. I was able to fix this by adding these lines to the target-platform-configuration configuration section:

<dependency-resolution>
	<extraRequirements>
		<requirement>
			<type>eclipse-plugin</type>
			<id>javax.annotation</id>
			<versionRange>0.0.0</versionRange>
		</requirement>
	</extraRequirements>
</dependency-resolution>

But I think this is a workaround for an issue in Tycho Surefire and the building of the test runtime. Surely no blocker for 2.0 as it is no regression, but maybe something to fix in the future?

Mit freundlichen Grüßen / Best regards

 Dirk Fauth

Cross Automotive Platforms - Systems, Software and Tools,  (CAP-SST/ESM1)
Robert Bosch GmbH | Postfach 30 02 40 | 70442 Stuttgart | GERMANY | www.bosch.com
Tel. +49 7153 666-1155 | Dirk.Fauth@xxxxxxxxxxxx

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner, 
Prof. Dr. Stefan Asenkerschbaumer, Dr. Michael Bolle, Dr. Christian Fischer, Dr. Stefan Hartung,
Dr. Markus Heyn, Harald Kröger, Christoph Kübel, Rolf Najork, Uwe Raschke, Peter Tyroller

-----Ursprüngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx <tycho-user-bounces@xxxxxxxxxxx> Im Auftrag von Christoph Läubrich
Gesendet: Donnerstag, 13. August 2020 09:08
An: tycho-user@xxxxxxxxxxx
Betreff: Re: [tycho-user] Testing staged Tycho 2.0.0

Maybe its just me, but I have never succeed in "or updates are forced" 
(it would be incredible helpful if maven would actually tell HOW this could be forced in the error message), so I ended up wit going to my local m2 repository and removing the org/eclipse/tycho folder to force retry of download.

Also keep in mind that if using pomless-build you need to configure the repository inside the settings.xml to be picked up.

Not importing javax.annotation was and is always an error in OSGi, so you could save you some headaches to explicitly add these import even though in eclipse (and tycho) is has worked the past years without it.

Am 13.08.20 um 07:26 schrieb Fauth Dirk (CAP-SST/ESM1):
> Hi,
> 
> I wanted to test the staged Tycho 2.0.0 today for some projects. But I 
> have problems getting even the first build to finish. Not sure if it 
> is an issue in the setup to consume the staged Tycho plugins.
> 
> I added the following lines to the pom.xml of the project I want to 
> test (also tried adding it to the settings.xml)
> 
> <pluginRepository>
> 
>              <id>tycho-staged</id>
> 
>              
> <url>https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2
> Foss.sonatype.org%2Fcontent%2Frepositories%2Forgeclipsetycho-1063&amp;
> data=02%7C01%7Cdirk.fauth%40de.bosch.com%7C58b6d936a24041202f5308d83f5
> 7ad21%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C637328993083913025&
> amp;sdata=piGcu6F6t%2FhxYvvdz8rvGr2uf56hramtBS7Z5zF8Aew%3D&amp;reserve
> d=0</url 
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Foss
> .sonatype.org%2Fcontent%2Frepositories%2Forgeclipsetycho-1063%253c%2Fu
> rl&amp;data=02%7C01%7Cdirk.fauth%40de.bosch.com%7C58b6d936a24041202f53
> 08d83f57ad21%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C637328993083
> 913025&amp;sdata=PmHJ16Za2GwlFAf03mHQ3Qi4uEOi9xaY8M%2FHcMFLpw8%3D&amp;
> reserved=0>>
> 
> </pluginRepository>
> 
> When I execute the build I get the following error:
> 
> Plugin org.eclipse.tycho:tycho-p2-director-plugin:2.0.0-SNAPSHOT or 
> one of its dependencies could not be resolved: Failure to find 
> org.eclipse.tycho:tycho-p2-director-plugin:jar:2.0.0-SNAPSHOT in
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Foss.
> sonatype.org%2Fcontent%2Frepositories%2Forgeclipsetycho-1063&amp;data=
> 02%7C01%7Cdirk.fauth%40de.bosch.com%7C58b6d936a24041202f5308d83f57ad21
> %7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C637328993083913025&amp;s
> data=piGcu6F6t%2FhxYvvdz8rvGr2uf56hramtBS7Z5zF8Aew%3D&amp;reserved=0 
> was cached in the local repository, resolution will not be reattempted 
> until the update interval of tycho-staged has elapsed or updates are 
> forced
> 
> Even running the build using *mvn –U clean verify* the error occurs. 
> Am I missing something?
> 
> In the build log I see the following warning multiple times:
> 
> [WARNING] The POM for
> org.eclipse.tycho:tycho-p2-director-plugin:jar:2.0.0-SNAPSHOT is 
> missing, no dependency information available
> 
> Could it be related to this somehow?
> 
> Additionally I have another error. Since Tycho 2.0.0 requires minimum 
> Java 11 I updated my build environment to use a Java 11 JDK for the 
> build. I left the project unchanged that builds with Java 8 and Tycho
> 1.7 fine. The build fails with the following error:
> 
> !ENTRY org.eclipse.tycho.surefire.junit4 2 0 2020-08-12 10:43:41.356
> 
> !MESSAGE Could not resolve module: org.eclipse.tycho.surefire.junit4 
> [20]
> 
>    Unresolved requirement: Import-Package: javax.annotation
> 
> After searching a bit I have found out that this should have been 
> fixed with Tycho 1.4
> 
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs
> .eclipse.org%2Fbugs%2Fshow_bug.cgi%3Fid%3D541403&amp;data=02%7C01%7Cdi
> rk.fauth%40de.bosch.com%7C58b6d936a24041202f5308d83f57ad21%7C0ae51e190
> 7c84e4bbb6d648ee58410f4%7C0%7C0%7C637328993083913025&amp;sdata=42P54MZ
> uvm6i1UpadMfinTEINTMFqzM4E9TtzMhA6MI%3D&amp;reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbug
> s.eclipse.org%2Fbugs%2Fshow_bug.cgi%3Fid%3D541403&amp;data=02%7C01%7Cd
> irk.fauth%40de.bosch.com%7C58b6d936a24041202f5308d83f57ad21%7C0ae51e19
> 07c84e4bbb6d648ee58410f4%7C0%7C0%7C637328993083913025&amp;sdata=42P54M
> Zuvm6i1UpadMfinTEINTMFqzM4E9TtzMhA6MI%3D&amp;reserved=0>
> 
> Following the suggestions in this ticket I added javax.annotation from 
> Orbit to the target platform. But this still does not fix the issue. I 
> have to add javax.annotation to the test bundle so it gets added to 
> the test runtime. But I understood from the comments in the bug report 
> that this should not be necessary if javax.annotation is included in 
> the target platform. I am using a target definition based build.
> 
> Is there anything else that has to be configured to make Tycho based 
> builds that contain test bundles to run with Java 11?
> 
> BTW, this also happens with older Tycho versions. So probably not 
> related to 2.0.0.
> 
> Note:
> 
> I am using the pom-less Tycho approach and all projects still have the 
> BREE 1.8 set.
> 
> Mit freundlichen Grüßen / Best regards
> 
> *Dirk Fauth*
> 
> Cross Automotive Platforms - Systems, Software and Tools, 
> (CAP-SST/ESM1) Robert Bosch GmbH | Postfach 30 02 40 | 70442 Stuttgart 
> | GERMANY | http://www.bosch.com/ Tel. +49 7153 666-1155 | 
> Dirk.Fauth@xxxxxxxxxxxx <mailto:Dirk.Fauth@xxxxxxxxxxxx>
> 
> Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
> Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. 
> Volkmar Denner,
> Prof. Dr. Stefan Asenkerschbaumer, Dr. Michael Bolle, Dr. Christian 
> Fischer, Dr. Stefan Hartung, Dr. Markus Heyn, Harald Kröger, Christoph 
> Kübel, Rolf Najork, Uwe Raschke, Peter Tyroller ​
> 
> 
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To unsubscribe from this list, visit 
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> eclipse.org%2Fmailman%2Flistinfo%2Ftycho-user&amp;data=02%7C01%7Cdirk.
> fauth%40de.bosch.com%7C58b6d936a24041202f5308d83f57ad21%7C0ae51e1907c8
> 4e4bbb6d648ee58410f4%7C0%7C0%7C637328993083913025&amp;sdata=F743Pathy%
> 2BRTPj6pemy2XOz6X603wkkd5fuHhLT1dYg%3D&amp;reserved=0
> 
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eclipse.org%2Fmailman%2Flistinfo%2Ftycho-user&amp;data=02%7C01%7Cdirk.fauth%40de.bosch.com%7C58b6d936a24041202f5308d83f57ad21%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C637328993083913025&amp;sdata=F743Pathy%2BRTPj6pemy2XOz6X603wkkd5fuHhLT1dYg%3D&amp;reserved=0

Back to the top