Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] POM-less target platforms

Be aware that ${project.version} does NOT resolve to the version of the (parent)pom file (1.0.0-SNAPSHOT) but to the version of the module!

As module versions in pomless build are derived from the Manifest, if you manifest has a version of 2.3.4, then ${project.version} will become 2.3.4 (the same is true for features).

Am 29.09.20 um 13:05 schrieb Gunnar Wagenknecht:
Hi,

I'm experimenting with POM-less target platforms ind Tycho 2.0:
https://wiki.eclipse.org/Tycho/pomless#Define_target_platform_configuration_pomless

I do have a targetpflatform.target file in a folder called "targetplaform". My understanding of the wiki page is that this should be sufficient.

I configured the target platform in the parent pom:

<project>
   <parent>
     <groupId>...</groupId>
     <artifactId>super-parent</artifactId>
     <version>1.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>i-am-parent</artifactId>
   <build>
     <plugins>
       <plugin>
         <groupId>org.eclipse.tycho</groupId>
         <artifactId>target-platform-configuration</artifactId>
         <configuration>
           <target>
             <artifact>
               <groupId>...</groupId>
               <artifactId>targetplatform</artifactId>
               <version>${project.version}</version>
             </artifact>
           </target>
         </configuration>
       </plugin>
     </plugins>
   </build>


The build is failing due to the missing target file.


Caused by: java.lang.RuntimeException: Could not resolve target platform specification artifact <groupid>:targetplatform:target:1.0.0
     at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.addTargetArtifact (DefaultTargetPlatformConfigurationReader.java:426)
     at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget (DefaultTargetPlatformConfigurationReader.java:367)
     at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration (DefaultTargetPlatformConfigurationReader.java:93)
     at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject (DefaultTychoResolver.java:97)
     at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:90)


If I replace ${project.version} with 1.0.0-SNAPSHOT (which is the project version inherited from parent) the build succeeds. Is something/someone dropping the SNAPSHOT part of ${project.version}?


-Gunnar



Back to the top