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/Reposit...
RepositoryGenerator.java
http://drools-java-rules-engine.46999.n3.nabble.com/file/n2310754/Knowled...
KnowledgeGenerator.java
http://drools-java-rules-engine.46999.n3.nabble.com/file/n2310754/RulesGe...
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-...
Sent from the Drools - User mailing list archive at
Nabble.com.