[
https://issues.apache.org/jira/browse/SCM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17961279#comment-17961279
]
ASF GitHub Bot commented on SCM-386:
------------------------------------
jira-importer opened a new issue, #608:
URL: https://github.com/apache/maven-scm/issues/608
**[Leonid
Ilyevsky](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=lilyevsky)**
opened
**[SCM-386](https://issues.apache.org/jira/browse/SCM-386?redirect=false)** and
commented
When using scm:bootstrap, with goals to do after checkout:
mvn -Dgoals=compile scm:bootstrap
maven apparently spawns another process that will execute mvn command for
that goal. To set up the environment for the child process, it runs external
command (in case of Linux it is "env"), and tries to parse it, assuming that
every line of the output has "KEY=VALUE" format. However, when the environment
has shell functions in it, this logic fails.
I see two ways of fixing this.
1. Just fix the parsing logic.
Pros: this will be compatible with everything it is compatible today.
Cons: parsing logic will be essentially more complex, because you need to
figure out multiline functions definitions.
2. Use System.getEnv() to get the environment, make array of strings
containing "KEY=VALUE" expressions, and use it for the child process.
Pros: very clean and simple solution. I actually tested it, took 10
minutes to do.
Cons: System.getEnv() became available as of JDK 1.5. Seems like all
Maven2 is supposed to be compatible with JDK 1.4, this might be a problem.
---
No further details from
[SCM-386](https://issues.apache.org/jira/browse/SCM-386?redirect=false)
> SCM plugin fails on "bootstrap" goal when shell environment has functions
> definitions
> -------------------------------------------------------------------------------------
>
> Key: SCM-386
> URL: https://issues.apache.org/jira/browse/SCM-386
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-plugin
> Reporter: Leonid Ilyevsky
> Assignee: Siveton Vincent
> Priority: Major
> Fix For: 1.1
>
>
> When using scm:bootstrap, with goals to do after checkout:
> mvn -Dgoals=compile scm:bootstrap
> maven apparently spawns another process that will execute mvn command for
> that goal. To set up the environment for the child process, it runs external
> command (in case of Linux it is "env"), and tries to parse it, assuming that
> every line of the output has "KEY=VALUE" format. However, when the
> environment has shell functions in it, this logic fails.
> I see two ways of fixing this.
> 1. Just fix the parsing logic.
> Pros: this will be compatible with everything it is compatible today.
> Cons: parsing logic will be essentially more complex, because you need to
> figure out multiline functions definitions.
> 2. Use System.getEnv() to get the environment, make array of strings
> containing "KEY=VALUE" expressions, and use it for the child process.
> Pros: very clean and simple solution. I actually tested it, took 10 minutes
> to do.
> Cons: System.getEnv() became available as of JDK 1.5. Seems like all Maven2
> is supposed to be compatible with JDK 1.4, this might be a problem.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)