You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jason Dillon <ja...@planet57.com> on 2007/04/06 01:17:51 UTC
Profiles and repositories
I was trying to setup a profile to allow a custom stage repository to
be used, which its url is specified with the stage.repositoryUrl
property. But this doesn't seem to work at all :-(
This is the profile I created:
----8<-----
<profile>
<id>stage-repository</id>
<activation>
<property>
<name>stage.repositoryUrl</name>
</property>
</activation>
<repositories>
<repository>
<id>stage-repository</id>
<url>${stage.repositoryUrl}</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>stage-repository</id>
<url>${stage.repositoryUrl}</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
---->8----
Though this profile does not even get installed before Maven starts
to resolve the parent pom of the module. And in my case, the version
of the parent pom I need is only in that stage repository.
If I move the <repository> out of the profile, then the repository is
enabled, but mvn reports it as:
stage-repository (${stage.repositoryUrl})
Maven doesn't seem to care that I ran in with `mvn -
Dstage.repositoryUrl=someurl`.
I really wanted to create a profile to allow pre-releases to be
verified against a dependency project's stage repo w/o having to
update the poms configuration each time.
Is there any reason why the profile as defined above should not work?
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org