Skip to content

Commit e0a87e3

Browse files
swimardbaileychesspaulovap
authored
Update java pom.xml file to allow flatbuffers-java maven package to be compiled under java 8, and pulled in as a dependency to a project using java 8. (#7893) (#7894)
Co-authored-by: Derek Bailey <[email protected]> Co-authored-by: Paulo Pinheiro <[email protected]>
1 parent b67f1ad commit e0a87e3

File tree

1 file changed

+110
-86
lines changed

1 file changed

+110
-86
lines changed

java/pom.xml

Lines changed: 110 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,91 @@
5959
<build>
6060
<plugins>
6161
<plugin>
62-
<artifactId>maven-compiler-plugin</artifactId>
62+
<artifactId>maven-surefire-plugin</artifactId>
6363
<configuration>
64-
<release>8</release>
65-
<testExcludes>
66-
<testExclude>MyGame/Example/MonsterStorageGrpc.java</testExclude>
67-
<testExclude>MyGame/OtherNameSpace/TableBT.java</testExclude>
68-
</testExcludes>
64+
<includes>
65+
<include>**/*Test.java</include>
66+
</includes>
67+
</configuration>
68+
<version>2.22.2</version>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-source-plugin</artifactId>
73+
<version>3.2.1</version>
74+
<executions>
75+
<execution>
76+
<id>attach-sources</id>
77+
<goals>
78+
<goal>jar</goal>
79+
</goals>
80+
</execution>
81+
</executions>
82+
</plugin>
83+
<plugin>
84+
<groupId>org.apache.maven.plugins</groupId>
85+
<artifactId>maven-javadoc-plugin</artifactId>
86+
<version>3.3.0</version>
87+
<configuration>
88+
<additionalparam>-Xdoclint:none</additionalparam>
89+
<additionalOptions>-Xdoclint:none</additionalOptions>
90+
</configuration>
91+
<executions>
92+
<execution>
93+
<id>attach-javadocs</id>
94+
<goals>
95+
<goal>jar</goal>
96+
</goals>
97+
</execution>
98+
</executions>
99+
</plugin>
100+
<plugin>
101+
<groupId>org.apache.felix</groupId>
102+
<artifactId>maven-bundle-plugin</artifactId>
103+
<version>5.1.2</version>
104+
<extensions>true</extensions>
105+
</plugin>
106+
<plugin>
107+
<groupId>org.sonatype.plugins</groupId>
108+
<artifactId>nexus-staging-maven-plugin</artifactId>
109+
<version>1.6.8</version>
110+
<extensions>true</extensions>
111+
<configuration>
112+
<serverId>ossrh</serverId>
113+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
114+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
115+
</configuration>
116+
</plugin>
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-gpg-plugin</artifactId>
120+
<version>3.0.1</version>
121+
<executions>
122+
<execution>
123+
<id>sign-artifacts</id>
124+
<phase>verify</phase>
125+
<goals>
126+
<goal>sign</goal>
127+
</goals>
128+
<configuration>
129+
<gpgArguments>
130+
<arg>--pinentry-mode</arg>
131+
<arg>loopback</arg>
132+
</gpgArguments>
133+
</configuration>
134+
</execution>
135+
</executions>
136+
</plugin>
137+
<plugin>
138+
<groupId>org.apache.maven.plugins</groupId>
139+
<artifactId>maven-release-plugin</artifactId>
140+
<version>2.5.3</version>
141+
<configuration>
142+
<autoVersionSubmodules>true</autoVersionSubmodules>
143+
<useReleaseProfile>false</useReleaseProfile>
144+
<releaseProfiles>release</releaseProfiles>
145+
<goals>deploy</goals>
69146
</configuration>
70-
<version>3.8.1</version>
71147
</plugin>
72148
</plugins>
73149
</build>
@@ -80,91 +156,39 @@
80156
<build>
81157
<plugins>
82158
<plugin>
83-
<artifactId>maven-surefire-plugin</artifactId>
84-
<configuration>
85-
<includes>
86-
<include>**/*Test.java</include>
87-
</includes>
88-
</configuration>
89-
<version>2.22.2</version>
90-
</plugin>
91-
<plugin>
92-
<groupId>org.apache.maven.plugins</groupId>
93-
<artifactId>maven-source-plugin</artifactId>
94-
<version>3.2.1</version>
95-
<executions>
96-
<execution>
97-
<id>attach-sources</id>
98-
<goals>
99-
<goal>jar</goal>
100-
</goals>
101-
</execution>
102-
</executions>
103-
</plugin>
104-
<plugin>
105-
<groupId>org.apache.maven.plugins</groupId>
106-
<artifactId>maven-javadoc-plugin</artifactId>
107-
<version>3.3.0</version>
108-
<configuration>
109-
<additionalparam>-Xdoclint:none</additionalparam>
110-
<additionalOptions>-Xdoclint:none</additionalOptions>
111-
</configuration>
112-
<executions>
113-
<execution>
114-
<id>attach-javadocs</id>
115-
<goals>
116-
<goal>jar</goal>
117-
</goals>
118-
</execution>
119-
</executions>
120-
</plugin>
121-
<plugin>
122-
<groupId>org.apache.felix</groupId>
123-
<artifactId>maven-bundle-plugin</artifactId>
124-
<version>5.1.2</version>
125-
<extensions>true</extensions>
126-
</plugin>
127-
<plugin>
128-
<groupId>org.sonatype.plugins</groupId>
129-
<artifactId>nexus-staging-maven-plugin</artifactId>
130-
<version>1.6.8</version>
131-
<extensions>true</extensions>
159+
<artifactId>maven-compiler-plugin</artifactId>
132160
<configuration>
133-
<serverId>ossrh</serverId>
134-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
135-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
161+
<release>8</release>
162+
<testExcludes>
163+
<testExclude>MyGame/Example/MonsterStorageGrpc.java</testExclude>
164+
<testExclude>MyGame/OtherNameSpace/TableBT.java</testExclude>
165+
</testExcludes>
136166
</configuration>
167+
<version>3.8.1</version>
137168
</plugin>
169+
</plugins>
170+
</build>
171+
</profile>
172+
<profile>
173+
<id>jdk8</id>
174+
<activation>
175+
<jdk>1.8</jdk>
176+
</activation>
177+
<properties>
178+
<maven.compiler.target>8</maven.compiler.target>
179+
<maven.compiler.source>8</maven.compiler.source>
180+
</properties>
181+
<build>
182+
<plugins>
138183
<plugin>
139-
<groupId>org.apache.maven.plugins</groupId>
140-
<artifactId>maven-gpg-plugin</artifactId>
141-
<version>3.0.1</version>
142-
<executions>
143-
<execution>
144-
<id>sign-artifacts</id>
145-
<phase>verify</phase>
146-
<goals>
147-
<goal>sign</goal>
148-
</goals>
149-
<configuration>
150-
<gpgArguments>
151-
<arg>--pinentry-mode</arg>
152-
<arg>loopback</arg>
153-
</gpgArguments>
154-
</configuration>
155-
</execution>
156-
</executions>
157-
</plugin>
158-
<plugin>
159-
<groupId>org.apache.maven.plugins</groupId>
160-
<artifactId>maven-release-plugin</artifactId>
161-
<version>2.5.3</version>
184+
<artifactId>maven-compiler-plugin</artifactId>
162185
<configuration>
163-
<autoVersionSubmodules>true</autoVersionSubmodules>
164-
<useReleaseProfile>false</useReleaseProfile>
165-
<releaseProfiles>release</releaseProfiles>
166-
<goals>deploy</goals>
186+
<testExcludes>
187+
<testExclude>MyGame/Example/MonsterStorageGrpc.java</testExclude>
188+
<testExclude>MyGame/OtherNameSpace/TableBT.java</testExclude>
189+
</testExcludes>
167190
</configuration>
191+
<version>3.8.1</version>
168192
</plugin>
169193
</plugins>
170194
</build>

0 commit comments

Comments
 (0)