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

[feature] provide maven profiles for specific use-cases #3394

Open
line-o opened this issue Apr 27, 2020 · 1 comment
Open

[feature] provide maven profiles for specific use-cases #3394

line-o opened this issue Apr 27, 2020 · 1 comment
Labels
enhancement new features, suggestions, etc.

Comments

@line-o
Copy link
Member

line-o commented Apr 27, 2020

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 line-o added the enhancement new features, suggestions, etc. label Apr 27, 2020
@line-o
Copy link
Member Author

line-o commented Apr 27, 2020

Maybe it is possible for the ci profile to have <interactiveMode>false</interactiveMode> set. That would eliminate the -B flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new features, suggestions, etc.
Projects
None yet
Development

No branches or pull requests

1 participant