maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wayne Fay <wayne...@gmail.com>
Subject activeProfiles
Date Sat, 23 Mar 2013 14:15:08 GMT
> I am trying to set up my projects so that the POM knows which profile to
> activate, but it seems you cannot put <activeProfiles> in a POM, only in a
> settings.xml file. Is there some reason for this?
>
> Is there some other Maven way to do what I want to do? How do other people
> separate work development from personal development?

One technique I've employed uses two settings.xml files. First you should
know about the -s option when calling mvn, look it up. Copy mvn.bat to
mvnp.bat and mvnw.bat (or .sh). In mvnp.bat, specify -s
settings-personal.xml and in mvnw.bat, specify -s settings-work.xml.

Then call mvnw or mvnp instead of mvn. You can also adjust mvn.bat directly
and use that for personal (or work, whichever is most common).

Or just set up another user account and log in/out depending on what you
are working on, each with its own settings.xml. This is easier on
Linux/Unix.

Wayne

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message