我有一個webjars項目,我想構建快照並將它們部署在本地(位於我們的基礎結構中),但版本由webjars.org管理。將nexus-staging-maven插件重定向到內部存儲庫
https://github.com/webjars/oscar/blob/15.0.0-RC1/pom.xml
我現在面臨的問題是,他們需要定義其釋放過程中承上啓下分期,Maven的插件。因此,我希望儘可能爲POM量身定製POM,並儘可能通過命令行(或最壞情況,簡檔)製作自己的偏差。
通常情況下,如果從頭開始這樣做,您可能會在配置文件中引入暫存插件,但我不認爲我有這個選項。 (我可能必須進行修改,並與他們討論。)
我從來沒有使用過staging插件,所以這是我的第一次曝光,它不是一個愉快的給定我試圖去做。我覺得我正在與系統作鬥爭。
我原本以爲通過指定的東西:
-DsonatypeOssDistMgmtSnapshotsUrl=http://myurl
和推動在正確的位置神器,但我無法弄清楚如何提供憑據。 (401未授權)我認爲指定serverId可能會工作,但沒有。
-DserverId=public-snapshots
http://books.sonatype.com/nexus-book/reference/staging-deployment.html
我又試圖創建一個配置文件,在那裏我會做這樣的事情:
<profile>
<id>disable-staging</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.5</version>
<configuration combine.self="override">
<executions>
<execution>
<id>injected-nexus-deploy</id>
<phase>none</phase>
</execution>
</executions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
但這並不能幫助。有效pom顯示:
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.5</version>
<extensions>true</extensions>
<executions>
<execution>
<id>injected-nexus-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration combine.self="override">
<executions>
<execution>
<id>injected-nexus-deploy</id>
<phase>none</phase>
</execution>
</executions>
</configuration>
</execution>
</executions>
<configuration combine.self="override">
<executions>
<execution>
<id>injected-nexus-deploy</id>
<phase>none</phase>
</execution>
</executions>
</configuration>
</plugin>
我無法解除綁定部署階段。
我想知道如果有人有什麼想法在這種情況下做什麼?
工作就像一個魅力。非常感謝你。如果這能讓我這樣做,我會樂觀的。 – tastle
@tastle你能把它標記爲正確答案嗎? –