Using wisdom-ipojo-module without wisdom-maven-plugin

12 views
Skip to first unread message

Nicolas Rempulski

unread,
Feb 21, 2017, 3:40:00 AM2/21/17
to wisdom-discuss
Hi, 

I'm trying to use Wisdom annotations (@Controller, @Model, ...) in a bundle without building it with wisdom-maven-plugin.

So far I used to replace these annotations with their expanded plain-ipojo versions but @Model is really useful. It eases the refactoring process with compile time error instead of runtime error when the @Requires filters on CRUD are not correctly set.

I tried to follow these instructions, this example and this Wisdom example to configure maven-bundle-plugin and ended with this effective POM : 

 [...]
 <packaging>bundle</packaging>
 [...]
 <build>
        <plugins>
            <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
            </plugin>

            <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven.bundle.version}</version>
                    <extensions>true</extensions>
                    <dependencies>
                        <dependency>
                            <groupId>org.wisdom-framework</groupId>
                            <artifactId>wisdom-ipojo-module</artifactId>
                            <version>0.10.0-SNAPSHOT</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.felix</groupId>
                            <artifactId>bnd-ipojo-plugin</artifactId>
                            <version>1.12.1</version>
                        </dependency>
                    </dependencies>
            </plugin>

            <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-ipojo-plugin</artifactId>
                    <version>${maven.ipojo.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>ipojo-bundle</goal>
                            </goals>
                        </execution>
                    </executions>
            </plugin>
        </plugins>
    </build>

But when I open my bundle in target after mvn clean install, I still see the @Model annotations in my .class files. Maven does not output any logs in the maven-bundle-plugin phases.

Does anyone used wisdom-ipojo-module outside a Wisdom compilation process ? 

Thanks
Reply all
Reply to author
Forward
0 new messages