Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Configuration to use a target definition file and still being able to build individual bundles

On 14 Aug 2014, at 00:05, Lars Vogel <lars.vogel@xxxxxxxxx> wrote:

> Hi,
> 
> I'm would like to use a target definition file and still being able to build individual bundles. Currently this does not work for me.
> 
> Here is my setup:
> 
> Project T - Contains target definition file 
> Project parent - contains the configuration using T to define the target platform
> 
> <plugin>
> 	<groupId>org.eclipse.tycho</groupId>
> 		<artifactId>target-platform-configuration</artifactId>
> 		<version>${tycho.version}</version>
> 
> 		<configuration>
> 			<!-- This defines the target definition file -->
> 				<target>
> 					<artifact>
>                                                 <!-- This points to T  -->
> 						<groupId>com.vogella.tychoexample</groupId>
> 						<artifactId>com.vogella.build.targetdefinition</artifactId>
> 						<version>1.0.0-SNAPSHOT</version>
> 						</artifact>
> 					</target>
>                       </configuration>
> 		  </plugin>
> 
> Now I have Project A which uses Project parent as parent POM. If I run the build for A, T is not in the Maven reactor and Tycho cannot resolve the target definition. 
> 
> 
> Workaround: I can solve this with an aggregator project which lists all these projects as modules  but I would like to keep the ability to build my bundles individually. 
> 
> Any suggestions / examples how to use target platform definition files but still being able to build individual bundles?

If you have bundles that are unrelated to each other, then you can conditionally add the modules through a profile. However this probably won’t work if you have B->A and you only want to build B.

Something like this would work:

http://stackoverflow.com/questions/13381179/using-profiles-to-control-which-maven-modules-are-built

You can then invoke with mvn -Pone -Ptwo or you can have the profile enabled when a system property is set e.g. -Dui or -Dheadless

Alex

Back to the top