|
24 | 24 | <dist.download.skip>false</dist.download.skip>
|
25 | 25 | <dist.download.url/>
|
26 | 26 | <dist.download.folder>${project.build.directory}/dist/</dist.download.folder>
|
27 |
| - <nativeSourceDirectory>${project.basedir}/src/main/native</nativeSourceDirectory> |
| 27 | + <native.source.directory>${project.basedir}/src/main/native</native.source.directory> |
28 | 28 | </properties>
|
29 | 29 |
|
30 | 30 | <dependencies>
|
|
81 | 81 | <javacpp.build.skip>true</javacpp.build.skip>
|
82 | 82 | <dist.download.skip>true</dist.download.skip>
|
83 | 83 | </properties>
|
| 84 | + <build> |
| 85 | + <plugins> |
| 86 | + <plugin> |
| 87 | + <artifactId>maven-dependency-plugin</artifactId> |
| 88 | + <version>3.6.1</version> |
| 89 | + <executions> |
| 90 | + <execution> |
| 91 | + <id>copy-native-artifacts</id> |
| 92 | + <phase>validate</phase> |
| 93 | + <goals> |
| 94 | + <goal>copy</goal> |
| 95 | + </goals> |
| 96 | + <configuration> |
| 97 | + <outputDirectory>${project.build.directory}</outputDirectory> |
| 98 | + <overWriteSnapshots>true</overWriteSnapshots> |
| 99 | + <overWriteReleases>true</overWriteReleases> |
| 100 | + <useBaseVersion>true</useBaseVersion> |
| 101 | + <artifactItems> |
| 102 | + <artifactItem> |
| 103 | + <groupId>${project.groupId}</groupId> |
| 104 | + <artifactId>${project.artifactId}</artifactId> |
| 105 | + <version>${project.version}</version> |
| 106 | + <classifier>${javacpp.platform.linux-x86_64}</classifier> |
| 107 | + </artifactItem> |
| 108 | + <artifactItem> |
| 109 | + <groupId>${project.groupId}</groupId> |
| 110 | + <artifactId>${project.artifactId}</artifactId> |
| 111 | + <version>${project.version}</version> |
| 112 | + <classifier>${javacpp.platform.linux-x86_64}-gpu</classifier> |
| 113 | + </artifactItem> |
| 114 | + <artifactItem> |
| 115 | + <groupId>${project.groupId}</groupId> |
| 116 | + <artifactId>${project.artifactId}</artifactId> |
| 117 | + <version>${project.version}</version> |
| 118 | + <classifier>${javacpp.platform.macosx-x86_64}</classifier> |
| 119 | + </artifactItem> |
| 120 | + <artifactItem> |
| 121 | + <groupId>${project.groupId}</groupId> |
| 122 | + <artifactId>${project.artifactId}</artifactId> |
| 123 | + <version>${project.version}</version> |
| 124 | + <classifier>${javacpp.platform.macosx-arm64}</classifier> |
| 125 | + </artifactItem> |
| 126 | + <artifactItem> |
| 127 | + <groupId>${project.groupId}</groupId> |
| 128 | + <artifactId>${project.artifactId}</artifactId> |
| 129 | + <version>${project.version}</version> |
| 130 | + <classifier>${javacpp.platform.windows-x86_64}</classifier> |
| 131 | + </artifactItem> |
| 132 | + </artifactItems> |
| 133 | + </configuration> |
| 134 | + </execution> |
| 135 | + </executions> |
| 136 | + </plugin> |
| 137 | + <plugin> |
| 138 | + <groupId>org.codehaus.mojo</groupId> |
| 139 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 140 | + <version>3.5.0</version> |
| 141 | + <executions> |
| 142 | + <execution> |
| 143 | + <id>attach-artifacts</id> |
| 144 | + <phase>validate</phase> |
| 145 | + <goals> |
| 146 | + <goal>attach-artifact</goal> |
| 147 | + </goals> |
| 148 | + <configuration> |
| 149 | + <artifacts> |
| 150 | + <artifact> |
| 151 | + <file>${project.build.directory}/${artifactId}-${project.version}-${javacpp.platform.linux-x86_64}.jar</file> |
| 152 | + <classifier>${javacpp.platform.linux-x86_64}</classifier> |
| 153 | + </artifact> |
| 154 | + <artifact> |
| 155 | + <file>${project.build.directory}/${artifactId}-${project.version}-${javacpp.platform.linux-x86_64}-gpu.jar</file> |
| 156 | + <classifier>${javacpp.platform.linux-x86_64}-gpu</classifier> |
| 157 | + </artifact> |
| 158 | + <artifact> |
| 159 | + <file>${project.build.directory}/${artifactId}-${project.version}-${javacpp.platform.macosx-arm64}.jar</file> |
| 160 | + <classifier>${javacpp.platform.macosx-arm64}</classifier> |
| 161 | + </artifact> |
| 162 | + <artifact> |
| 163 | + <file>${project.build.directory}/${artifactId}-${project.version}-${javacpp.platform.macosx-x86_64}.jar</file> |
| 164 | + <classifier>${javacpp.platform.macosx-x86_64}</classifier> |
| 165 | + </artifact> |
| 166 | + <artifact> |
| 167 | + <file>${project.build.directory}/${artifactId}-${project.version}-${javacpp.platform.windows-x86_64}.jar</file> |
| 168 | + <classifier>${javacpp.platform.windows-x86_64}</classifier> |
| 169 | + </artifact> |
| 170 | + </artifacts> |
| 171 | + </configuration> |
| 172 | + </execution> |
| 173 | + </executions> |
| 174 | + </plugin> |
| 175 | + </plugins> |
| 176 | + </build> |
84 | 177 | </profile>
|
85 | 178 |
|
86 | 179 | <!-- Generating mode: produce Java files from native resources -->
|
|
220 | 313 | <classPath>${project.build.outputDirectory}</classPath>
|
221 | 314 | <includePaths>
|
222 | 315 | <includePath>${dist.download.folder}/tensorflow/include/</includePath>
|
223 |
| - <includePath>${nativeSourceDirectory}/org/tensorflow/internal/c_api/</includePath> |
| 316 | + <includePath>${native.source.directory}/org/tensorflow/internal/c_api/</includePath> |
224 | 317 | <!-- additional include paths in case of a full native build -->
|
225 | 318 | <includePath>${project.basedir}/bazel-${project.artifactId}/external/org_tensorflow/</includePath>
|
226 | 319 | <includePath>${project.basedir}/bazel-bin/external/org_tensorflow/</includePath>
|
|
530 | 623 | <version>3.3.0</version>
|
531 | 624 | <executions>
|
532 | 625 | <execution>
|
533 |
| - <id>attach-source</id> |
| 626 | + <id>attach-sources</id> |
534 | 627 | <goals>
|
535 | 628 | <goal>jar-no-fork</goal>
|
536 | 629 | </goals>
|
|
0 commit comments