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

Build: Tycho Pomless and Maven Wrapper #287

Closed
Boereck opened this issue Dec 16, 2019 · 0 comments
Closed

Build: Tycho Pomless and Maven Wrapper #287

Boereck opened this issue Dec 16, 2019 · 0 comments

Comments

@Boereck
Copy link
Contributor

Boereck commented Dec 16, 2019

I am currently testing if we could use Tycho Pomless and the Maven Wrapper for the build of corrosion. I would love to get some opinions if this seems valid or if there are downsides I am missing and maybe someone can answer remaining questions.

Technologies

In the following sections I will briefly introduce the technologies and shortly discuss why these would be beneficial to use, what problems this may bring, and raise some questions.

Tycho Pomless

This maven plugin uses the polyglot-maven extension to use Eclipse metadata (MANIFEST.MF files etc.) to replace pom.xml files.

Advantages

  • Fewer "double bookkeeping" of version numbers in pom.xml files and Eclipse project metadata
  • Easier to add new plug-ins / features

Downsides

Several maven versions broke Tycho or the polyglot feature altogether in the past. Therefore guidance for committers and control in CI build is needed (see Maven Wrapper for possible solution).

Open Question

The org.eclipse.corrosion plugin currently uses the maven pom.xml file to download the rustup-init.sh file. However, other external resources are already checked into the repository (such as the TextMate grammar files). Would it be OK to simply place the file in the repository and remove the pom.xml file?

Maven Wrapper

The maven wrapper is a set of shell scripts and a small jar file that are placed in the repository that make sure a maven (in the correct version) is installed on a machine, so the build can run successfully. A maven command can be used to create the necessary files for a maven project.
This can be the solution to the maven version problems of Tycho Pomless: We always select a matching maven version for the chosen Tycho Pomless version.

Advantages

  • New committers do not need to install maven at all and do not have to care if the correct version is installed, the wrapper takes care of installing the needed version. This may be an advantage for "casual" contributions.
  • The CI build would always use the same maven version as the developers.
  • The maven version will always be the version compatible with the currently chosen Tycho Pomless version.

Downsides

  • Eclipse m2e does not support the maven wrapper. A build via wrapper is needed to get maven downloaded which can then be integrated via the properties. This is not strictly needed, provided the embedded maven or maven installed on the system is compatible with the
  • Using mvnw may be unfamiliar to some people, but if explained in the project documentation this should not be a big issue.

Open Questions

  • Do the maven wrapper files need a CQ before added to the repository? These files are only build time and not part of the final product, but I guess Apache 2.0 licensed files in the repository need a CQ?
  • Do we actually add the wrapper files, or only scripts to create the wrapper files? This would avoid creating a CQ and could be used as a fallback for users that do not have a compatible maven version installed. However, if this option is not regularly used, I fear the scripts may become out of date without committers noticing.

Current Prototype

In my fork, I currently switched all projects, except for the main plugin (do to the download as part of the pom) to Tycho Pomless. Some configuration had to be pulled to the root pom.xml file.
For the maven wrapper, I just included scripts for creating the maven wrapper files.

The current version of the prototype can be found here:
https://github.com/Boereck/corrosion/tree/pomless

UPDATE

I also created a version which completely gets rid of project pom.xml files, includes the rustup-init.sh file with the sources and includes the maven wrapper files in the repository:
https://github.com/Boereck/corrosion/tree/pomless_complete

I also created a CQ for the maven-wrapper in version 0.5.6:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

Boereck added a commit to Boereck/corrosion that referenced this issue Jan 7, 2020
… Wrapper

This change gets rid of most pom.xml files in Corrosion. This is done
by using the Tycho Pomless technology in it's latest version. Since
Tycho Pomless is somehow sensitive to different maven versions, the
maven wrapper technology is used. This allows users (even without a
maven installation) to always use the recommended maven version to build
Corrosion. Build instructions were updated accordingly.

