Skip to main content

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

Great, thanks Simon.

On Mon, Aug 6, 2012 at 12:49 PM, Simon Goodall <simon@xxxxxxxxxxxxxxxxxx> wrote:
Hi,

By attaching the target to the project it tells maven that the file
should be included during install/deploy phases of the project. This
also permits the .target file to be located and used from other
projects - i.e. via the clause in the target-platform-configuration
block.

Simon

On 6 August 2012 16:51, Craig Foote <craigfoote@xxxxxxxxx> wrote:
> Thanks Simon, I don't (yet) have the build-helper-maven-plugin in my
> target-platform project. I'll try that tomorrow but I'm unsure as to why
> it's necessary when using target-platform-configuration. Shouldn't it just
> find the target it specifies by GAV? Why does the target need to be
> "attached" to the project, whatever that means :)
>
> Craig
>
>
>
> On 12-08-06 05:54 AM, Simon Goodall wrote:
>>
>> 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
>>>
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top