exist icon indicating copy to clipboard operation
exist copied to clipboard

[feature] provide maven profiles for specific use-cases

Open line-o opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe.

When building existdb locally, I just want it to create the directory containing the built application. exist-distribution/target/exist-distribution-*-dir This is all that is needed in order to start the database from command line.

The command I use is:

mvn -T2C clean package -DskipTests -Ddependency-check.skip=true -Ddocker=false -P \!build-dist-archives,\!mac-dmg-on-mac,\!codesign-mac-dmg,\!mac-dmg-on-unix,\!installer,\!concurrency-stress-tests,\!micro-benchmarks

The amount of profiles that are on by default and therefore need to be disabled is hard to memoize. I created an alias for that to not have to.

Describe the solution you'd like

I would like to see a local build to skip all the unnecessary steps with mvn clean package -P local-build.

  • docker should default to false
  • tests should be able to run on the command line of a development machine
  • all of the following profiles should be not run by default:
    • build-dist-archives
    • mac-dmg-on-mac
    • codesign-mac-dmg
    • mac-dmg-on-unix
    • installer
    • concurrency-stress-tests
    • micro-benchmarks

For other use cases like building on travis there should be a specific profile that enables all the sub-profiles or tasks necessary. One for travis would be mvn package -P ci-build.

That way additional steps can easily run when requested by adding them to the -P parameter.

Describe alternatives you've considered

As mentioned above, the current workaround is creating an alias for the long command. Downsides are: it has to be done for each dev / development machine. Changes are not propagated. Harder to document (it is not properly yet). It is also less flexible, because flags and profiles are harder to re-enable for single runs.

line-o avatar Apr 27 '20 08:04 line-o