Skip to content

Commit

Permalink
POM adjustements to avoid Jetty dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart committed Dec 11, 2018
1 parent 57089a1 commit f8fb505
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
10 changes: 10 additions & 0 deletions fr.sparna/rdf/skos/skos-play-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@
<artifactId>jcommander</artifactId>
<version>1.30</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package fr.sparna.rdf.skos.printer.cli;

import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.xml.DOMConfigurator;

import com.beust.jcommander.JCommander;
import com.beust.jcommander.MissingCommandException;
import com.beust.jcommander.ParameterException;

import ch.qos.logback.classic.util.ContextInitializer;
import fr.sparna.rdf.skos.printer.cli.alignment.Alignment;
import fr.sparna.rdf.skos.printer.cli.alignment.ArgumentsAlignment;
import fr.sparna.rdf.skos.printer.cli.alphabetical.Alphabetical;
Expand Down Expand Up @@ -82,6 +81,14 @@ private void run(String[] args) throws Exception {
System.exit(-1);
}

// configure logging
if(main.getLog() != null) {
System.setProperty(ContextInitializer.CONFIG_FILE_PROPERTY, main.getLog().getAbsolutePath());

}
// explicitely quiet FOP
((ch.qos.logback.classic.Logger) org.slf4j.LoggerFactory.getLogger("org.apache.fop")).setLevel(ch.qos.logback.classic.Level.INFO);

// if help was requested, print it and exit with a normal code
if(main.isHelp()) {
jc.usage();
Expand All @@ -96,17 +103,6 @@ private void run(String[] args) throws Exception {
System.exit(-1);
}

// configure logging using log4j
if(main.getLog() != null) {
if(main.getLog().getName().endsWith(".xml")) {
DOMConfigurator.configure(main.getLog().getAbsolutePath());
} else {
PropertyConfigurator.configure(main.getLog().getAbsolutePath());
}
}
// explicitely quiet FOP
org.apache.log4j.Logger.getLogger("org.apache.fop").setLevel(org.apache.log4j.Level.INFO);

// executes the command with the associated arguments
COMMAND.valueOf(jc.getParsedCommand().toUpperCase()).getCommand().execute(
COMMAND.valueOf(jc.getParsedCommand().toUpperCase()).getArguments()
Expand Down
4 changes: 3 additions & 1 deletion fr.sparna/rdf/skos/skos-play/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@


<!-- Semargl and Semargl Sesame integration for RDFa parsing -->
<!--
<dependency>
<groupId>org.semarglproject</groupId>
<artifactId>semargl-rdfa</artifactId>
Expand All @@ -135,6 +136,7 @@
<artifactId>semargl-sesame</artifactId>
<version>0.6.1</version>
</dependency>
-->

<!-- Spring -->
<dependency>
Expand All @@ -149,7 +151,7 @@

<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<artifactId>google-oauth-client-servlet</artifactId>
<version>1.22.0</version>
</dependency>

Expand Down

0 comments on commit f8fb505

Please sign in to comment.