From: <sha...@us...> - 2011-11-12 23:10:35
|
Revision: 3399 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3399&view=rev Author: shadowtm Date: 2011-11-12 23:10:28 +0000 (Sat, 12 Nov 2011) Log Message: ----------- Cleaned up CLI output so that stacktraces could be minimized and more user friendly messages displayed. Modified Paths: -------------- trunk/components-core/pom.xml trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java trunk/components-ext/pom.xml trunk/interfaces/pom.xml trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java trunk/interfaces/src/main/java/org/dllearner/configuration/spring/ComponentInitializationBeanPostProcessor.java trunk/interfaces/src/main/java/org/dllearner/configuration/spring/DefaultApplicationContextBuilder.java trunk/interfaces/src/main/resources/log4j.properties trunk/interfaces/src/test/java/org/dllearner/configuration/spring/TestBean.java trunk/pom.xml Modified: trunk/components-core/pom.xml =================================================================== --- trunk/components-core/pom.xml 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/components-core/pom.xml 2011-11-12 23:10:28 UTC (rev 3399) @@ -277,11 +277,12 @@ </dependency> + <!-- This module is a library module, so it needs only to have the slf api dependency to enable logging --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>1.5.8</version> </dependency> + <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -511,6 +511,7 @@ logger.info("Algorithm stopped ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); } else { logger.info("Algorithm terminated successfully ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); + logger.info(reasoner.toString()); } if(singleSuggestionMode) { Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -514,6 +514,7 @@ logger.info("Algorithm stopped ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); } else { logger.info("Algorithm terminated successfully ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); + logger.info(reasoner.toString()); } if(singleSuggestionMode) { Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -392,6 +392,7 @@ logger.info("Algorithm stopped ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); } else { logger.info("Algorithm terminated successfully ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); + logger.info(reasoner.toString()); } if(singleSuggestionMode) { Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -520,6 +520,7 @@ logger.info("Algorithm stopped ("+conceptTests+" descriptions tested).\n"); } else { logger.info("Algorithm terminated successfully ("+conceptTests+" descriptions tested).\n"); + logger.info(rs.toString()); } totalLearningTime.stop(); Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -147,7 +147,7 @@ Set<OWLOntology> allImports = new HashSet<OWLOntology>(); prefixes = new TreeMap<String, String>(); - + Set<OWLImportsDeclaration> directImports = new HashSet<OWLImportsDeclaration>(); for (AbstractKnowledgeSource source : sources) { @@ -202,9 +202,9 @@ } } catch (OWLOntologyCreationException e) { - e.printStackTrace(); + throw new RuntimeException(e); } catch (URISyntaxException e) { - e.printStackTrace(); + throw new RuntimeException(e); } // all other sources are converted to KB and then to an // OWL API ontology @@ -217,7 +217,7 @@ try { ontology = manager.createOntology(ontologyURI); } catch (OWLOntologyCreationException e) { - e.printStackTrace(); + throw new RuntimeException(e); } OWLAPIAxiomConvertVisitor.fillOWLOntology(manager, ontology, kb); owlAPIOntologies.add(ontology); @@ -232,8 +232,8 @@ ontology = manager.createOntology(IRI.create("http://dl-learner/all"), new HashSet<OWLOntology>(owlAPIOntologies)); //we have to add all import declarations manually here, because this are no axioms List<OWLOntologyChange> addImports = new ArrayList<OWLOntologyChange>(); - for(OWLImportsDeclaration i : directImports){ - addImports.add(new AddImport(ontology, i)); + for (OWLImportsDeclaration i : directImports) { + addImports.add(new AddImport(ontology, i)); } manager.applyChanges(addImports); } catch (OWLOntologyCreationException e1) { @@ -252,7 +252,7 @@ try { reasoner = new FaCTPlusPlusReasonerFactory().createNonBufferingReasoner(ontology, conf); } catch (Exception e) { - e.printStackTrace(); + throw new RuntimeException(e); } System.out.println("Using FaCT++."); } else if (getReasonerTypeString().equals("hermit")) { @@ -340,7 +340,7 @@ for (OWLNamedIndividual owlIndividual : owlIndividuals) { individuals.add(new Individual(owlIndividual.toStringID())); } - + // remove top and bottom properties (for backwards compatibility) // atomicRoles.remove(new ObjectProperty("http://www.w3.org/2002/07/owl#bottomObjectProperty")); // atomicRoles.remove(new ObjectProperty("http://www.w3.org/2002/07/owl#topObjectProperty")); @@ -779,8 +779,8 @@ // take one element from the set and ignore the rest // (TODO: we need to make sure we always ignore the same concepts) OWLObjectPropertyExpression property = node.getRepresentativeElement(); - if(!property.isAnonymous()) { - roles.add(new ObjectProperty(property.asOWLObjectProperty().toStringID())); + if (!property.isAnonymous()) { + roles.add(new ObjectProperty(property.asOWLObjectProperty().toStringID())); } } roles.remove(new ObjectProperty(factory.getOWLTopObjectProperty().toStringID())); Modified: trunk/components-ext/pom.xml =================================================================== --- trunk/components-ext/pom.xml 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/components-ext/pom.xml 2011-11-12 23:10:28 UTC (rev 3399) @@ -52,19 +52,42 @@ <groupId>org.aksw.commons</groupId> <artifactId>sparql</artifactId> </dependency> + <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-core</artifactId> - <version>3.3.0</version> - <type>jar</type> - <scope>compile</scope> </dependency> + + <!--BEGIN Logging Dependencies--> + + <!--This is the api jar, it's needed at compile time--> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>1.6.0</version> </dependency> + + <!--This is the bridge that ties calls to the slf4j api to the log4j framework. This is a runtime dependency for programs which wish to use log4j as their implementation.--> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <scope>runtime</scope> + </dependency> + + <!-- This is the concrete implementation of the log4j framework - it is a runtime dependency that needs to be used with the slf4j-log4j12 dependency --> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <scope>runtime</scope> + </dependency> + <!--END Logging Dependencies--> + + + <dependency> <groupId>edu.stanford</groupId> <artifactId>postagger</artifactId> <version>3.0.2</version> @@ -148,7 +171,6 @@ <dependency> <groupId>org.nlp2rdf</groupId> <artifactId>nif</artifactId> - <version>1.1-SNAPSHOT</version> </dependency> Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/interfaces/pom.xml 2011-11-12 23:10:28 UTC (rev 3399) @@ -56,9 +56,9 @@ <mainClass>org.dllearner.cli.Enrichment</mainClass> <name>enrichment</name> </program> - <!-- <program> <mainClass>org.dllearner.gui.StartGUI</mainClass> - <name>gui</name> </program> <program> <mainClass>org.dllearner.cli.QuickStart</mainClass> - <name>quickstart</name> </program> <program> <mainClass>org.dllearner.server.DLLearnerWS</mainClass> + <!-- <program> <mainClass>org.dllearner.gui.StartGUI</mainClass> + <name>gui</name> </program> <program> <mainClass>org.dllearner.cli.QuickStart</mainClass> + <name>quickstart</name> </program> <program> <mainClass>org.dllearner.server.DLLearnerWS</mainClass> <name>ws</name> </program> --> </programs> </configuration> @@ -171,10 +171,10 @@ </requestLog> </configuration> <!--execution is used for testing --> - <!--executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> - <goals> <goal>run</goal> </goals> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> - <daemon>true</daemon> <stopKey>stopKey</stopKey> <stopPort>9999</stopPort> - </configuration> </execution> <execution> <id>stop-jetty</id> <phase>post-integration-test</phase> + <!--executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> + <goals> <goal>run</goal> </goals> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> + <daemon>true</daemon> <stopKey>stopKey</stopKey> <stopPort>9999</stopPort> + </configuration> </execution> <execution> <id>stop-jetty</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions --> </plugin> @@ -205,8 +205,8 @@ <dependency> <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> - </dependency> - <!-- Added the dependency of the core tests so that they will be accessible + </dependency> + <!-- Added the dependency of the core tests so that they will be accessible from the tests in this component --> <dependency> <groupId>org.dllearner</groupId> @@ -267,6 +267,45 @@ <artifactId>spring-xmlbeans-3.0</artifactId> <version>1.0</version> </dependency> + + <dependency> + <groupId>net.sf.jopt-simple</groupId> + <artifactId>jopt-simple</artifactId> + </dependency> + + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + </dependency> + + <!--BEGIN Logging Dependencies--> + + <!--This is the api jar, it's needed at compile time--> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + + <!--This is the bridge that ties calls to the slf4j api to the log4j framework. This is a runtime dependency for programs which wish to use log4j as their implementation.--> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <scope>runtime</scope> + </dependency> + + <!--Log4J dependency needed for the runtime as well as some specific compile time calls--> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <scope>runtime</scope> + </dependency> + <!--END Logging Dependencies--> + </dependencies> Modified: trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/interfaces/src/main/java/org/dllearner/cli/CLI.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -20,7 +20,9 @@ package org.dllearner.cli; import java.io.File; +import java.io.FileOutputStream; import java.io.IOException; +import java.io.PrintStream; import java.util.ArrayList; import java.util.List; @@ -139,12 +141,6 @@ */ public static void main(String[] args) throws ParseException, IOException, ReasoningMethodUnsupportedException { - Layout layout = new PatternLayout(); - ConsoleAppender consoleAppender = new ConsoleAppender(layout); - rootLogger.removeAllAppenders(); - rootLogger.addAppender(consoleAppender); - rootLogger.setLevel(Level.INFO); - // System.out.println("DL-Learner " + Info.build + " [TODO: read pom.version and put it here (make sure that the code for getting the version also works in the release build!)] command line interface"); System.out.println("DL-Learner command line interface"); @@ -168,24 +164,32 @@ //DL-Learner Configuration Object IConfiguration configuration = new ConfParserConfiguration(confFile); - ApplicationContextBuilder builder = new DefaultApplicationContextBuilder(); - ApplicationContext context = builder.buildApplicationContext(configuration,springConfigResources); - - // TODO: later we could check which command line interface is specified in the conf file - // for now we just use the default one - - CLI cli; - if(context.containsBean("cli")) { - cli = (CLI) context.getBean("cli"); - } else { - cli = new CLI(); + try { + ApplicationContextBuilder builder = new DefaultApplicationContextBuilder(); + ApplicationContext context = builder.buildApplicationContext(configuration,springConfigResources); + + // TODO: later we could check which command line interface is specified in the conf file + // for now we just use the default one + + CLI cli; + if(context.containsBean("cli")) { + cli = (CLI) context.getBean("cli"); + } else { + cli = new CLI(); + } + cli.setContext(context); + cli.setConfFile(file); + cli.run(); + } catch (Exception e) { + String stacktraceFileName = "log/error.log"; + logger.error("An Error Occurred During Processing. Terminating DL-Learner...and writing stacktrace to: " + stacktraceFileName); + FileOutputStream fos = new FileOutputStream(stacktraceFileName); + PrintStream ps = new PrintStream(fos); + e.printStackTrace(ps); } - cli.setContext(context); - cli.setConfFile(file); - cli.run(); - - } + } + public void setContext(ApplicationContext context) { this.context = context; } Modified: trunk/interfaces/src/main/java/org/dllearner/configuration/spring/ComponentInitializationBeanPostProcessor.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/configuration/spring/ComponentInitializationBeanPostProcessor.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/interfaces/src/main/java/org/dllearner/configuration/spring/ComponentInitializationBeanPostProcessor.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -1,29 +1,49 @@ package org.dllearner.configuration.spring; +import org.dllearner.core.AnnComponentManager; import org.dllearner.core.Component; import org.dllearner.core.ComponentInitException; +import org.dllearner.utilities.Helper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; +import java.util.Date; + /** * Created by IntelliJ IDEA. * User: Chris * Date: 8/23/11 * Time: 7:00 AM - * + * <p/> * Post Processor to initialize our components. */ -public class ComponentInitializationBeanPostProcessor implements BeanPostProcessor{ +public class ComponentInitializationBeanPostProcessor implements BeanPostProcessor { + private static Logger logger = LoggerFactory.getLogger(ComponentInitializationBeanPostProcessor.class); + @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - if(bean instanceof Component){ + if (bean instanceof Component) { Component c = (Component) bean; + + String componentName = AnnComponentManager.getName(c); try { + + Date startTime = new Date(); c.init(); + Date stopTime = new Date(); + long elapsedTime = stopTime.getTime() - startTime.getTime(); + + logger.info("Initializing Component \"" + componentName + "\"... OK (" + Helper.prettyPrintMilliSeconds(elapsedTime) + ")"); } catch (ComponentInitException e) { - throw new RuntimeException("Problem initializing the component with beanName: " + beanName,e); + throw new RuntimeException("Problem initializing the component \"" + componentName + "\" with beanName: " + beanName, e); + } catch (Exception e) { + /** Catch any exception as an init exception */ + logger.warn("Could not initialize component \"" + componentName + "\""); + throw new RuntimeException(e); } } return bean; Modified: trunk/interfaces/src/main/java/org/dllearner/configuration/spring/DefaultApplicationContextBuilder.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/configuration/spring/DefaultApplicationContextBuilder.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/interfaces/src/main/java/org/dllearner/configuration/spring/DefaultApplicationContextBuilder.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -6,6 +6,9 @@ import java.util.List; import org.dllearner.configuration.IConfiguration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor; import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; @@ -23,6 +26,8 @@ */ public class DefaultApplicationContextBuilder implements ApplicationContextBuilder{ + private static Logger logger = LoggerFactory.getLogger(DefaultApplicationContextBuilder.class); + @Override public ApplicationContext buildApplicationContext(IConfiguration configuration, List<Resource> springConfigurationLocations) throws IOException{ ConfigurableApplicationContext context = null; @@ -51,7 +56,15 @@ context.addBeanFactoryPostProcessor(beanDefinitionRegistryPostProcessor); //Instantiate and initialize the beans. - context.refresh(); + try { + context.refresh(); + } catch (BeanCreationException e) { + logger.error("There was a problem creating the bean named \"" + e.getBeanName() + "\" - Check your configuration file and try again."); + throw new RuntimeException(e); + } catch (Exception e) { + logger.error("There was a problem initializing the components...shutting down."); + throw new RuntimeException(e); + } return context; } } Modified: trunk/interfaces/src/main/resources/log4j.properties =================================================================== --- trunk/interfaces/src/main/resources/log4j.properties 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/interfaces/src/main/resources/log4j.properties 2011-11-12 23:10:28 UTC (rev 3399) @@ -2,17 +2,20 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-20c{1} :: %m%n log4j.appender.file=org.apache.log4j.FileAppender log4j.appender.file.File=log/interfaces.log log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern= %-4r [%t] %-5p %c %x - %m%n -# Joseki server logging -log4j.logger.org.dllearner=DEBUG +# DL-Learner Logs +log4j.logger.org.dllearner=INFO + log4j.logger.org.dllearner.server.nke.LogicalRelationStrategy=DEBUG +# Eliminate most of the Spring Context Loading noise +log4j.logger.org.springframework=WARN + ## log4j.logger.org.joseki.server.http.LocatorServletContext=ALL # Jena, including the Joseki client Modified: trunk/interfaces/src/test/java/org/dllearner/configuration/spring/TestBean.java =================================================================== --- trunk/interfaces/src/test/java/org/dllearner/configuration/spring/TestBean.java 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/interfaces/src/test/java/org/dllearner/configuration/spring/TestBean.java 2011-11-12 23:10:28 UTC (rev 3399) @@ -1,6 +1,7 @@ package org.dllearner.configuration.spring; import org.dllearner.core.Component; +import org.dllearner.core.ComponentAnn; import java.util.Map; import java.util.Set; @@ -13,6 +14,7 @@ * * Test Bean for testing that we can store all the types we need. */ +@ComponentAnn(version = 1,shortName ="tbc", name = "TestBean Component") public class TestBean implements Component{ private String simpleValue; Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-11-12 09:37:21 UTC (rev 3398) +++ trunk/pom.xml 2011-11-12 23:10:28 UTC (rev 3399) @@ -17,6 +17,9 @@ <!--Define the AKSW dependency version --> <aksw.version>0.1</aksw.version> + + <slf4j.version>1.6.4</slf4j.version> + <log4j.version>1.2.16</log4j.version> </properties> <modules> @@ -29,7 +32,7 @@ </modules> - <!--This is the SCM information, which needs to be here so we can use the + <!--This is the SCM information, which needs to be here so we can use the maven release plugin --> <scm> <connection>scm:svn:https://dl-learner.svn.sourceforge.net/svnroot/dl-learner/trunk</connection> @@ -39,9 +42,9 @@ </scm> <build> - <!-- - Plugin Management defines the plugins that the child components - can use - It's good practice to do this as we can ensure all children use - common versions - of the plugins, and we can look in one place to see all + <!-- - Plugin Management defines the plugins that the child components + can use - It's good practice to do this as we can ensure all children use + common versions - of the plugins, and we can look in one place to see all plugin dependencies. --> <pluginManagement> <plugins> @@ -64,8 +67,8 @@ </configuration> </plugin> - <!-- - Maven Jar Plugin - if you want to create and/or sign jars. - I'm - putting this in so we can create a jar for the test classes - in components + <!-- - Maven Jar Plugin - if you want to create and/or sign jars. - I'm + putting this in so we can create a jar for the test classes - in components core so that other components' tests can leverage them --> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -88,12 +91,12 @@ </build> <dependencyManagement> - <!-- - Dependency Management defines the dependencies at the parent level - - These set the dependencies on a global level and the children are forced - to use the defined version - We do this to ensure consistent dependencies - amongst all children artifacts that are generated by this pom. - - Children - still have to include the dependency, but only the groupId and artifactId - as version is retrieved from the parent. - - Remember, default scope is compile + <!-- - Dependency Management defines the dependencies at the parent level + - These set the dependencies on a global level and the children are forced + to use the defined version - We do this to ensure consistent dependencies + amongst all children artifacts that are generated by this pom. - - Children + still have to include the dependency, but only the groupId and artifactId + as version is retrieved from the parent. - - Remember, default scope is compile in Maven. --> <dependencies> <dependency> @@ -120,19 +123,43 @@ <version>0.9.3</version> </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.16</version> - </dependency> + <!-- SOLR Dependency --> + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-core</artifactId> + <version>3.3.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-jdk14</artifactId> + </exclusion> + </exclusions> + </dependency> - <dependency> + <dependency> + <groupId>org.nlp2rdf</groupId> + <artifactId>nif</artifactId> + <version>1.1-SNAPSHOT</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + + + <dependency> <groupId>com.extjs</groupId> <artifactId>gxt</artifactId> <version>2.2.3</version> </dependency> - <!--Available via central, we use the latest with minor mods to DL Learner + <!--Available via central, we use the latest with minor mods to DL Learner source (IE Dig related code) --> <dependency> <groupId>com.hp.hpl.jena</groupId> @@ -390,12 +417,18 @@ <version>1.0.3</version> <scope>provided</scope> </dependency> - + <!-- Spring --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.0.5.RELEASE</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -403,6 +436,47 @@ <version>3.0.5.RELEASE</version> </dependency> + <!--BEGIN Logging Dependencies--> + + <!--This is the api jar, it's needed at compile time--> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + </dependency> + + <!--This is the bridge that ties calls to the slf4j api to the log4j framework. This is a runtime dependency for programs which wish to use log4j as their implementation.--> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>${slf4j.version}</version> + </dependency> + + <!-- This is the concrete implementation of the log4j framework - it is a runtime dependency that needs to be used with the slf4j-log4j12 dependency --> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>${log4j.version}</version> + </dependency> + + <!--Bridge from JCL to SLF4J. Then we go from SLF4J to our desired logging framework (which for DL-Learner interfaces is Log4J). + - JCL is in use by Spring and so this lets us control the output from the Spring libraries in the same way we control anything else. + - This is also a runtime dependency. + --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>${slf4j.version}</version> + </dependency> + + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-jdk14</artifactId> + <version>${slf4j.version}</version> + </dependency> + <!--END Logging Dependencies--> + </dependencies> </dependencyManagement> @@ -445,8 +519,8 @@ <url>http://maven.jahia.org/maven2/</url> </repository> - <!-- - This is so we can get the 1.3-SNAPSHOT of GWT Maven Plugin cause - 1.2 is broken on the hudson - - Here's a good place to browse the repository: + <!-- - This is so we can get the 1.3-SNAPSHOT of GWT Maven Plugin cause + 1.2 is broken on the hudson - - Here's a good place to browse the repository: https://nexus.codehaus.org --> <repository> <id>maven.codehaus.snapshots</id> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |