Skip to content

Commit

Permalink
Moved module specific exports, opens, and reads configuration from pa…
Browse files Browse the repository at this point in the history
…rent POM into specified module (#14663)
  • Loading branch information
alzimmermsft authored Sep 1, 2020
1 parent b9e2eb1 commit bf7b33c
Show file tree
Hide file tree
Showing 12 changed files with 230 additions and 66 deletions.
23 changes: 23 additions & 0 deletions sdk/appconfiguration/azure-data-appconfiguration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,27 @@
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.data.appconfiguration/com.azure.data.appconfiguration=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
26 changes: 26 additions & 0 deletions sdk/core/azure-core-amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,30 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.core.amqp/com.azure.core.amqp.implementation=ALL-UNNAMED
--add-opens com.azure.core.amqp/com.azure.core.amqp.implementation.handler=ALL-UNNAMED

--add-reads com.azure.core.amqp=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 2 additions & 0 deletions sdk/core/azure-core-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@
<argLine>
--add-exports org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED
--add-exports org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED

--add-reads com.azure.core.test=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
Expand Down
19 changes: 11 additions & 8 deletions sdk/core/azure-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,22 +200,25 @@
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
<!-- JUnit5 and Mockito use reflection to create objects. -->
--add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.serializer.jackson=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED

--add-opens com.azure.core/com.azure.core=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.http=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.http.policy=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.http.rest=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.models.spatial=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.implementation.entities=com.fasterxml.jackson.databind
--add-opens com.azure.core/com.azure.core.implementation.entities=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util.logging=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util.polling=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util.serializer=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED

<!-- Azure-core needs to open the test entities to Jackson for unit tests to operate -->
--add-opens com.azure.core/com.azure.core.implementation.entities=com.fasterxml.jackson.databind
--add-opens com.azure.core/com.azure.core.implementation.entities=ALL-UNNAMED
--add-reads com.azure.core=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
Expand Down
29 changes: 29 additions & 0 deletions sdk/cosmos/azure-cosmos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -496,5 +496,34 @@ Licensed under the MIT License.
</plugins>
</build>
</profile>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.cosmos/com.azure.cosmos=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.caches=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.http=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.directconnectivity=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.query=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.routing=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.models=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.rx=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.rx.proxy=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,28 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.messaging.eventhubs.checkpointstore.blob/com.azure.messaging.eventhubs.checkpointstore.blob=ALL-UNNAMED

--add-reads com.azure.messaging.eventhubs=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
23 changes: 23 additions & 0 deletions sdk/formrecognizer/azure-ai-formrecognizer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,27 @@
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.ai.formrecognizer/com.azure.ai.formrecognizer=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
23 changes: 23 additions & 0 deletions sdk/keyvault/azure-security-keyvault-certificates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,27 @@
</dependency>

</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.security.keyvault.certificates/com.azure.security.keyvault.certificates=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
23 changes: 23 additions & 0 deletions sdk/keyvault/azure-security-keyvault-keys/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,27 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys=ALL-UNNAMED
--add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys.cryptography=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
22 changes: 22 additions & 0 deletions sdk/keyvault/azure-security-keyvault-secrets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,26 @@

</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.security.keyvault.secrets/com.azure.security.keyvault.secrets=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
58 changes: 0 additions & 58 deletions sdk/parents/azure-client-sdk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1085,64 +1085,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
<!-- KeyVault tests fail without these exports. -->
--add-exports com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.serializer.jackson=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED

<!-- Needed for JUnit offline instrumentation -->
--add-reads com.azure.core=ALL-UNNAMED
--add-reads com.azure.core.test=ALL-UNNAMED
--add-reads com.azure.core.amqp=ALL-UNNAMED

<!-- JUnit5 and Mockito use reflection to create objects. -->

--add-opens com.azure.core/com.azure.core=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.http.rest=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util.logging=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util.polling=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util.serializer=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.http=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.http.policy=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.http.rest=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.util=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
--add-opens com.azure.core/com.azure.core.implementation.serializer=ALL-UNNAMED
--add-opens com.azure.ai.formrecognizer/com.azure.ai.formrecognizer=ALL-UNNAMED
--add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics=ALL-UNNAMED
--add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics.implementation.models=com.azure.core
--add-opens com.azure.data.appconfiguration/com.azure.data.appconfiguration=ALL-UNNAMED
--add-opens com.azure.security.keyvault.certificates/com.azure.security.keyvault.certificates=ALL-UNNAMED
--add-opens com.azure.security.keyvault.secrets/com.azure.security.keyvault.secrets=ALL-UNNAMED
--add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys.cryptography=ALL-UNNAMED
--add-opens com.azure.security.keyvault.keys/com.azure.security.keyvault.keys=ALL-UNNAMED

<!-- Cosmos module need this -->
--add-opens com.azure.cosmos/com.azure.cosmos=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.caches=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.http=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.directconnectivity=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.query=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.implementation.routing=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.models=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.rx=ALL-UNNAMED
--add-opens com.azure.cosmos/com.azure.cosmos.rx.proxy=ALL-UNNAMED

<!-- AMQP tests fail without this. ArgumentCaptor requires reflection. -->
--add-opens com.azure.core.amqp/com.azure.core.amqp.implementation=ALL-UNNAMED
--add-opens com.azure.core.amqp/com.azure.core.amqp.implementation.handler=ALL-UNNAMED

<!-- Checkpoint store tests fail without this -->
--add-opens com.azure.messaging.eventhubs.checkpointstore.blob/com.azure.messaging.eventhubs.checkpointstore.blob=ALL-UNNAMED
--add-reads com.azure.messaging.eventhubs=ALL-UNNAMED

<!-- Azure-core needs to open the test entities to Jackson for unit tests to operate -->
--add-opens com.azure.core/com.azure.core.implementation.entities=com.fasterxml.jackson.databind
--add-opens com.azure.core/com.azure.core.implementation.entities=ALL-UNNAMED
</argLine>
<systemPropertyVariables>
<jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
Expand Down
24 changes: 24 additions & 0 deletions sdk/textanalytics/azure-ai-textanalytics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,28 @@
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics=ALL-UNNAMED
--add-opens com.azure.ai.textanalytics/com.azure.ai.textanalytics.implementation.models=com.azure.core
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit bf7b33c

Please sign in to comment.