Pamuleti Pullagura
Pamuleti Pullagura

Reputation: 61

Is possible to have 2 settings.xml for a single maven home folder?

I am having 2 projects. As per the requirement, I have to maintain the repos separately and some configuration also different.

I don't have permissions to install one more maven installation folder in my lap.

Is possible to have 2 settings.xml for a single maven installation home folder? (I would like to maintain like settings_A.xml and settings_B.xml in different locations).

Is it valid? Please correct me if I am wrong.

Thanks.

Upvotes: 3

Views: 969

Answers (1)

Saeed Alizadeh
Saeed Alizadeh

Reputation: 1467

yes you can point to a custom settings.xml per use and pass it as argument to Maven as following:

mvn --settings YourOwnSettings.xml clean install

or use shorter form:

mvn -s YourOwnSettings.xml clean install

you can also use project specific settings.xml configuration that explained in other stackoverflow question here

Upvotes: 4

Related Questions