The maven wrapper technology was approved via CQ 21342:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

The added rustup-init.sh file was previously downloaded as part of the
build and was already approved via CQ 21017:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21017


Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
Boereck added a commit to Boereck/corrosion that referenced this issue Jan 8, 2020
… Wrapper

This change gets rid of most pom.xml files in Corrosion. This is done
by using the Tycho Pomless technology in it's latest version. Since
Tycho Pomless is somehow sensitive to different maven versions, the
maven wrapper technology is used. This allows users (even without a
maven installation) to always use the recommended maven version to build
Corrosion. Build instructions were updated accordingly.

The maven wrapper technology was approved via CQ 21342:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

The added rustup-init.sh file was previously downloaded as part of the
build and was already approved via CQ 21017:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21017

Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
Boereck added a commit to Boereck/corrosion that referenced this issue Jan 8, 2020
… Wrapper

This change gets rid of most pom.xml files in Corrosion. This is done
by using the Tycho Pomless technology in it's latest version. Since
Tycho Pomless is somehow sensitive to different maven versions, the
maven wrapper technology is used. This allows users (even without a
maven installation) to always use the recommended maven version to build
Corrosion. Build instructions were updated accordingly.

The maven wrapper technology was approved via CQ 21342:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

The added rustup-init.sh file was previously downloaded as part of the
build and was already approved via CQ 21017:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21017

Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
Boereck added a commit to Boereck/corrosion that referenced this issue Jan 8, 2020
… Wrapper

This change gets rid of most pom.xml files in Corrosion. This is done
by using the Tycho Pomless technology in it's latest version. Since
Tycho Pomless is somehow sensitive to different maven versions, the
maven wrapper technology is used. This allows users (even without a
maven installation) to always use the recommended maven version to build
Corrosion. Build instructions were updated accordingly.

The maven wrapper technology was approved via CQ 21342:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

The added rustup-init.sh file was previously downloaded as part of the
build and was already approved via CQ 21017:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21017

Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
Boereck added a commit to Boereck/corrosion that referenced this issue Jan 8, 2020
… Wrapper

This change gets rid of most pom.xml files in Corrosion. This is done
by using the Tycho Pomless technology in it's latest version. Since
Tycho Pomless is somehow sensitive to different maven versions, the
maven wrapper technology is used. This allows users (even without a
maven installation) to always use the recommended maven version to build
Corrosion. Build instructions were updated accordingly.

The maven wrapper technology was approved via CQ 21342:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

The added rustup-init.sh file was previously downloaded as part of the
build and was already approved via CQ 21017:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21017

Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
Boereck added a commit to Boereck/corrosion that referenced this issue Jan 8, 2020
… Wrapper

This change gets rid of most pom.xml files in Corrosion. This is done
by using the Tycho Pomless technology in it's latest version. Since
Tycho Pomless is somehow sensitive to different maven versions, the
maven wrapper technology is used. This allows users (even without a
maven installation) to always use the recommended maven version to build
Corrosion. Build instructions were updated accordingly.

The maven wrapper technology was approved via CQ 21342:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

The added rustup-init.sh file was previously downloaded as part of the
build and was already approved via CQ 21017:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21017

Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
Boereck added a commit that referenced this issue Jan 8, 2020
This change gets rid of most pom.xml files in Corrosion. This is done
by using the Tycho Pomless technology in it's latest version. Since
Tycho Pomless is somehow sensitive to different maven versions, the
maven wrapper technology is used. This allows users (even without a
maven installation) to always use the recommended maven version to build
Corrosion. Build instructions were updated accordingly.

The maven wrapper technology was approved via CQ 21342:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21342

The added rustup-init.sh file was previously downloaded as part of the
build and was already approved via CQ 21017:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21017

Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
@Boereck Boereck closed this as completed Jan 8, 2020
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

No branches or pull requests

1 participant