[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] target-platform-configuration question

Hi,

I tend to have my projects structured something like this;

parent
  -- target-definition
  -- bundle-a
  -- bundle-b
  -- etc...


My target definition is in a project called "target-definition". This
is a plain pom packaging project with the following build block;

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<id>attach-artifacts</id>
						<phase>package</phase>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>targetFileNameWithoutExtension.target</file>
									<type>target</type>
									<classifier>targetFileNameWithoutExtension</classifier>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	
This hooks the target into the build process. It also means that this
can be deployed to a maven repository and referenced later. My parent
pom has target-definition listed as the first module and the
target-platform-configuration block as defined in the link you
referenced.

Now I can either build the full project from the parent directory - or
if I have previously installed or deployed the full projects I can
step down into the child modules and build them individually still
using my target definition. In these cases the .target file will be
obtained from the maven repository.

HTH.

Simon

On 3 August 2012 21:22, Craig Foote <craigfoote@xxxxxxxxx> wrote:
> Hi, I have several tycho projects each using target-platform-configuration
> to specify its own dedicated project with a .target file. I want to
> consolidate the targets and modify all the old references to the new
> location. Following
> http://wiki.eclipse.org/Tycho/Target_Platform#Target_files, I've set the GAV
> to a parent project with the consolidated .target at its root but I'm
> getting the error "Could not resolve target platform specification
> artifact..." so I assume I'm specifying it wrong. What must be the
> relationship between a consuming project and the project holding the
> .target? Mine are siblings with the parent specified in the child using a
> relative path. The parent is of type "pom". Any ideas appreciated? I assumed
> the parent project is part of the reactor and so its content could be found
> - am I wrong?
>
> Craig
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user
>