You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Boyles (Jira)" <ji...@apache.org> on 2020/10/17 15:53:00 UTC
[jira] [Commented] (MNG-6345) Support profile activation via script
[ https://issues.apache.org/jira/browse/MNG-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17215926#comment-17215926 ]
Michael Boyles commented on MNG-6345:
-------------------------------------
IMO this is not worth the effort to implement and maintain. For this to be reproducible, maven would need to bundle an interpreter for all supported scripting languages presumably.
You can just write a custom build script, something like
{code:java}
node ./my-script.js
if [ $? -eq 0 ]; then profile="abc"; else profile="def"; fi
mvn verify -P${profile}
{code}
> Support profile activation via script
> -------------------------------------
>
> Key: MNG-6345
> URL: https://issues.apache.org/jira/browse/MNG-6345
> Project: Maven
> Issue Type: New Feature
> Components: Bootstrap & Build
> Affects Versions: 3.5.2
> Reporter: Andrei Pozolotin
> Priority: Major
>
> Please consider introduction of new profile activation method: "script".
> Here is working prototype which adds required functionality via PropertyActivator:
> [https://github.com/random-maven/profile-activator-extension]
> in the final form, this feature usage will look like:
> <profile>
> <activation>
> <script>
> <type>javascript</type>
> <code>print("hello-maven"); return true;</code>
> </script>
> <activation>
> </profile>
> Suggested minimal supported script types:
> * Groovy
> * JavaScript
> * MVEL Script
--
This message was sent by Atlassian Jira
(v8.3.4#803005)