Re: Are, activeProfiles ALWAYS active? (updatePolicyinterval:5/.. not working)

2012-04-24 Thread Stephen Connolly
On 24 April 2012 03:02, Andrew Hughes ahhug...@gmail.com wrote:

 OK, I found a way to confirm...

 activeProfiles are always active Exactly what I wanted as documented
 :)

 However, the problem persisted... until...

 I noticed that builds on the command line worked fine, as did 'install'
 e.t.c from within eclipse. However, the m2eclipse dependencies refused to
 update. Is it possible that the eclipse plugin has some internal cache that
 holds into dependencies and overrides those from maven? I also tried maven
 - update dependencies, fail, I also did maven - update project
 configuration, fail then I did maven - update project configuration +
 force update of Snapshot / Releases. SUCCESS.

 Why would m2e have a difference update/cache policy on dependencies to that
 of maven?


I would suspect because the session never ends, and there is checking once
per session only if the update policy demands it

You can get the very same behaviour from a very very long running Maven
build, where the snapshot is resolved once during the build only, even if
plugins further in the build do explicit resolves.



 Cheers.



 On Tue, Apr 24, 2012 at 11:06 AM, Richard W. Eggert II 
 richard.egg...@gmail.com wrote:

  On 4/23/2012 9:15 PM, Benson Margulies wrote:
 
  On Mon, Apr 23, 2012 at 9:00 PM, Andrew Hughesahhug...@gmail.com
   wrote:
 
  Hi All,
 
  I have configured the following to perform (local) snapshot updates
 every
  5mins... unfortunately the dependencies DO NOT update at the prescribed
  5min interval. Could it be that theactiveProfiles  do not ALWAYS
  activate? I do have a specific -P dev (project defined) profile enabled
  while building, will this deactivate the settings.xmlactiveProfiles?
 Or
  any other circumstances for that matter?
 
  If anyone has a better way of doing this or if there is a problem with
 my
  settings below, I'm all ear's :)
 
  Or wars?
 
  activeProfiles are only active until some explicit profile is
  activated from the command line, I believe. You need to make your
  profile use an activation that will always be satisfied instead.
 
 
 
  If I recall correctly, you can disable an active profile by explicitly
  disabling it by prefixing the name with '!'.  For example, if your active
  profile is named foo, you could run the package goal with the profile
  disabled like so:
  mvn package -P !foo
 
  Rich Eggert
 
 
  --**--**-
  To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org
 users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



Are, activeProfiles ALWAYS active? (updatePolicyinterval:5/.. not working)

2012-04-23 Thread Andrew Hughes
Hi All,

I have configured the following to perform (local) snapshot updates every
5mins... unfortunately the dependencies DO NOT update at the prescribed
5min interval. Could it be that the activeProfiles do not ALWAYS
activate? I do have a specific -P dev (project defined) profile enabled
while building, will this deactivate the settings.xml activeProfiles? Or
any other circumstances for that matter?

If anyone has a better way of doing this or if there is a problem with my
settings below, I'm all ear's :)

Cheers.


the settings.xml.

?xml version=1.0 encoding=UTF-8?
settings xmlns=http://maven.apache.org/SETTINGS/1.0.0;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd;
  servers
server
  idsnapshots/id
  usernameadmin/username
  passwordadmin123/password
/server
server
  idreleases/id
  usernameadmin/username
  passwordadmin123/password
/server
  /servers
  mirrors
mirror
  idacme-nexus/id
  urlhttp://acme.com/nexus/content/groups/public//url
  mirrorOf*/mirrorOf
/mirror
  /mirrors
  profiles
profile
  idacme/id
  repositories
repository
  idacme-nexus/id
  nameacme-nexus/name
  releases
enabledtrue/enabled
updatePolicynever/updatePolicy
checksumPolicyfail/checksumPolicy
  /releases
  snapshots
enabledtrue/enabled
updatePolicyinterval:5/updatePolicy
checksumPolicyfail/checksumPolicy
  /snapshots
  urlhttp://acme.com/nexus/content/groups/public//url
  layoutdefault/layout
/repository
  /repositories
/profile
  /profiles
  activeProfiles
activeProfileacme/activeProfile
  /activeProfiles
/settings


Re: Are, activeProfiles ALWAYS active? (updatePolicyinterval:5/.. not working)

2012-04-23 Thread Benson Margulies
On Mon, Apr 23, 2012 at 9:00 PM, Andrew Hughes ahhug...@gmail.com wrote:
 Hi All,

 I have configured the following to perform (local) snapshot updates every
 5mins... unfortunately the dependencies DO NOT update at the prescribed
 5min interval. Could it be that the activeProfiles do not ALWAYS
 activate? I do have a specific -P dev (project defined) profile enabled
 while building, will this deactivate the settings.xml activeProfiles? Or
 any other circumstances for that matter?

 If anyone has a better way of doing this or if there is a problem with my
 settings below, I'm all ear's :)

Or wars?

