[jira] [Comment Edited] (MNG-7202) settings.offline property not working
[ https://issues.apache.org/jira/browse/MNG-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731770#comment-17731770 ] Guillaume Nodet edited comment on MNG-7202 at 6/12/23 8:36 PM: --- This works perfectly well in my case. {code} ➜ maven ✗ mvn help:evaluate -Dexpression=settings.offline -N -q -DforceStdout -o true% {code} The [evaluator code|https://github.com/apache/maven/blob/22d2b47c04c8b14faf24954a1a903c210d40f58d/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java#L260] is using reflection to evaluate the property. was (Author: gnt): This works perfectly well in my case. {code} ➜ maven ✗ mvn help:evaluate -Dexpression=settings.offline -N -q -DforceStdout -o true% {code} > settings.offline property not working > - > > Key: MNG-7202 > URL: https://issues.apache.org/jira/browse/MNG-7202 > Project: Maven > Issue Type: Bug > Components: POM, Settings >Affects Versions: 3.8.1 > Environment: Debian 10.10, OpenJDK 11.0.12, Maven 3.8.1 >Reporter: AO Industries, Inc. >Priority: Minor > Attachments: pom.xml > > > The documentation cites ${settings.offline} as a means to determine if the > current build is offline: [https://maven.apache.org/settings.html#properties] > For the life of me, I cannot get anything from a ${settings.offline} property > in any way. ${settings.localRepository} works, though. > --- > I hope to use ${settings.offline} within a maven-antrun-plugin target to > avoid some WSDL GET requests when operating offline. > --- > Thank you. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (MNG-7202) settings.offline property not working
[ https://issues.apache.org/jira/browse/MNG-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390815#comment-17390815 ] AO Industries, Inc. edited comment on MNG-7202 at 7/31/21, 10:02 AM: - I added a demo pom.xml file showing the property not substituting. Invoke as "mvn verify" and "mvn -o verify" I have tried, and without any success: 1) --offline switch 2) -o switch 3) Adding false to settings.xml 4) Adding true to settings.xml It is worth noting that help:evaluate can see the property: mvn -o help:evaluate -Dexpression=settings.offline true mvn help:evaluate -Dexpression=settings.offline false was (Author: aoindustries): I added a demo pom.xml file showing the property not substituting. Invoke as "mvn verify" I have tried, and without any success: 1) --offline switch 2) -o switch 3) Adding false to settings.xml 4) Adding true to settings.xml It is worth noting that help:evaluate can see the property: mvn -o help:evaluate -Dexpression=settings.offline true mvn help:evaluate -Dexpression=settings.offline false > settings.offline property not working > - > > Key: MNG-7202 > URL: https://issues.apache.org/jira/browse/MNG-7202 > Project: Maven > Issue Type: Bug > Components: POM, Settings >Affects Versions: 3.8.1 > Environment: Debian 10.10, OpenJDK 11.0.12, Maven 3.8.1 >Reporter: AO Industries, Inc. >Priority: Minor > Attachments: pom.xml > > > The documentation cites ${settings.offline} as a means to determine if the > current build is offline: [https://maven.apache.org/settings.html#properties] > For the life of me, I cannot get anything from a ${settings.offline} property > in any way. ${settings.localRepository} works, though. > --- > I hope to use ${settings.offline} within a maven-antrun-plugin target to > avoid some WSDL GET requests when operating offline. > --- > Thank you. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (MNG-7202) settings.offline property not working
[ https://issues.apache.org/jira/browse/MNG-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390935#comment-17390935 ] AO Industries, Inc. edited comment on MNG-7202 at 7/31/21, 9:39 AM: The property does not work in general within Maven. The antrun is just my specific use-case where I want to use "settings.offline" property, and seemed like a good way to demonstrate the issue. My other use-case that is failing, not included in demo pom.xml, is to use ${settings.offline} for surefire plugin, which can skip tests that require networking. was (Author: aoindustries): The property does not work in general within Maven. The antrun is just my specific use-case where I want to use "settings.offline" property, and seemed like a good way to demonstrate the issue. My other use-case, not included in demo pom.xml, is to use ${settings.offline} for surefire plugin, which can skip tests that require networking. > settings.offline property not working > - > > Key: MNG-7202 > URL: https://issues.apache.org/jira/browse/MNG-7202 > Project: Maven > Issue Type: Bug > Components: POM, Settings >Affects Versions: 3.8.1 > Environment: Debian 10.10, OpenJDK 11.0.12, Maven 3.8.1 >Reporter: AO Industries, Inc. >Priority: Minor > Attachments: pom.xml > > > The documentation cites ${settings.offline} as a means to determine if the > current build is offline: [https://maven.apache.org/settings.html#properties] > For the life of me, I cannot get anything from a ${settings.offline} property > in any way. ${settings.localRepository} works, though. > --- > I hope to use ${settings.offline} within a maven-antrun-plugin target to > avoid some WSDL GET requests when operating offline. > --- > Thank you. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (MNG-7202) settings.offline property not working
[ https://issues.apache.org/jira/browse/MNG-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390825#comment-17390825 ] AO Industries, Inc. edited comment on MNG-7202 at 7/31/21, 12:11 AM: - I added an example of my workaround to the attached pom.xml. The workaround uses help:evaluate to write the settings.offline to a file, then uses a bit of Groovy to read the file back into a Maven property. The Maven property functions correctly passed on to the antrun plugin, and also works to disable tests. was (Author: aoindustries): I added an example of my workaround to the attached pom.xml. The workaround uses help:evaluate to the settings.offline to a file. Then uses a bit of Groovy to read the file back into a Maven property. The Maven property functions correctly passed on to the antrun plugin, and also works to disable tests. > settings.offline property not working > - > > Key: MNG-7202 > URL: https://issues.apache.org/jira/browse/MNG-7202 > Project: Maven > Issue Type: Bug > Components: POM, Settings >Affects Versions: 3.8.1 > Environment: Debian 10.10, OpenJDK 11.0.12, Maven 3.8.1 >Reporter: AO Industries, Inc. >Priority: Minor > Attachments: pom.xml > > > The documentation cites ${settings.offline} as a means to determine if the > current build is offline: [https://maven.apache.org/settings.html#properties] > For the life of me, I cannot get anything from a ${settings.offline} property > in any way. ${settings.localRepository} works, though. > --- > I hope to use ${settings.offline} within a maven-antrun-plugin target to > avoid some WSDL GET requests when operating offline. > --- > Thank you. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (MNG-7202) settings.offline property not working
[ https://issues.apache.org/jira/browse/MNG-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390823#comment-17390823 ] AO Industries, Inc. edited comment on MNG-7202 at 7/31/21, 12:10 AM: - I have set the issue priority to "Minor" since I was able to find a workaround. was (Author: aoindustries): I have set the issue priority to "Minor" since I was able to find a workaround. To workaround this issue, I used the "output" option of "help:evaluate" to store the result of "settings.offline" expression to a file. I then used Ant's loadfile task to pick-up the value. > settings.offline property not working > - > > Key: MNG-7202 > URL: https://issues.apache.org/jira/browse/MNG-7202 > Project: Maven > Issue Type: Bug > Components: POM, Settings >Affects Versions: 3.8.1 > Environment: Debian 10.10, OpenJDK 11.0.12, Maven 3.8.1 >Reporter: AO Industries, Inc. >Priority: Minor > Attachments: pom.xml > > > The documentation cites ${settings.offline} as a means to determine if the > current build is offline: [https://maven.apache.org/settings.html#properties] > For the life of me, I cannot get anything from a ${settings.offline} property > in any way. ${settings.localRepository} works, though. > --- > I hope to use ${settings.offline} within a maven-antrun-plugin target to > avoid some WSDL GET requests when operating offline. > --- > Thank you. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (MNG-7202) settings.offline property not working
[ https://issues.apache.org/jira/browse/MNG-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390815#comment-17390815 ] AO Industries, Inc. edited comment on MNG-7202 at 7/30/21, 11:04 PM: - I added a demo pom.xml file showing the property not substituting. Invoke as "mvn verify" I have tried, and without any success: 1) --offline switch 2) -o switch 3) Adding false to settings.xml 4) Adding true to settings.xml It is worth noting that help:evaluate can see the property: mvn -o help:evaluate -Dexpression=settings.offline true mvn help:evaluate -Dexpression=settings.offline false was (Author: aoindustries): I added a demo pom.xml file showing the property not substituting. I have tried, and without any success: 1) --offline switch 2) -o switch 3) Adding false to settings.xml 4) Adding true to settings.xml It is worth noting that help:evaluate can see the property: mvn -o help:evaluate -Dexpression=settings.offline true mvn help:evaluate -Dexpression=settings.offline false > settings.offline property not working > - > > Key: MNG-7202 > URL: https://issues.apache.org/jira/browse/MNG-7202 > Project: Maven > Issue Type: Bug > Components: POM, Settings >Affects Versions: 3.8.1 > Environment: Debian 10.10, OpenJDK 11.0.12, Maven 3.8.1 >Reporter: AO Industries, Inc. >Priority: Major > Attachments: pom.xml > > > The documentation cites ${settings.offline} as a means to determine if the > current build is offline: [https://maven.apache.org/settings.html#properties] > For the life of me, I cannot get anything from a ${settings.offline} property > in any way. ${settings.localRepository} works, though. > --- > I hope to use ${settings.offline} within a maven-antrun-plugin target to > avoid some WSDL GET requests when operating offline. > --- > Thank you. -- This message was sent by Atlassian Jira (v8.3.4#803005)