This is my user pom:

    <build>
        <extensions>
            <extension>
                <groupId>my.group.id</groupId>
                <artifactId>ldap-activator</artifactId>
                <version>0.0.1-SNAPSHOT</version>
            </extension>
        </extensions>
    </build>
    <profiles>
        <profile>
            <id>ldap-test</id>
            <activation />
            ...
        </profile>
    </profiles>

Maybe the profile activator should put somewhere else then <extension> tag?

Lenik

On Fri, Jan 21, 2011 at 1:40 PM, Xie Jilei <[email protected]> wrote:
> I'm create a new ProfileActivator like:
>
>    @Component(role = ProfileActivator.class, hint = "ldap")
>    public class LdapQueryProfileActivator
>            implements ProfileActivator {
>        // ...
>        public LdapQueryProfileActivator() {
>              System.err.println("xxx");
>              FileUtil.writeFile("/tmp/mark123", "xyz");
>              // ...
>        }
>    }
>
> It seems like the new activator hasn't been installed into Maven.
>
> However, run the example test:
>
>    public class LdapProfileActivatorTest
>            extends AbstractProfileActivatorTest<LdapProfileActivator> {
>
>        public LdapProfileActivatorTest() {
>            super(LdapProfileActivator.class);
>        }
>
>        Profile newProfile() {
>            Activation activation = new Activation();
>
>            Profile profile = new Profile();
>            profile.setActivation(activation);
>
>            return profile;
>        }
>
>        public void testDefault() {
>            Profile profile = newProfile();
>            ProfileActivationContext context = newContext(null, null);
>            assertActivation(true, profile, context);
>        }
>
>    }
>
> In this test, I can see the correct diagnostic output: "xxx" "xyz", etc.
>
> Any idea? I'm using Maven 3.0.2.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to