maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Jira)" <j...@apache.org>
Subject [jira] [Commented] (MNG-7189) Remove undocumented environment variable MAVEN_BASEDIR in startup scripts
Date Wed, 28 Jul 2021 19:54:00 GMT

    [ https://issues.apache.org/jira/browse/MNG-7189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17389016#comment-17389016
] 

Hudson commented on MNG-7189:
-----------------------------

Build succeeded in Jenkins: Maven » Maven TLP » maven » MNG-6829 #27

See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/MNG-6829/27/

> Remove undocumented environment variable MAVEN_BASEDIR in startup scripts
> -------------------------------------------------------------------------
>
>                 Key: MNG-7189
>                 URL: https://issues.apache.org/jira/browse/MNG-7189
>             Project: Maven
>          Issue Type: Task
>          Components: Command Line, Documentation:  General
>    Affects Versions: 4.0.0-alpha-1
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 4.0.0, 4.0.0-alpha-1
>
>
> During a review I have found this:
> {noformat}
> MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir "$@"`}"
> {noformat}
> and
> {noformat}
> set "MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%"
> if not "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
> {noformat}
> I was about to remove it until I have found:
> {noformat}
> $ grep -r MAVEN_BASEDIR .
> ./core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java:  
     envVars.put( "MAVEN_BASEDIR", testDir.getAbsolutePath() );
> ./core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java:  
     envVars.put( "MAVEN_BASEDIR", testDir.getAbsolutePath() );
> ./core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java:  
     envVars.put( "MAVEN_BASEDIR", testDir.getAbsolutePath() );
> ./core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java:  
     envVars.put( "MAVEN_BASEDIR", testDir.getAbsolutePath() );
> ./core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java:
       // It seems MAVEN_BASEDIR isn't always properly set, so make sure to have the right
value here
> ./core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java:
       envVars.put( "MAVEN_BASEDIR", testDir.getAbsolutePath() );
> ./environments/solaris-10-jdk7/apache-maven-3.3.9.patch:< MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-$(find_maven_basedir)}"
> ./environments/solaris-10-jdk7/apache-maven-3.3.9.patch:> MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir`}"
> ./environments/solaris-10-jdk8/apache-maven-3.3.9.patch:< MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-$(find_maven_basedir)}"
> ./environments/solaris-10-jdk8/apache-maven-3.3.9.patch:> MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir`}"
> {noformat}
> It is not clear why this variable is there and and why it is necessary. There are several
ways to resolve this issue:
> * Remove it and rely on basedir discovery in scripts
> * Document it officially in the prolog of the scripts
> * Inline document them as private and used for testing purposes only



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message