Hi Manfred and Ed,
Thanks for your comments, I have fixed them except item 3:
1. The plugin needs to be self contained (copy the code from jsf-tools
that is needed for this).
[Zhijun] fixed, modified some code in jsf-tools for this, some files
need to be looked up in the jar file as resources.
2. The plugin source code needs to live in com.sun.faces.maven.plugins.XXXX
[Zhijun] fixed.
3. The plugin needs to be automatically run in the generate-sources phase
[Zhijun] should be configured in the project who will call this plugin,
right?
4. The plugin will need to be put into the $WORKSPACE/maven/plugins/XXXX
directory (where $WORKSPACE is the directory where you have the Mojarra
source code checked out).
[Zhijun] fixed.
Attach the updated change bundle here for your check, thanks for your
further comments.
The tester maven project changed a little:
/<project xmlns="
http://maven.apache.org/POM/4.0.0"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ren.app</groupId>
<artifactId>test-plugin</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>test-plugin Maven Webapp</name>
<url>
http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>test-plugin</finalName>
<plugins>
<plugin>
<groupId>com.sun.faces.maven.plugins</groupId>
<artifactId>compogen-maven-plugin</artifactId>
<version>2.2.8-SNAPSHOT</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>CompoGen</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>/
BR,
Zhijun
On 8/14/14, 0:00, manfred riem wrote:
> Hi Zhijun,
>
> Great first cut! Let me add some extra notes so you are aware what we
> need in the end.
>
> 1. The plugin needs to be self contained (copy the code from jsf-tools
> that is needed for this).
> 2. The plugin source code needs to live in
> com.sun.faces.maven.plugins.XXXX
> 3. The plugin needs to be automatically run in the generate-sources phase
> 4. The plugin will need to be put into the
> $WORKSPACE/maven/plugins/XXXX directory (where $WORKSPACE is the
> directory where you have the Mojarra source code checked out).
>
> Thanks!
> Manfred
>
> On 8/13/14, 3:46 AM, zhijun Ren wrote:
>> Hi Ed and Manfred,
>>
>> I just completed to develop a first version of the plugin for
>> generating the html components, please help to review mainly from the
>> perspective of solution and folder structure to ensure my direction
>> is correct. I still need to refine it, e.g., parameterize the target
>> folder etc.
>>
>> Attach the change bundle and new files here for your reference.
>>
>> It works fine in the testing by the command "mvn compogen:CompoGen"
>> on the following maven project: ( Q: do I also need to commit a test
>> project for this plugin? )
>>
>> /<project xmlns="http://maven.apache.org/POM/4.0.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd">
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>com.ren.app</groupId>
>> <artifactId>test-plugin</artifactId>
>> <packaging>war</packaging>
>> <version>1.0-SNAPSHOT</version>
>> <name>test-plugin Maven Webapp</name>
>> <url>http://maven.apache.org</url>
>> <dependencies>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <version>3.8.1</version>
>> <scope>test</scope>
>> </dependency>
>> </dependencies>
>> <build>
>> <finalName>test-plugin</finalName>
>> <plugins>
>> <plugin>
>> <groupId>com.sun.faces.build.plugins</groupId>
>> <artifactId>compogen-maven-plugin</artifactId>
>> <version>2.2.8-SNAPSHOT</version>
>> <configuration>
>> <jsfBuildHome>/Users/zhijun/mojarra/MOJARRA_2_2X_ROLLING</jsfBuildHome>
>> </configuration>
>> <executions>
>> <execution>
>> <phase>compile</phase>
>> <goals>
>> <goal>CompoGen</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </build>
>> </project>
>> /
>>
>> BR,
>> Zhijun