activeProfiles are only active until some explicit profile is
activated from the command line, I believe. You need to make your
profile use an activation that will always be satisfied instead.



 Cheers.


 the settings.xml.

 ?xml version=1.0 encoding=UTF-8?
 settings xmlns=http://maven.apache.org/SETTINGS/1.0.0;
          xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
          xsi:schemaLocation=http://maven.apache.org/SETTINGS/1.0.0
 http://maven.apache.org/xsd/settings-1.0.0.xsd;
  servers
    server
      idsnapshots/id
      usernameadmin/username
      passwordadmin123/password
    /server
    server
      idreleases/id
      usernameadmin/username
      passwordadmin123/password
    /server
  /servers
  mirrors
    mirror
      idacme-nexus/id
  urlhttp://acme.com/nexus/content/groups/public//url
      mirrorOf*/mirrorOf
    /mirror
  /mirrors
  profiles
 profile
      idacme/id
      repositories
        repository
          idacme-nexus/id
          nameacme-nexus/name
          releases
            enabledtrue/enabled
            updatePolicynever/updatePolicy
            checksumPolicyfail/checksumPolicy
          /releases
          snapshots
            enabledtrue/enabled
            updatePolicyinterval:5/updatePolicy
            checksumPolicyfail/checksumPolicy
          /snapshots
          urlhttp://acme.com/nexus/content/groups/public//url
          layoutdefault/layout
        /repository
      /repositories
 /profile
  /profiles
  activeProfiles
 activeProfileacme/activeProfile
  /activeProfiles
 /settings

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Are, activeProfiles ALWAYS active? (updatePolicyinterval:5/.. not working)

2012-04-23 Thread Richard W. Eggert II

On 4/23/2012 9:15 PM, Benson Margulies wrote:

On Mon, Apr 23, 2012 at 9:00 PM, Andrew Hughesahhug...@gmail.com  wrote:

Hi All,

I have configured the following to perform (local) snapshot updates every
5mins... unfortunately the dependencies DO NOT update at the prescribed
5min interval. Could it be that theactiveProfiles  do not ALWAYS
activate? I do have a specific -P dev (project defined) profile enabled
while building, will this deactivate the settings.xmlactiveProfiles? Or
any other circumstances for that matter?

If anyone has a better way of doing this or if there is a problem with my
settings below, I'm all ear's :)

Or wars?

activeProfiles are only active until some explicit profile is
activated from the command line, I believe. You need to make your
profile use an activation that will always be satisfied instead.




If I recall correctly, you can disable an active profile by explicitly 
disabling it by prefixing the name with '!'.  For example, if your 
active profile is named foo, you could run the package goal with the 
profile disabled like so:

mvn package -P !foo

Rich Eggert

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Are, activeProfiles ALWAYS active? (updatePolicyinterval:5/.. not working)

2012-04-23 Thread Andrew Hughes
OK, I found a way to confirm...

activeProfiles are always active Exactly what I wanted as documented
:)

However, the problem persisted... until...

I noticed that builds on the command line worked fine, as did 'install'
e.t.c from within eclipse. However, the m2eclipse dependencies refused to
update. Is it possible that the eclipse plugin has some internal cache that
holds into dependencies and overrides those from maven? I also tried maven
- update dependencies, fail, I also did maven - update project
configuration, fail then I did maven - update project configuration +
force update of Snapshot / Releases. SUCCESS.

Why would m2e have a difference update/cache policy on dependencies to that
of maven?


Cheers.



On Tue, Apr 24, 2012 at 11:06 AM, Richard W. Eggert II 
richard.egg...@gmail.com wrote:

 On 4/23/2012 9:15 PM, Benson Margulies wrote:

 On Mon, Apr 23, 2012 at 9:00 PM, Andrew Hughesahhug...@gmail.com
  wrote:

 Hi All,

 I have configured the following to perform (local) snapshot updates every
 5mins... unfortunately the dependencies DO NOT update at the prescribed
 5min interval. Could it be that theactiveProfiles  do not ALWAYS
 activate? I do have a specific -P dev (project defined) profile enabled
 while building, will this deactivate the settings.xmlactiveProfiles? Or
 any other circumstances for that matter?

 If anyone has a better way of doing this or if there is a problem with my
 settings below, I'm all ear's :)

 Or wars?

 activeProfiles are only active until some explicit profile is
 activated from the command line, I believe. You need to make your
 profile use an activation that will always be satisfied instead.



 If I recall correctly, you can disable an active profile by explicitly
 disabling it by prefixing the name with '!'.  For example, if your active
 profile is named foo, you could run the package goal with the profile
 disabled like so:
 mvn package -P !foo

 Rich Eggert


 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: Are, activeProfiles ALWAYS active? (updatePolicyinterval:5/.. not working)

2012-04-23 Thread Wayne Fay
 Why would m2e have a difference update/cache policy
 on dependencies to that of maven?

You'd have to ask that on the m2e users list @ Eclipse.org. They have
their own list(s).

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org