Hi Danesh/Niranjan,

Adding following to the component pom copies the docs to jar which resolved
the docs not getting copied in feature.

 <resources>
<resource>
<directory>${project.build.directory}/classes/config-docs</directory>
<targetPath>config-docs</targetPath>
</resource>
</resources>


Thanks for the support.

Thanks & Regards,
Ishara Cooray
Senior Software Engineer
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

On Thu, Dec 22, 2016 at 2:28 PM, Niranjan Karunanandham <niran...@wso2.com>
wrote:

> Hi Ishara,
>
> You can include the resources, i.e., the config-docs, into the jar by
> using "<Include-Resource>" in the maven-bundle-plugin.
>
> Regards,
> Nira
>
> On Thu, Dec 22, 2016 at 12:57 PM, Ishara Cooray <isha...@wso2.com> wrote:
>
>> Hi,
>>
>> I am implementing Global Configuration Model for C5 API Manger.
>> There to get the config docs created i have used the below maven plugin
>> in component pom.xml
>>
>> The config bean class/classes has to be specified in configurations as
>> <configclasses> as shown below.
>> Then configuration document file(<config-namespace-value>.yaml) files
>> w.r.t two bean classes i have specified were generated in
>> target/classes/config-docs directory.
>>
>>             <plugin>
>>                 <groupId>org.wso2.carbon</groupId>
>>                 <artifactId>org.wso2.carbon.pl
>> ugins.configuration</artifactId>
>>                 <executions>
>>                     <execution>
>>                         <goals>
>>                             <goal>create-doc</goal>
>>                         </goals>
>>                         <configuration>
>>                             <configclasses>
>>                                 <configclass>org.wso2.carbon.a
>> pimgt.core.APIMConfigurations</configclass>
>>                                 <configclass>org.wso2.carbon.a
>> pimgt.core.KeyMgtConfigurations</configclass>
>>                             </configclasses>
>>                         </configuration>
>>                         <phase>compile</phase>
>>                     </execution>
>>                 </executions>
>>             </plugin>
>>
>> Then i have put following plugin in feature pom to copy the config-doc
>> files to the feature. When feature builds, it is supposed to copy 
>> configuration
>> document file(<config-namespace-value>.yaml) to config-docs directory.
>>
>>             <plugin>
>>                 <groupId>org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-dependency-plugin</artifactId>
>>                 <executions>
>>                     <execution>
>>                         <id>unpack</id>
>>                         <phase>package</phase>
>>                         <goals>
>>                             <goal>unpack</goal>
>>                         </goals>
>>                         <configuration>
>>                             <artifactItems>
>>                                 <artifactItem>
>>                                     <groupId>org.wso2.carbon.apimg
>> t</groupId>
>>                                     <artifactId>org.wso2.carbon.ap
>> imgt.core</artifactId>
>>                                     <version>7.0.0-SNAPSHOT</version>
>>                                     <type>bundle</type>
>>                                     <overWrite>true</overWrite>
>>                                     <outputDirectory>${project.bui
>> ld.directory}/docs</outputDirectory>
>>                                     <includes>config-docs/**</includes>
>>                                 </artifactItem>
>>                             </artifactItems>
>>                         </configuration>
>>                     </execution>
>>                 </executions>
>>             </plugin>
>>
>> But this is not get copied in feature target/docs directory as i have
>> noticed.
>>
>> With the help of Niranjan found out that there is an issue in copying the
>> files.
>>
>> @kernel team,
>> Can we get a fix for this?
>>
>>
>> Thanks & Regards,
>> Ishara Cooray
>> Senior Software Engineer
>> Mobile : +9477 262 9512 <+94%2077%20262%209512>
>> WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>
>
>
> --
>
>
> *Niranjan Karunanandham*
> Associate Technical Lead - WSO2 Inc.
> WSO2 Inc.: http://www.wso2.com
>
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to