[jboss-svn-commits] JBL Code SVN: r36085 - in labs/jbossrules/trunk: drools-guvnor and 9 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Nov 26 09:20:50 EST 2010
Author: Rikkola
Date: 2010-11-26 09:20:49 -0500 (Fri, 26 Nov 2010)
New Revision: 36085
Added:
labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/
labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsBuilder.java
labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsComponentFactory.java
labs/jbossrules/trunk/drools-verifier/src/test/java/org/drools/verifier/doc/
labs/jbossrules/trunk/drools-verifier/src/test/java/org/drools/verifier/doc/StandaloneDocBuilder.java
labs/jbossrules/trunk/drools-verifier/src/test/resources/org/drools/verifier/doc/
labs/jbossrules/trunk/drools-verifier/src/test/resources/org/drools/verifier/doc/simple.drl
Removed:
labs/jbossrules/trunk/drools-doc/
Modified:
labs/jbossrules/trunk/drools-guvnor/pom.xml
labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/GuvnorDroolsDocsBuilder.java
labs/jbossrules/trunk/drools-verifier/pom.xml
labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/maven-eclipse.xml
labs/jbossrules/trunk/pom.xml
Log:
removed drools-doc
Modified: labs/jbossrules/trunk/drools-guvnor/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/pom.xml 2010-11-26 13:47:31 UTC (rev 36084)
+++ labs/jbossrules/trunk/drools-guvnor/pom.xml 2010-11-26 14:20:49 UTC (rev 36085)
@@ -172,10 +172,6 @@
</dependency>
<dependency>
<groupId>org.drools</groupId>
- <artifactId>drools-doc</artifactId>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
<artifactId>drools-verifier</artifactId>
</dependency>
<dependency>
Modified: labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/GuvnorDroolsDocsBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/GuvnorDroolsDocsBuilder.java 2010-11-26 13:47:31 UTC (rev 36084)
+++ labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/GuvnorDroolsDocsBuilder.java 2010-11-26 14:20:49 UTC (rev 36085)
@@ -23,7 +23,6 @@
import java.util.List;
import org.drools.compiler.DroolsParserException;
-import org.drools.doc.DroolsDocsBuilder;
import org.drools.guvnor.client.common.AssetFormats;
import org.drools.guvnor.server.ServiceImplementation;
import org.drools.guvnor.server.builder.BRMSPackageBuilder;
@@ -34,6 +33,7 @@
import org.drools.repository.CategoryItem;
import org.drools.repository.PackageItem;
import org.drools.repository.VersionableItem;
+import org.drools.verifier.doc.DroolsDocsBuilder;
import org.drools.verifier.misc.DrlPackageParser;
import org.drools.verifier.misc.DrlRuleParser;
Modified: labs/jbossrules/trunk/drools-verifier/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-verifier/pom.xml 2010-11-26 13:47:31 UTC (rev 36084)
+++ labs/jbossrules/trunk/drools-verifier/pom.xml 2010-11-26 14:20:49 UTC (rev 36085)
@@ -33,5 +33,9 @@
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.lowagie</groupId>
+ <artifactId>itext</artifactId>
+ </dependency>
</dependencies>
</project>
Copied: labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsBuilder.java (from rev 36081, labs/jbossrules/trunk/drools-doc/src/main/java/org/drools/doc/DroolsDocsBuilder.java)
===================================================================
--- labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsBuilder.java (rev 0)
+++ labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsBuilder.java 2010-11-26 14:20:49 UTC (rev 36085)
@@ -0,0 +1,115 @@
+/**
+ * Copyright 2010 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.drools.verifier.doc;
+
+import java.io.OutputStream;
+import java.text.Format;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.drools.verifier.misc.DrlPackageParser;
+import org.drools.verifier.misc.DrlRuleParser;
+
+import com.lowagie.text.Document;
+import com.lowagie.text.DocumentException;
+import com.lowagie.text.HeaderFooter;
+import com.lowagie.text.Phrase;
+import com.lowagie.text.pdf.PdfWriter;
+
+/**
+ *
+ * @author Toni Rikkola
+ *
+ */
+public class DroolsDocsBuilder {
+
+ protected final String currentDate = getFormatter().format( new Date() );
+
+ protected static Format getFormatter() {
+ return new SimpleDateFormat( getDateFormatMask() );
+ }
+
+ private final DrlPackageParser packageData;
+
+ public DroolsDocsBuilder(String packageDrl) throws ParseException {
+ this.packageData = DrlPackageParser.findPackageDataFromDrl( packageDrl );
+ }
+
+ protected DroolsDocsBuilder(DrlPackageParser packageData) {
+ this.packageData = packageData;
+ }
+
+ public static DroolsDocsBuilder getInstance(String packageDrl) throws ParseException {
+ return new DroolsDocsBuilder( packageDrl );
+ }
+
+ public static DroolsDocsBuilder getInstance(DrlPackageParser packageData) {
+ return new DroolsDocsBuilder( packageData );
+ }
+
+ public void writePDF(OutputStream out) {
+
+ // TODO: Use i18n!
+
+ Document document = new Document();
+
+ try {
+ PdfWriter.getInstance( document,
+ out );
+
+ HeaderFooter footer = DroolsDocsComponentFactory.createFooter( packageData.getName() );
+
+ document.setFooter( footer );
+
+ document.addTitle( packageData.getName().toUpperCase() );
+ document.open();
+
+ // First page, documentation info.
+ DroolsDocsComponentFactory.createFirstPage( document,
+ currentDate,
+ packageData );
+
+ document.newPage();
+
+ // List index of the rules
+ document.add( new Phrase( "Table of Contents" ) );
+ document.add( DroolsDocsComponentFactory.createContents( packageData.getRules() ) );
+
+ document.newPage();
+
+ for ( DrlRuleParser ruleData : packageData.getRules() ) {
+ DroolsDocsComponentFactory.newRulePage( document,
+ packageData.getName(),
+ ruleData );
+ }
+
+ } catch ( DocumentException de ) {
+ System.err.println( de.getMessage() );
+ }
+
+ document.close();
+ }
+
+ public static String getDateFormatMask() {
+ String fmt = System.getProperty( "drools.dateformat" );
+ if ( fmt == null ) {
+ fmt = "dd-MMM-yyyy";
+ }
+ return fmt;
+ }
+}
Copied: labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsComponentFactory.java (from rev 36081, labs/jbossrules/trunk/drools-doc/src/main/java/org/drools/doc/DroolsDocsComponentFactory.java)
===================================================================
--- labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsComponentFactory.java (rev 0)
+++ labs/jbossrules/trunk/drools-verifier/src/main/java/org/drools/verifier/doc/DroolsDocsComponentFactory.java 2010-11-26 14:20:49 UTC (rev 36085)
@@ -0,0 +1,347 @@
+/**
+ * Copyright 2010 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.drools.verifier.doc;
+
+import java.awt.Color;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Vector;
+
+import org.drools.verifier.misc.DrlPackageParser;
+import org.drools.verifier.misc.DrlRuleParser;
+
+
+import com.lowagie.text.BadElementException;
+import com.lowagie.text.Cell;
+import com.lowagie.text.Chunk;
+import com.lowagie.text.Document;
+import com.lowagie.text.DocumentException;
+import com.lowagie.text.Element;
+import com.lowagie.text.ExceptionConverter;
+import com.lowagie.text.Font;
+import com.lowagie.text.FontFactory;
+import com.lowagie.text.HeaderFooter;
+import com.lowagie.text.Image;
+import com.lowagie.text.List;
+import com.lowagie.text.ListItem;
+import com.lowagie.text.Paragraph;
+import com.lowagie.text.Phrase;
+import com.lowagie.text.Rectangle;
+import com.lowagie.text.Table;
+import com.lowagie.text.pdf.PdfPCell;
+import com.lowagie.text.pdf.PdfPTable;
+import com.lowagie.text.pdf.PdfPageEventHelper;
+import com.lowagie.text.pdf.PdfWriter;
+
+public class DroolsDocsComponentFactory {
+
+ private static final int INDENTATION_LEFT = 20;
+
+ private static final String INDENT = " ";
+
+ private static final Font CHAPTER_TITLE = FontFactory.getFont( FontFactory.TIMES,
+ 20,
+ Font.BOLD );
+ private static final Font PACKAGE_NAME = FontFactory.getFont( FontFactory.TIMES,
+ 10,
+ Font.BOLD );
+ private static final Font RULE_PACKAGE_TITLE = FontFactory.getFont( FontFactory.TIMES,
+ 24,
+ Font.BOLD );
+ private static final Font CATEGORIES_TEXT = FontFactory.getFont( FontFactory.TIMES,
+ 12 );
+ private static final Font BODY_TEXT = FontFactory.getFont( FontFactory.TIMES,
+ 10 );
+ static final Font HEADER_FOOTER_TEXT = FontFactory.getFont( FontFactory.TIMES,
+ 8 );
+
+ public static Table newDescription(String description) throws DocumentException {
+ if ( description == null || "".equals( description ) ) {
+ description = " - ";
+ }
+
+ Table table = newTable();
+
+ Cell headerCell = newHeaderCell( "Description",
+ CATEGORIES_TEXT );
+ table.addCell( headerCell );
+
+ table.addCell( newCell( description ) );
+
+ return table;
+ }
+
+ private static Table newTable() throws BadElementException {
+ Table table = new Table( 1 );
+
+ table.setBorderWidthTop( 1 );
+ table.setBorderWidthLeft( 1 );
+ table.setBorderWidthRight( 1 );
+ table.setBorderWidthBottom( 0 );
+ table.setWidth( 100 );
+ table.setPadding( 3 );
+ table.setAlignment( Table.ALIGN_LEFT );
+
+ return table;
+ }
+
+ public static void createOtherItems(Document document,
+ Map<String, java.util.List<String>> other) throws DocumentException {
+
+ for ( String key : other.keySet() ) {
+ document.add( newTable( key,
+ other.get( key ) ) );
+ }
+ }
+
+ public static Table newRuleTable(DrlRuleParser drl) throws BadElementException,
+ DocumentException {
+ Table table = newTable();
+
+ Cell headerCell = newHeaderCell( "Attributes",
+ CATEGORIES_TEXT );
+ table.addCell( headerCell );
+
+ for ( String s : drl.getHeader() ) {
+ table.addCell( newCell( INDENT + s.trim() ) );
+ }
+
+ table.addCell( newHeaderCell( INDENT + "WHEN",
+ BODY_TEXT ) );
+ for ( String s : drl.getLhs() ) {
+ table.addCell( newCell( INDENT + INDENT + s.trim() ) );
+ }
+
+ table.addCell( newHeaderCell( INDENT + "THEN",
+ BODY_TEXT ) );
+ for ( String s : drl.getRhs() ) {
+ table.addCell( newCell( INDENT + INDENT + s.trim() ) );
+ }
+ // table.addCell( newEmptyWhenThenCell( "END" ) );
+
+ return table;
+ }
+
+ public static Table newTable(final String topic,
+ Collection<String> items) throws BadElementException,
+ DocumentException {
+ Table table = newTable();
+
+ Cell headerCell = newHeaderCell( topic,
+ CATEGORIES_TEXT );
+ table.addCell( headerCell );
+
+ if ( items.isEmpty() ) {
+ table.addCell( newCell( " - " ) );
+ } else {
+ for ( String s : items ) {
+ table.addCell( newCell( s ) );
+ }
+ }
+
+ return table;
+ }
+
+ public static List createContents(java.util.List<DrlRuleParser> rules) {
+ List index = new List( true );
+
+ for ( DrlRuleParser drlRuleData : rules ) {
+ Chunk chunk = new Chunk( drlRuleData.getName() );
+ // chunk.setLocalGoto( item.getName() );
+ ListItem listItem = new ListItem( chunk );
+ index.add( listItem );
+ }
+
+ return index;
+ }
+
+ private static Cell newHeaderCell(String text,
+ Font font) throws BadElementException {
+ Cell c = new Cell( new Phrase( text,
+ font ) );
+ c.setBackgroundColor( Color.decode( "#CCCCFF" ) );
+ c.setLeading( 10 );
+ c.setBorder( 1 );
+
+ return c;
+ }
+
+ private static Cell newCell(String text) throws BadElementException {
+ Cell c = new Cell( new Phrase( text,
+ BODY_TEXT ) );
+ c.setLeading( 10 );
+ c.setBorder( 0 );
+ c.setBorderWidthBottom( 1 );
+
+ return c;
+ }
+
+ public static HeaderFooter createFooter(String packageName) {
+ HeaderFooter footer = new HeaderFooter( new Phrase( packageName + "-",
+ HEADER_FOOTER_TEXT ),
+ true );
+ footer.setBorder( 1 );
+ footer.setAlignment( Element.ALIGN_RIGHT );
+
+ return footer;
+ }
+
+ private static String[] splitFirst(String source, String splitter) {
+ Vector rv = new Vector();
+ int last = 0;
+ int next = 0;
+
+ next = source.indexOf(splitter, last);
+ if (next != -1)
+ {
+ rv.add(source.substring(last, next));
+ last = next + splitter.length();
+ }
+
+ if (last < source.length())
+ {
+ rv.add(source.substring(last, source.length()));
+ }
+
+ return (String[]) rv.toArray(new String[rv.size()]);
+ }
+
+
+ public static void newRulePage(Document document,
+ String packageName,
+ DrlRuleParser drlData) throws DocumentException {
+
+ document.add( new Paragraph( packageName,
+ PACKAGE_NAME ) );
+ document.add( new Paragraph( "Rule " + drlData.getName(),
+ CHAPTER_TITLE ) );
+
+ // Extends
+ int index = drlData.getName().lastIndexOf( "extends" );
+ if ( index > 0 ) {
+ document.add( new Paragraph( "Extends:",
+ BODY_TEXT ) );
+
+ Paragraph ext = new Paragraph( drlData.getName().substring( "extends".length() + index ),
+ BODY_TEXT );
+ ext.setIndentationLeft(INDENTATION_LEFT);
+ document.add( ext );
+ }
+
+ // if the data came from guvnor, this will be empty
+ if(drlData.getDescription() != null && drlData.getDescription().trim().equals("")) {
+ Iterator<String> iter = drlData.getMetadata().iterator();
+ while(iter.hasNext()) {
+ String nextDesc = iter.next();
+ if(nextDesc.startsWith("Description")) {
+ String[] parts = splitFirst(nextDesc, ":");
+ // no description
+ if(parts.length == 1) {
+ // guvnor did not have it
+ document.add( newDescription( drlData.getDescription() ) );
+ } else {
+ document.add(newDescription(parts[1]));
+ }
+ }
+ }
+
+ } else {
+ document.add( newDescription( drlData.getDescription() ) );
+ }
+
+ // DRL
+ document.add( newRuleTable( drlData ) );
+
+ // Meta data
+ document.add( newTable( "Metadata",
+ drlData.getMetadata() ) );
+
+ // Other
+ createOtherItems( document,
+ drlData.getOtherInformation() );
+
+ document.newPage();
+ }
+
+ public static void createFirstPage(Document document,
+ String currentDate,
+ DrlPackageParser packageData) throws DocumentException {
+ Paragraph title = new Paragraph( "\n\n\n\n\n" + packageData.getName().toUpperCase(),
+ RULE_PACKAGE_TITLE );
+ title.setAlignment( Element.ALIGN_CENTER );
+ document.add( title );
+
+ Paragraph date = new Paragraph( "Documentation created: " + currentDate,
+ BODY_TEXT );
+ date.setAlignment( Element.ALIGN_CENTER );
+ document.add( date );
+
+ document.add( new Paragraph( "\n\n\n\n\n" + packageData.getDescription(),
+ BODY_TEXT ) );
+ document.add( newTable( "Metadata ",
+ packageData.getMetadata() ) );
+ document.add( newTable( "Globals ",
+ packageData.getGlobals() ) );
+ createOtherItems( document,
+ packageData.getOtherInformation() );
+ }
+}
+
+class EndPage extends PdfPageEventHelper {
+ private final String currentDate;
+
+ public EndPage(String currentDate) {
+ this.currentDate = currentDate;
+ }
+
+ public void onEndPage(PdfWriter writer,
+ Document document) {
+
+ try {
+ Image image = Image.getInstance( DroolsDocsBuilder.class.getResource( "drools-guvnor.png" ) );
+ image.setAlignment( Image.RIGHT );
+ image.scaleAbsolute( 100,
+ 30 );
+ Rectangle page = document.getPageSize();
+ PdfPTable head = new PdfPTable( 2 );
+
+ PdfPCell cell1 = new PdfPCell( image );
+ cell1.setHorizontalAlignment( Element.ALIGN_LEFT );
+ cell1.setBorder( 0 );
+
+ head.addCell( cell1 );
+
+ PdfPCell cell2 = new PdfPCell( new Phrase( currentDate,
+ DroolsDocsComponentFactory.HEADER_FOOTER_TEXT ) );
+ cell2.setHorizontalAlignment( Element.ALIGN_RIGHT );
+ cell2.setBorder( 0 );
+
+ head.addCell( cell2 );
+
+ head.setTotalWidth( page.getWidth() - document.leftMargin() - document.rightMargin() );
+ head.writeSelectedRows( 0,
+ -1,
+ document.leftMargin(),
+ page.getHeight() - document.topMargin() + head.getTotalHeight(),
+ writer.getDirectContent() );
+
+ } catch ( Exception e ) {
+ throw new ExceptionConverter( e );
+ }
+ }
+}
Copied: labs/jbossrules/trunk/drools-verifier/src/test/java/org/drools/verifier/doc/StandaloneDocBuilder.java (from rev 36081, labs/jbossrules/trunk/drools-doc/src/test/java/org/drools/doc/StandaloneDocBuilder.java)
===================================================================
--- labs/jbossrules/trunk/drools-verifier/src/test/java/org/drools/verifier/doc/StandaloneDocBuilder.java (rev 0)
+++ labs/jbossrules/trunk/drools-verifier/src/test/java/org/drools/verifier/doc/StandaloneDocBuilder.java 2010-11-26 14:20:49 UTC (rev 36085)
@@ -0,0 +1,94 @@
+/**
+ * Copyright 2010 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.drools.verifier.doc;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.text.ParseException;
+
+import org.drools.verifier.doc.DroolsDocsBuilder;
+
+/**
+ * Stand alone to test writing to a file.
+ *
+ * @author Toni Rikkola
+ *
+ */
+public class StandaloneDocBuilder {
+
+ public static void main(String[] args) throws FileNotFoundException,
+ ParseException {
+
+ String drl = "";
+ drl += "# important information\n";
+ drl += "# about this package\n";
+ drl += "# it contains some rules\n";
+ drl += "package org.drools.test\n";
+ drl += "global java.util.List list\n";
+ drl += "# Really important information about this rule \n";
+ drl += "# Another line because one was not enough \n";
+ drl += "# \n";
+ drl += "# @author: trikkola \n";
+ drl += "rule \"First\" \n";
+ drl += " dialect \"mvel\" \n";
+ drl += " when \n ";
+ drl += " Person() \n ";
+ drl += " Cheesery() \n ";
+ drl += " then \n ";
+ drl += " applicant.setApproved(true) \n";
+ drl += " applicant.setName( \"Toni\" ) \n";
+ drl += " applicant.setAge( 10 ) \n";
+ drl += "end \n";
+ drl += "\n";
+ drl += "# Really important information about this rule \n";
+ drl += "# Another line because one was not enough \n";
+ drl += "# \n";
+ drl += "# @author: trikkola \n";
+ drl += "# @created: 29.12.2001 \n";
+ drl += "# @edited: 5.5.2005 \n";
+ drl += "rule \"Second\" \n";
+ drl += " dialect \"mvel\" \n";
+ drl += " when \n ";
+ drl += " Person() \n ";
+ drl += " Cheesery() \n ";
+ drl += " then \n ";
+ drl += " applicant.setApproved(true) \n";
+ drl += " applicant.setName( \"Toni\" ) \n";
+ drl += " applicant.setAge( 10 ) \n";
+ drl += "end";
+ drl += "\n";
+ drl += "rule \"Third\" \n";
+ drl += " dialect \"mvel\" \n";
+ drl += " when \n ";
+ drl += " Person() \n ";
+ drl += " Cheesery() \n ";
+ drl += " then \n ";
+ drl += " applicant.setApproved(true) \n";
+ drl += " applicant.setName( \"Toni\" ) \n";
+ drl += " applicant.setAge( 10 ) \n";
+ drl += "end";
+
+ DroolsDocsBuilder ddBuilder = DroolsDocsBuilder.getInstance( drl );
+
+ File file = new File( "/Users/rikkola/Desktop/DroolsDoc.pdf" );
+ OutputStream out = new FileOutputStream( file );
+
+ ddBuilder.writePDF( out );
+ }
+}
Copied: labs/jbossrules/trunk/drools-verifier/src/test/resources/org/drools/verifier/doc/simple.drl (from rev 36081, labs/jbossrules/trunk/drools-doc/src/test/resources/org/drools/doc/simple.drl)
===================================================================
--- labs/jbossrules/trunk/drools-verifier/src/test/resources/org/drools/verifier/doc/simple.drl (rev 0)
+++ labs/jbossrules/trunk/drools-verifier/src/test/resources/org/drools/verifier/doc/simple.drl 2010-11-26 14:20:49 UTC (rev 36085)
@@ -0,0 +1,45 @@
+/**
+ * Copyright 2010 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#created on: 12-Sep-2009
+package org.drools.doc
+
+#list any import classes here.
+
+
+
+#declare any global variables here
+
+
+
+
+rule "Your First Rule"
+
+ when
+ #conditions
+ then
+ #actions
+
+end
+
+rule "Your Second Rule"
+ #include attributes such as "salience" here...
+ when
+ #conditions
+ then
+ #actions
+
+end
Modified: labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/maven-eclipse.xml
===================================================================
--- labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/maven-eclipse.xml 2010-11-26 13:47:31 UTC (rev 36084)
+++ labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/maven-eclipse.xml 2010-11-26 14:20:49 UTC (rev 36085)
@@ -1,11 +1,11 @@
-<project default="copy-resources">
- <target name="init"/>
- <target name="copy-resources" depends="init">
- <copy todir="target/classes/META-INF" filtering="false">
- <fileset dir="META-INF" includes="" excludes="**/*.java"/>
- </copy>
- <copy todir="target/classes/lib" filtering="false">
- <fileset dir="lib" includes="*.jar" excludes="**/*.java"/>
- </copy>
- </target>
+<project default="copy-resources">
+ <target name="init"/>
+ <target name="copy-resources" depends="init">
+ <copy todir="target/classes/META-INF" filtering="false">
+ <fileset dir="META-INF" includes="" excludes="**/*.java"/>
+ </copy>
+ <copy todir="target/classes/lib" filtering="false">
+ <fileset dir="lib" includes="*.jar" excludes="**/*.java"/>
+ </copy>
+ </target>
</project>
\ No newline at end of file
Modified: labs/jbossrules/trunk/pom.xml
===================================================================
--- labs/jbossrules/trunk/pom.xml 2010-11-26 13:47:31 UTC (rev 36084)
+++ labs/jbossrules/trunk/pom.xml 2010-11-26 14:20:49 UTC (rev 36085)
@@ -272,7 +272,6 @@
<module>drools-flow-compiler</module>
<module>drools-container</module>
<module>drools-decisiontables</module>
- <module>drools-doc</module>
<module>drools-factconstraint</module>
<module>drools-grid</module>
<module>drools-guvnor</module>
@@ -998,11 +997,6 @@
</dependency>
<dependency>
<groupId>org.drools</groupId>
- <artifactId>drools-doc</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
<artifactId>drools-repository</artifactId>
<version>${project.version}</version>
</dependency>
More information about the jboss-svn-commits
mailing list