On 05/14/2012 12:07 PM, Vincent Massol wrote:
On May 14, 2012, at 5:49 PM, Sergiu Dumitriu wrote:
> On 05/14/2012 03:40 AM, Caleb James DeLisle wrote:
>>
>>
>> On 05/14/2012 02:56 AM, Vincent Massol wrote:
>>> Hi Caleb,
>>>
>>> On May 13, 2012, at 12:17 PM, Caleb James DeLisle wrote:
>>>
>>>> Hi,
>>>>
>>>> I'd like to change the<repository> in each top level pom to
nexus so that on release, all releases will go directly to staging by default.
>>>> Agent1 already has an account in the staging repository from my last
release so this should just work.
>>>>
>>>> WDYT?
>>>
>>> +1 for using staging but not to change the target repo. We need to be able to
go from staging to target.
>>> The canonical way is to use mvn release:stage.
>>
>> I don't know if it's as much canonical as it is the way that maven
offers.
>> Nexus has a user interface which allows you to promote a release out of staging
with just a few clicks.
>> I think maven's release:stage was designed with the assumption that most
people don't have this luxury.
>>
>> My concern with leaving a live repository in the pom file is that it seems to be
just asking for an accident
>> where everything gets pushed to the live server and has to be weeded out
manually. I would like to avoid this if at all possible.
>> I want to minimize the risk and the best way I know to do that is to not let
maven know where scp://maven.xwiki is.
>>
>> Caleb
>
> I think that the POMs shouldn't know about staging repositories, since those
aren't supposed to be "public". Personally I'd go for changing the
release script so that it uses release:stage
-DstagingRepository=http://nexus.xwiki.org...
>
> Plus, the POM doesn't have support for specifying staging repositories
It has. It's a parameter called "stagingRepository" (see
http://maven.apache.org/plugins/maven-release-plugin/usage.html).
I meant inside the <repositories> element, as a kind of repository besides
"releases" and "snapshots". The "stagingRepository" is a
parameter used only by the release:stage goal. Caleb was proposing to change the URL of
the repositories as they are configured in the POM.
> , just releases and snapshots, and it would
be wrong to change the pom so that the "releases" repository, which most of the
time is supposed to be used as a read-only location from which dependencies can be
downloaded, would point to an upload-only URL that will fail when trying to download
dependencies from it. The<repository> element is "a place to collect and store
artifacts".
Yes that's true, good point: External tools could read that info from our released
pom.xml and it should point to the final location, I agreeā¦
I think the root pom is broken now, since the releases repository is supposed to be
readable, while the current repository URL
(
http://nexus.xwiki.org/nexus/service/local/staging/deploy/maven2/) requires
authentication, and even when logged in it will display an error when trying to read it.
How about making it http rather than scp so that it is read only? I just want to make
sure maven will fail rather than trash a live repo, even if it is easy to fix.