[rules-users] Guvnor bulk importer problem

vasilievip vasilievip at ukr.net
Sat Jan 22 17:01:07 EST 2011


Attaching my version of repository xml generator for Guvnor based on drools
repository api.
RepositoryGenerator scans specified folders and generates packages into
repository then export it as xml into target folder (then unit tests loading
this exported file and perform package testing). 

http://drools-java-rules-engine.46999.n3.nabble.com/file/n2310754/RepositoryGenerator.java
RepositoryGenerator.java 
http://drools-java-rules-engine.46999.n3.nabble.com/file/n2310754/KnowledgeGenerator.java
KnowledgeGenerator.java 
http://drools-java-rules-engine.46999.n3.nabble.com/file/n2310754/RulesGenerator.java
RulesGenerator.java 

Generator can be executed with maven build:
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-repository</artifactId>  
            <exclusions>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-entitymanager</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
...

           <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                               
<outputDirectory>${project.build.directory}/model_to_guvnor</outputDirectory>
                               
<includeArtifactIds>mycompany-model</includeArtifactIds>
                            </configuration>
                        </execution>
                    </executions>
            </plugin>       
...
           <plugin>  
              <groupId>org.codehaus.mojo</groupId>  
              <artifactId>exec-maven-plugin</artifactId>  
              <executions>  
               <execution>  
                <phase>compile</phase>  
                <goals>  
                    <goal>java</goal>  
                </goals>  
                <configuration>  
                 <mainClass>com.mycompany.RepositoryGenerator</mainClass>  
                 <arguments>  
                  <argument>${project.build.directory}/classes</argument>  
                 
<argument>${project.build.directory}/model_to_guvnor</argument>
                  <argument>${app-version}</argument>
                  <argument>${app-build-date}</argument>
                 </arguments>  
                </configuration>  
               </execution>  
              </executions>  
             </plugin>  
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Guvnor-bulk-importer-problem-tp1488360p2310754.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list