Skip to content
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

Headless examples needs updating #163

Open
agentgt opened this issue Aug 17, 2023 · 2 comments
Open

Headless examples needs updating #163

agentgt opened this issue Aug 17, 2023 · 2 comments

Comments

@agentgt
Copy link

agentgt commented Aug 17, 2023

I could not get the tycho compiler version to work at all.

This is for others but this works for me:

    <profile>
      <id>eclipse</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <compilerId>eclipse</compilerId>
              <!-- 
              You need to use compilerArguments here instead of compilerArgs despite it being deprecated 
              -->
              <compilerArguments>
                <properties>${parent.root}/etc/eea/prefs/org.eclipse.jdt.core.prefs</properties>
                <!-- Apparently CLASSPATH is the only one that works -->
                <annotationpath>CLASSPATH</annotationpath>
                <!-- Because classpath is the only that works we add our eea directory to it -->
                <classpath>${parent.root}/etc/eea</classpath>
              </compilerArguments>
              <showWarnings>true</showWarnings>
              <showDeprecation>true</showDeprecation>
              <failOnWarning>true</failOnWarning>
              <failOnError>true</failOnError>
            </configuration>
            <!-- 
            Maven will try patch in modules for unit test which breaks the eclipse compiler
            Fatal error compiling: Failed to run the ecj compiler: Unrecognized option : patch-module
            The patch module above has two hyphens in front of it.
            -->
            <executions>
              <execution>
                <id>default-testCompile</id>
                <phase>none</phase>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-compiler-eclipse</artifactId>
                <version>2.13.0</version>
              </dependency>
              <dependency>
                <groupId>org.eclipse.jdt</groupId>
                <artifactId>ecj</artifactId>
                <version>3.34.0</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>

I don't use lastnpe augmented annotation jar but my own copy. I just copy all the annotations to new projects. Yes that sucks but it is easier to augment it.

@sebthom
Copy link
Member

sebthom commented Sep 30, 2024

The tycho compiler works, except for projects using the maven-toolchains-plugin.

@agentgt
Copy link
Author

agentgt commented Sep 30, 2024

Yes I will revisit this tomorrow.

I’m not sure of the current status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants