Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Problem with dependency resolution when running tests with Tycho surefire

Tom,

I'm working in a local branch where the bundle version is properly bumped. Also, wouldn't that kind of error surface during compilation? In this case the error occurs when launching the plugin test, as if resolution is different during test launch than compilation. The test requires the latest version of the "missing" imagecontrol bundle. I checked the generated jar and it contains a manifest with the correct version.

Hallvard

On 23/10/2019, 03:51, "Tom Bryan (tombry)" <tombry@xxxxxxxxx> wrote:

    Took a quick look, and it looks like the maintainer forgot to bump the Bundle-Version for the net.sourceforge.plantuml.eclipse.imagecontrol plug-in up to 1.1.24.qualifier.  Therefore, the build is only going to create version 1.2.23.
    
    See https://github.com/hallvard/plantuml/blob/master/bundles/net.sourceforge.plantuml.eclipse.imagecontrol/META-INF/MANIFEST.MF.  
    
    If you change that Bundle-Version to 1.1.24.qualifier and rebuild, I suspect that it'll work.
    
    Oddly, they bumped up the Bundle-Version for net.sourceforge.plantuml.jdt, but the Require-Bundle still only requires version 1.1.19 of the imagecontrol plug-in.  I suspect that that's also a mistake, but that's probably why the regular build does not get an error.  
    
    At least one test plug-in asks for version 1.2.24.qualifier of the imagecontrol plug-in, https://github.com/hallvard/plantuml/blob/master/tests/net.sourceforge.plantuml.eclipse.tests/META-INF/MANIFEST.MF, and the build is only going to create version 1.2.23.  That's why you're getting the error.
    
    ---Tom
    
    On 10/21/19, 7:21 PM, "tycho-user-bounces@xxxxxxxxxxx on behalf of Hallvard Trætteberg" <tycho-user-bounces@xxxxxxxxxxx on behalf of hal@xxxxxxx> wrote:
    
        Hi,
        
        I'm using Tycho to build plantuml (plugins, features and repository), and suddenly have started getting dependency resolution errors when running UI tests. I discovered it when upgrading to Tycho 1.5, and I'm pretty sure it worked with 1.3. However, when rolling back, I get the same errors. The build is pomless, with the Tycho version indicated in the .mvn/extensions.xml file. The target refers to Luna, i.e. a pretty old target, but it did work pretty recently. I tried upgrading to maven 3.6.2 (from 3.3), but needed to downgrade to 3.6.0. Here's the output of mvn --version:
        
        Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00)
        Maven home: /usr/local/Cellar/maven@3.5/3.5.4/libexec
        Java version: 1.8.0_222, vendor: Eclipse OpenJ9, runtime: /Users/hal/.sdkman/candidates/java/8.0.222.j9-adpt/jre
        Default locale: en_US, platform encoding: UTF-8
        OS name: "mac os x", version: "10.14.5", arch: "x86_64", family: "mac"
        
        The build consists of several ordinary plugins and test plugins. Compiling works, it's when running the (UI) tests with tycho-surefire, which is supposed to launch Eclipse, I get the dependency resolution error:
        
        [ERROR] Cannot resolve project dependencies:
        [ERROR]   Software being installed: net.sourceforge.plantuml.eclipse.tests 1.1.24.qualifier
        [ERROR]   Missing requirement: net.sourceforge.plantuml.eclipse.tests 1.1.24.qualifier requires 'osgi.bundle; net.sourceforge.plantuml.eclipse.imagecontrol 1.1.24.qualifier' but it could not be found
        
        The strange thing is that the missing dependency is to one of the plugins (net.sourceforge.plantuml.eclipse.imagecontrol) in the same build that resolved correctly during compilation. The build output for that plugin seems ok. There are no other dependency errors, I'm not sure how or if it would be reported if net.sourceforge.plantuml.eclipse.imagecontrol missed some dependencies. That imagecontrol plugin mainly depends on swt and jface, but as mentioned there are no messages about missing (transitive) dependencies. BTW, I have a dependency in the pom to the eclipse-feature org.eclipse.e4.rcp, but there is no reference to it in the build output.
        
        I've read the release notes for 1.4 and 1.5, and didn't see anything that should break the existing setup. I'm clueless to what to do, any suggestions?
        
        Regards,
        
        Hallvard
        ---
        Hallvard Trætteberg (hal@xxxxxxxxxxx)
        
        Associate Professor, ISSE group, Dept. of Computer Science at the 
        
        Norwegian University of Science and Technology
        
        _______________________________________________
        tycho-user mailing list
        tycho-user@xxxxxxxxxxx
        To change your delivery options, retrieve your password, or unsubscribe from this list, visit
        https://www.eclipse.org/mailman/listinfo/tycho-user
    
    


Back to the top