maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1378) Nice to have systemPropertiesFile configurable by user property
Date Mon, 09 Apr 2018 22:29:00 GMT

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

ASF GitHub Bot commented on SUREFIRE-1378:
------------------------------------------

Tibor17 commented on a change in pull request #152: [SUREFIRE-1378] Nice to have systemPropertiesFile
configurable by user property
URL: https://github.com/apache/maven-surefire/pull/152#discussion_r180249519
 
 

 ##########
 File path: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ##########
 @@ -1033,11 +1025,11 @@ private SurefireProperties setupProperties()
         SurefireProperties sysProps = null;
         try
         {
-            sysProps = SurefireProperties.loadProperties( systemPropertiesFile );
+            sysProps = SurefireProperties.loadProperties(getSystemPropertiesFile());
         }
         catch ( IOException e )
         {
-            String msg = "The system property file '" + systemPropertiesFile.getAbsolutePath()
+ "' can't be read.";
+            String msg = "The system property file '" + getSystemPropertiesFile().getAbsolutePath()
+ "' can't be read.";
 
 Review comment:
   `+` at new line

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Nice to have systemPropertiesFile configurable by user property
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-1378
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1378
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Failsafe Plugin, Maven Surefire Plugin
>            Reporter: Michal Domagala
>            Assignee: Tibor Digana
>            Priority: Minor
>
> I would like to have option to configure my tests with property files. But property file
is not required, because in 95% my tests work fine with default configuration.
> I used the following workaround: I configured failsafe plugin in the following way
> {code:xml}
> <properties>
>   <my.test.props.file></my.test.props.file>
> </properties>
> (...)
> <artifact>maven-failsafe-plugin</artifact>
> (...)
> <systemPropertiesFile>${my.test.props.file}</systemPropertiesFile>
> {code}
> In 95% I call *mvn verify*, systemPropertiesFile is not found and ignored -all pass
> In 5% I call *mvn verify -Dmy.test.props.file=x.props*
> The problem is in 95% I get warning about missing files. Also  configuration is unnecessary
complicated
> I would like drop whole connfiguration from pom.xml and use:
> In 95% *mvn verify*
> In 5% *mvn verify -Dfailsafe.systemPropertiesFile=x.props*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message