背后的故事:我向 GitHub 中的一些公共存儲庫提交了一個錯誤,它已被修復,但當我要求發(fā)布這些更改時,我沒有得到任何回應。所以我等待下一個庫版本兩個月了。所以我決定分叉這個存儲庫并發(fā)布到自定義 Bintray。倉庫是https://github.com/okta/okta-sdk-java該項目有多個maven模塊:$ find . -type f -name pom.xml./httpclients/okhttp/pom.xml./httpclients/httpclient/pom.xml./impl/pom.xml./swagger-templates/pom.xml./pom.xml./integration-tests/pom.xml./api/pom.xml./coverage/pom.xml./examples/pom.xml./examples/quickstart/pom.xml我只需要發(fā)布impl模塊。問題是 rootpom.xml有父配置: <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.okta</groupId> <artifactId>okta-parent</artifactId> <version>14</version> <relativePath>../okta-java-parent</relativePath> </parent> <groupId>com.okta.sdk</groupId> <artifactId>okta-sdk-root</artifactId> <version>1.6.0-SNAPSHOT</version> <packaging>pom</packaging>所有部署配置都在 pom.xml 中指定okta-parent。我嘗試使用(在 root 中pom.xml)覆蓋存儲庫配置: <distributionManagement> <repository> <id>bintray-g4s8-maven</id> <name>mvn</name> <url>https://api.bintray.com/maven/g4s8/mvn/okta-sdk-impl/;publish=1</url> </repository> </distributionManagement>但這沒有幫助。我在settings.xml這個存儲庫中有服務器配置,并且它對于我的所有其他項目都運行良好:<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>bintray-g4s8-maven</id> <username>g4s8</username> <password>...</password> </server> </servers></settings>
1 回答

MYYA
TA貢獻1868條經(jīng)驗 獲得超4個贊
看起來您正在構建一個快照版本。配置的<snapshotRepository>
就是oss.sonatype...
. 您僅添加了用于構建發(fā)行版本的配置。
添加回答
舉報
0/150
提交
取消