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

Maven config templates #24997

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Conversation

OndroMih
Copy link
Contributor

This adds Maven config templates that can be used in .mvn/maven.config (see https://maven.apache.org/configure.html).

The idea is that people can copy and modify these templates in their .mvn/maven.config file, which wouldn't be versioned. Then it's easy to speed up the build by selecting the target artifact (uncomment that artifact in the maven.config file), as an alternative to #24534.

For example, instead of executing mvn clean install -Pfastest -pl 'org.glassfish.main.distributions:glassfish' -am -T4C on command line to build only the GlassFish Server distribution with the fasted profile, it's possible to copy .mvn/maven.config.template into .mvn/maven.config and uncomment the following:

-Pfastest
-T4C
-am
-pl
org.glassfish.main.distributions:glassfish

Then just execute mvn clean install to clean and build the GlassFish Server distribution. Or just mvn to build it without clean.

I think this is simpler and cleaner solution than which I proposed earlier in #24534. If this PR as merged, I'm going to close #24534.

In this PR, I also added the -Dcyclonedx.skip=true property to the fastest profile. The CycloneDX SBOM check, which is not necessary and slows down the build by a few seconds: https://cyclonedx.org/.

pom.xml Show resolved Hide resolved
@pzygielo pzygielo merged commit a08f12c into eclipse-ee4j:master Jun 23, 2024
2 checks passed
@dmatej dmatej added this to the 7.0.16 milestone Jul 4, 2024
@dmatej
Copy link
Contributor

dmatej commented Jul 4, 2024

The cyclonedx plugin produces files which are then deployed to maven central. So now the fastest profile must not be used to release the version. However for some reason the cyclonedx runs differently in master and in 8.0 and I don't like it too, we should spend some time with that.

@OndroMih
Copy link
Contributor Author

OndroMih commented Jul 7, 2024

I thought that the fastest profile was only for development, and the fast profile is used in CI. We can revert the change in the profile and move the property to maven.config template, would that be better

@arjantijms
Copy link
Contributor

The main build for the deployment to staging on the CI doesn't use the fast profile, it's:

mvn -U -B 
     -Poss-release,release-phase2 
     ${MVN_STAGING} 
     -DskipTests -DstagingProfileId=1c0c18a0fc339 -Ddoclint=none -Dmaven.javadoc.failOnError=false 
     clean deploy

@dmatej
Copy link
Contributor

dmatej commented Jul 7, 2024

@arjantijms Check the whole script, it is used. I did not read it line by line, but it is there. Soon we will have migrate from the nexus staging plugin, maybe that would be an opportunity to simplify and standardize things, all those bash scripts are quite hard to read (and reproduce issues locally).

@OndroMih OndroMih deleted the ondromih-maven-configs branch August 12, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants