Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven Warning when using jdt.apt on Tycho Pomless build #2911

Closed
Waschndolos opened this issue Oct 12, 2023 · 1 comment
Closed

Maven Warning when using jdt.apt on Tycho Pomless build #2911

Waschndolos opened this issue Oct 12, 2023 · 1 comment

Comments

@Waschndolos
Copy link

We're currently trying to update to the latest tycho version 4.0.3, comming from 2.0.5 on a huge project. We're getting the following Maven warning for a lot of plugins:

[WARNING] Some problems were encountered while building the effective model for x.y:z:eclipse-plugin:<version>
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing.
[WARNING]

The affected plugins have the following prefs file:

<plugin_root>/.settings/org.eclipse.jdt.apt.core.prefs

eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
[...]

Guess the warning comes from the code at org.eclipse.tycho.pomless.TychoBundleMapping#addAdditionalFolders

buildHelperPlugin = getPlugin(model, "org.codehaus.mojo", "build-helper-maven-plugin");

The resulting .polyglot.META-INF is:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>x.y</groupId>
    <artifactId>plugins</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <relativePath>..\.polyglot.pom.tycho</relativePath>
  </parent>
  <artifactId>x.y.z</artifactId>
  <version>1.1.1</version>
  <packaging>eclipse-plugin</packaging>
  <name>[bundle] SomeName API</name>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>eclipse-classpath-add-source-1</id>
            <phase>initialize</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>.apt_generated</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Guess Maven complains here because the version is missing in the generated "pom". Is there a way to ignore the error or maybe add a version when generating the pom?

Tycho: 4.0.3
Maven: apache-maven-3.9.5
Java: 17.0.2

@laeubi
Copy link
Member

laeubi commented Oct 12, 2023

Is there a way to ignore the error or maybe add a version when generating the pom?

You can/should add a configuration of the desired (most of the time latest version) in your configuration pom (mostly in the root of your project tree).

@eclipse-tycho eclipse-tycho locked and limited conversation to collaborators Oct 12, 2023
@laeubi laeubi converted this issue into discussion #2912 Oct 12, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants