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

Import m2e-apt #579

Merged
merged 124 commits into from
Feb 17, 2022
Merged

Import m2e-apt #579

merged 124 commits into from
Feb 17, 2022

Conversation

mickaelistria
Copy link
Contributor

No description provided.

karlmdavis and others added 30 commits December 22, 2011 12:08
This initial commit is a standalone version of Karl M. Davis' patch for
m2e bug #335036 Support for annotation processing
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=335036)

Since we can't use the org.eclipse namespace in this release, the package
names and namespace have been renamed to org.jboss.tools.maven.apt.

The m2e-apt project can now produce a standalone eclipse update site
containing annotation processing support for m2e. Test are not included in
this initial commit.

This commit is a bit larger than Karl's initial patch, but the additions
are insignificant compared to Karl's work. That's why he's the author of
this commit.

Fred Bricon - JBoss by Red Hat

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
…ry path

Signed-off-by: Fred Bricon <fbricon@gmail.com>
A complete refactoring was undertaken to provide support for
org.bsc.maven:maven-processor-plugin :

- all classes were moved to an internal package as we can not guarantee a
  public API at this point.
- plugin dependencies are added to the factory path
- compile AND runtime dependencies are searched for / added to the factory
  path
- java nature is added if missing, as the APT configuration is triggered
  before the Java one, it needs to work with a Java project.
- unused code was removed (mostly marker management).

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Attempt to parse out annotation processor arguments from the
compilerArgument element of the maven compiler plugin.

The compilerArgument string is parsed looking for strings
that match the form -Akey[=value]

N.B. This method was cherry-picked from
jbosstools/m2e-apt#1
  - Fred

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Current commit contains "basic" UI to manage m2e-apt preferences. Some
classes where copied from JDT around PropertyAndPreferencePage
(copied to org.jboss.tools.maven.apt.ui.preferences.xpl). These classes
will probably be refactored / deleted in the (near) future.

Since I'm not too familiar with the Preferences API, Preferences
Management implementation is rather naive, there's certainly room in
for improvements in that area.

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
New complete refactoring to enable support for different annotation
processing strategies (I basically broke everything):
- New mode maven_execution corresponds to executing maven-processor-plugin
  as a build participant (code from
  https://github.com/excilys/m2e-extras/blob/40502d278f26a6beae07bcbed6ba7eed0a9226a6/com.excilys.ebi.m2e.apt/src/main/java/com/excilys/ebi/m2e/apt/internal/AptBuildParticipant.java)
- For some reason, executing maven-compiler-plugin with proc:only as part
  of a Build participant didn't pan out. That means the maven_execution
  mode is downgraded (or promoted?) to jdt_apt for  maven-compiler-plugin
- Generated source folders are automatically created in maven_execution
  mode (if annotation processing is detected) so the folders can be added
  to the project's classpath (no need to add some build-helper-maven-plugin
  configuration)

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
…ools.maven.apt.ui/plugin.properties; tweak build.properties for apt.ui plugin; tweak plugin.properties for apt.core plugin
updated patch to fix missing vendor and name for apt.ui and apt.core; also adjusts copyright dates/holders.
…ssorConfiguration()

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Turns out, adding all classpath dependency to the factory path is probably
too aggressive. Until we can resolve that, m2e-apt is disabled by default.

Related issue : https://issues.jboss.org/browse/JBIDE-12087

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Turns out tycho 0.14.1 didn't report eclipse crashes (du to org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]) as test failures, so BuildHive builds appeared OK when they were not.

Tycho 0.15.0 properly fails the build in that case.
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
fbricon and others added 18 commits November 6, 2019 15:12
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Leonid Rozenblyum <lrozenblyum@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
- CI builds on master are automatically published to https://jbosstools.github.io/m2e-apt/snapshots/
- Release builds require pushing a tag following the vVERSION format (eg. v1.5.4). Update sites will then be published to:
   * https://jbosstools.github.io/m2e-apt/latest/
   * https://jbosstools.github.io/m2e-apt/updates/VERSION

Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
@mickaelistria
Copy link
Contributor Author

Code was approved for a merge, so no need to wait for ECA. Merging (manually)

@mickaelistria mickaelistria merged commit 179edfd into eclipse-m2e:master Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider inclusion/migration of jbosstools/m2e-apt