Results 1 to 4 of 4
  1. #1
    pvip is offline Member
    Join Date
    Apr 2015
    Posts
    2
    Rep Power
    0

    Default Eclipse e4 RCP maven tycho -> Cannot resolve project dependencies

    Hi,

    I have created an Eclipse e4 RCP Plugin project with a product specification and some plug-in's.

    Now I have defined some pom files for the target,parent and build definition using Tycho and included all modules to my build process.
    This is working well and compiles/created the final product.

    Some of the defined plugins in the "main" plugin.xml file are marked as 'optional'.
    These plugins are not required for the core functionality. They contribute some menu items and implement the handlers itself.
    Also I have removed them from the product file!

    If I want to exclude some modules (which are marked as optional) tycho throws an excption that 'Cannot resolve project dependencies'.
    The missing modules/plugins aren't needed for the compilation and the only reference is the 'optional' marked listing in the plugin.xml

    I do not know what I am doing wrong

    Any ideas?

    Thanks

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Eclipse e4 RCP maven tycho -> Cannot resolve project dependencies

    Its not like anyone here can look at your setup, configuration files and the steps you take to do this. I don't know what kind of help you expect people to be able to give you.

    Start by actually explaining HOW you exclude the optional modules. What do you do?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    pvip is offline Member
    Join Date
    Apr 2015
    Posts
    2
    Rep Power
    0

    Default Re: Eclipse e4 RCP maven tycho -> Cannot resolve project dependencies

    Yes your right but it is difficult to hide all company specific parts.

    Here is my root pom file
    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <project
    	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    
    	<modelVersion>4.0.0</modelVersion>
    
    	<groupId>xx.yy.e4</groupId>
    	<artifactId>xx.yy.e4.zz.parent</artifactId>
    	<version>0.0.1-SNAPSHOT</version>
    	<packaging>pom</packaging>
    	<name>PARENT</name>
    
    	<properties>
    		<tycho.version>0.22.0</tycho.version>
    		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    	</properties>
    	
    	<modules>
    		<module>application/xx.yy.e4.zz.core/platform/pom.xml</module>
    		<module>application/xx.yy.e4.zz.core/pom.xml</module>
    		<module>application/xx.yy.e4.zz.entity/pom.xml</module>
    		<module>application/xx.yy.e4.zz.log/pom.xml</module>
    		<module>application/xx.yy.e4.zz.import/pom.xml</module>
    		<module>application/xx.yy.e4.zz.customer/pom.xml</module>
    		<module>application/xx.yy.e4.zz.diagnosis/pom.xml</module>
    		<module>application/pom.xml</module>
    	</modules>
    	
    	<build>
    	
    		<plugins>
    
    			<plugin>
    				<groupId>org.eclipse.tycho</groupId>
    				<artifactId>tycho-maven-plugin</artifactId>
    				<version>${tycho.version}</version>
    				<extensions>true</extensions>
    			</plugin>
    
    			<plugin>
    
    				<groupId>org.eclipse.tycho</groupId>
    				<artifactId>target-platform-configuration</artifactId>
    				<version>${tycho.version}</version>
    
    				<configuration>
    				
    					<target> 
    						<artifact> 
    							<groupId>xx.yy.e4</groupId> 
    							<artifactId>xx.yy.e4.zz.target</artifactId> 
    							<version>0.0.1-SNAPSHOT</version>
    							<classifier>zz</classifier> 
    						</artifact> 
    					</target>
    					
    					<environments>
    						<environment>
    						  <os>win32</os>
    						  <ws>win32</ws>
    						  <arch>x86_64</arch>
    						</environment>
    					</environments>
    					
    				</configuration>
    
    			</plugin>
    
    		</plugins>
    		
    	</build>
    
    </project>
    This is working

    Now if I remove some optional dependencies

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <project
    	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    
    	<modelVersion>4.0.0</modelVersion>
    
    	<groupId>xx.yy.e4</groupId>
    	<artifactId>xx.yy.e4.zz.parent</artifactId>
    	<version>0.0.1-SNAPSHOT</version>
    	<packaging>pom</packaging>
    	<name>PARENT</name>
    
    	<properties>
    		<tycho.version>0.22.0</tycho.version>
    		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    	</properties>
    
    	<modules>
    		<module>application/xx.yy.e4.zz.core/platform/pom.xml</module>
    		<module>application/xx.yy.e4.zz.core/pom.xml</module>
    		<module>application/xx.yy.e4.zz.entity/pom.xml</module>
    		<module>application/pom.xml</module>
    	</modules>
    	
    	<build>
    	
    		<plugins>
    
    			<plugin>
    				<groupId>org.eclipse.tycho</groupId>
    				<artifactId>tycho-maven-plugin</artifactId>
    				<version>${tycho.version}</version>
    				<extensions>true</extensions>
    			</plugin>
    
    			<plugin>
    
    				<groupId>org.eclipse.tycho</groupId>
    				<artifactId>target-platform-configuration</artifactId>
    				<version>${tycho.version}</version>
    
    				<configuration>
    				
    					<target> 
    						<artifact> 
    							<groupId>xx.yy.e4</groupId> 
    							<artifactId>xx.yy.e4.zz.target</artifactId> 
    							<version>0.0.1-SNAPSHOT</version>
    							<classifier>zz</classifier> 
    						</artifact> 
    					</target>
    					
    					<environments>
    						<environment>
    						  <os>win32</os>
    						  <ws>win32</ws>
    						  <arch>x86_64</arch>
    						</environment>
    					</environments>
    					
    				</configuration>
    
    			</plugin>
    
    		</plugins>
    		
    	</build>
    
    </project>
    The build fails with the exception "Cannot resolve project dependencies 'xx.yy.e4.zz.log'" and this plugin is marked as optional, also it is not included in the current .product file.
    Last edited by pvip; 04-22-2015 at 04:31 PM.

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Eclipse e4 RCP maven tycho -> Cannot resolve project dependencies

    It may be optional to the dependency, apparently it is not optional according to whatever pom files are in play here. Rather than remove the dependencies entirely, just put them in scope "provided" so they do not end up in the deployed artifact.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Could not resolve dependencies for project
    By labros in forum Apache Maven
    Replies: 0
    Last Post: 10-19-2014, 12:09 PM
  2. Issue while creating new Maven project in eclipse
    By csinha032414 in forum Apache Maven
    Replies: 3
    Last Post: 09-19-2014, 03:18 PM
  3. Parent Project Not getting maven dependencies
    By roxy1987 in forum Apache Maven
    Replies: 3
    Last Post: 08-08-2013, 09:06 AM
  4. Replies: 1
    Last Post: 04-23-2013, 04:56 PM
  5. Replies: 0
    Last Post: 04-20-2009, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •