New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented @DefaultActivationStrategy feature #141

Merged
merged 1 commit into from Oct 19, 2015

Conversation

Projects
None yet
2 participants
@KaiHofstetter
Contributor

KaiHofstetter commented Oct 11, 2015

Hi Christian,

just implemented @DefaultActivationStrategy feature, like discussed...

public enum MyFeatures implements Feature {

    @EnabledByDefault
    @DefaultActivationStrategy(
        id = UsernameActivationStrategy.ID,
        parameters = {
            @ActivationParameter(name = UsernameActivationStrategy.PARAM_USERS, value = "person1,ck,person2")
        }
    )
    FEATURE_ONE;

}

Thanks,
Kai

@KaiHofstetter

This comment has been minimized.

Contributor

KaiHofstetter commented Oct 11, 2015

I just saw that I accidentally commited my pom.xml changes.
I had problems running mvn -DJBOSS_REPO=true clean install.
The bundlor maven plugin stopped with a NoClassDefFoundError:

...
[INFO] --- org.eclipse.virgo.bundlor.maven:1.1.2.RELEASE:bundlor (bundlor) @ togglz-project ---
[WARNING] Error injecting: org.eclipse.virgo.bundlor.maven.plugin.BundlorMojo
java.lang.NoClassDefFoundError: org/eclipse/virgo/bundlor/support/manifestwriter/ManifestWriterFactory
...

I had to add following dependencies to the bundlor maven plugin:

...
<plugin>
    <groupId>org.eclipse.virgo.bundlor</groupId>
    <artifactId>org.eclipse.virgo.bundlor.maven</artifactId>
    ...
    <dependencies>
        <dependency>
            <groupId>org.eclipse.virgo.bundlor</groupId>
            <artifactId>org.eclipse.virgo.bundlor</artifactId>
            <version>1.1.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.virgo.bundlor</groupId>
            <artifactId>org.eclipse.virgo.bundlor.blint</artifactId>
            <version>1.1.2.RELEASE</version>
        </dependency>
    </dependencies>
</plugin>
...

It does not surprise me, that it did not compile, since the pom.xml of the bundlor maven plugin uses the scope provided for those two dependencies:

...
<dependency>
    <groupId>org.eclipse.virgo.bundlor</groupId>
    <artifactId>org.eclipse.virgo.bundlor</artifactId>
    <version>${project.version}</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>org.eclipse.virgo.bundlor</groupId>
    <artifactId>org.eclipse.virgo.bundlor.blint</artifactId>
    <version>${project.version}</version>
    <scope>provided</scope>
</dependency>
... 

I don't seem to be the only person, who had that problem: #129

Regards,
Kai

@chkal

This comment has been minimized.

Member

chkal commented Oct 12, 2015

Awesome! Thanks a lot. I'll try to find some time in the next days to review that patch. Unfortunately I'm very busy at the moment. So it may take some days..

chkal added a commit that referenced this pull request Oct 19, 2015

Merge pull request #141 from KaiHofstetter/default_activation_strategy
Implemented @DefaultActivationStrategy feature

@chkal chkal merged commit 2c84aea into togglz:master Oct 19, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@chkal

This comment has been minimized.

Member

chkal commented Oct 19, 2015

Thanks a lot. This looks great! I just added some more javadocs for the annotations. And I set a default value for the parameters so that users can omit the parameters if they don't want to set any (Not sure if this happens though).

See: ac6d5fd

Thanks again for the contribution!

@KaiHofstetter

This comment has been minimized.

Contributor

KaiHofstetter commented Oct 19, 2015

No problem. Thank you for accepting my pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment