Skip to content

Commit

Permalink
Use Custom Properties for Compile Skipping (Azure#26834)
Browse files Browse the repository at this point in the history
  • Loading branch information
alzimmermsft authored Feb 2, 2022
1 parent 1af4a46 commit 0b513f7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ jobs:
displayName: 'Run SpotBugs, Checkstyle, RevApi, and Javadoc'
inputs:
mavenPomFile: pom.xml
options: '$(DefaultOptions) --no-transfer-progress -DskipTests -Dgpg.skip -Dverify-readme -Dmaven.main.skip=true -Dmaven.test.skip=true ${{ parameters.AdditionalLintingOptions }} -pl $(ProjectList)'
options: '$(DefaultOptions) --no-transfer-progress -DskipTests -Dgpg.skip -Dverify-readme -DskipCompile=true -DskipTestCompile=true ${{ parameters.AdditionalLintingOptions }} -pl $(ProjectList)'
mavenOptions: '$(MemoryOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaBuildVersion)
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/stages/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"AZURE_TEST_HTTP_CLIENTS": "netty",
"TestFromSource": true,
"TestGoals": "verify",
"TestOptions": "-Dmaven.main.skip=true -Dmaven.test.skip=true -DcreateSourcesJar=false"
"TestOptions": "-DskipCompile=true -DskipTestCompile=true -DcreateSourcesJar=false"
},
{
"Agent": {
Expand All @@ -39,7 +39,7 @@
"AZURE_TEST_HTTP_CLIENTS": "netty",
"TestFromSource": false,
"TestGoals": "verify",
"TestOptions": "-Dmaven.main.skip=true -Dmaven.test.skip=true -DcreateSourcesJar=false"
"TestOptions": "-DskipCompile=true -DskipTestCompile=true -DcreateSourcesJar=false"
}
]
}
9 changes: 9 additions & 0 deletions sdk/parents/azure-client-sdk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@

<!-- This property configures whether doclinting is performed when generating Javadocs. -->
<doclint>all</doclint>

<!-- The following properties configure compile skipping. -->
<!-- While maven-compiler-plugin has properties for skipping source and test compile other plugins -->
<!-- key in on the properties as well. These properties ensure that skipping compiles doesn't result -->
<!-- in unexpected plugin changes outside of maven-compiler-plugin. -->
<skipCompile>false</skipCompile>
<skipTestCompile>false</skipTestCompile>
</properties>

<build>
Expand Down Expand Up @@ -509,6 +516,8 @@
<configuration>
<showWarnings>true</showWarnings>
<failOnWarning>true</failOnWarning>
<skipMain>${skipCompile}</skipMain>
<skip>${skipTestCompile}</skip>
<compilerArgs combine.children="append" combine.self="append">
<!-- Turn off annotation processing -->
<arg>-proc:none</arg>
Expand Down

0 comments on commit 0b513f7

Please sign in to comment.