Community
Participate
Working Groups
Currently we may only host one target file within an eclipse-target-definition project named <artifact>.target If we need multiple targets for builds, we need to create a new project per target platform. I would opt to add a <file> parameter to the target-platform-configuration to allow for multiple target files hosted in the same project: <artifactId>target-platform-configuration</artifactId> <version>${tycho.version}</version> <configuration> <target> <artifact> <groupId>...</groupId> <artifactId>org.eclipse.project.target</artifactId> <version>1.0.0-SNAPSHOT</version> <file>alternate.target</file> </artifact> </target> </configuration> Without parameter we could default to <artifact>.target. But now we could use maven profiles to easily switch to another target platform without creating numerous projects.
maven artifacts are referenced as groupId, artifactId, version coordinates; there is no "file" coordinate. The filename is derived from the coordinates. However there is an optional fourth "classifier" coordinate (the main artifact has no classifier). Generally the idea with maven is that one GAV creates one (main) artifact. We could think about allowing additional targets with classifiers for the same GAV but there should always be one main target artifact (without classifier).
(In reply to Jan Sievers from comment #1) > We could think about allowing additional targets with classifiers for the > same GAV but there should always be one main target artifact (without > classifier). It is a convenience topic only. I see projects building against different targets like luna, mars, indigo. A nightly build might want to refer to other nightly update sites. I see projects creating their target definitions on the fly on hudson, or copy around files to get the filname right for tycho to pick it up. So if a classifier could help to make this work I would be more than happy. I also remember that prior to tycho 0.15(?) there were classifiers involved, right?
> So if a classifier could help to make this work I would be more than happy. > I also remember that prior to tycho 0.15(?) there were classifiers involved, > right? yes there was no explicit packaging type and people used to attach target artifacts using build-helper-maven-plugin using classifiers
I'll investigate this
I imagine using build-helper-maven-plugin to attach some extra .target file artifacts to a given GAV is still working. In such case, I don't think we should add extra complexity in Tycho for something that has a relatively standard solution in plain Maven.
I think attach another target as classifier is just the half way (it is marked in code as only backward-compat any ways) and would require to modify the pom each time a new target is present, also with pomless-build it can't be really used. Currently there is also a limitation that the target file must be named like the artifact-id that requires people to rename the file even if there is no doubt because there is only one target present. Because of this I have adjusted the bug-title a little bit and will provide a solution that has the following properties: - the target-packaging install all targets found in the root with the "primary artifact" as the artifact and all other files as additional artifacts with classifier - if multiple targets are there to install, there must be one target named like the artifactId that is choosen as the "primary artifact" - if only one target is present, it will be picked up as "primary artifact" regardless of the name of the target file - using classifiers will become first-class supported (backward notice removed)
> - the target-packaging install all targets found in the root with the > "primary artifact" as the artifact and all other files as additional > artifacts with classifier > - if multiple targets are there to install, there must be one target named > like the artifactId that is choosen as the "primary artifact" > - if only one target is present, it will be picked up as "primary artifact" > regardless of the name of the target file > - using classifiers will become first-class supported (backward notice > removed) All that sound very safe and useful; I tink this would be a good addition.
New Gerrit change created: https://git.eclipse.org/r/c/tycho/org.eclipse.tycho/+/166029
Gerrit change https://git.eclipse.org/r/c/tycho/org.eclipse.tycho/+/166029 was merged to [master]. Commit: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=6c3f7d6d7ee30fc4253b1180ae2c42f97c8fda34
https://wiki.eclipse.org/Tycho/Release_Notes/2.0#Support_for_multiple_targets_selected_by_classifier
New Gerrit change created: https://git.eclipse.org/r/c/tycho/org.eclipse.tycho/+/166149
Gerrit change https://git.eclipse.org/r/c/tycho/org.eclipse.tycho/+/166149 was merged to [master]. Commit: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=d8ec38051733220b437e19556ba6df8260fca618