eXist-db / exist

eXist Native XML Database and Application Platform
https://exist-db.org
GNU Lesser General Public License v2.1
421 stars 179 forks source link

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

Open line-o opened 4 years ago

line-o commented 4 years ago

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.

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 commented 4 years ago

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