[ 
https://issues.apache.org/jira/browse/JENA-1720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16861372#comment-16861372
 ] 

Erich Bremer commented on JENA-1720:
------------------------------------

See below.  If I remove commons-io, this error will be generated:

java.lang.NoClassDefFoundError: org/apache/commons/io/input/BOMInputStream

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ebremer</groupId>
    <artifactId>ImageBox</artifactId>
    <version>1.1.0</version>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>apache-jena</artifactId>
            <type>pom</type>
            <version>3.12.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-client</artifactId>
            <version>9.4.14.v20181114</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>9.4.14.v20181114</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>9.4.14.v20181114</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>ome</groupId>
            <artifactId>formats-gpl</artifactId>
            <version>6.1.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>ome</groupId>
            <artifactId>loci_tools</artifactId>
            <version>6.1.1</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>files/</directory>
                    <includes>
                        <include>**/*.js</include>
                        <include>**/*.html</include>
                        <include>**/*.svs</include>
                    </includes>
                </resource>             
            </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <shadedArtifactAttached>false</shadedArtifactAttached>
                    <transformers>
                        <transformer 
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                            <mainClass>com.ebremer.imagebox.W3Cmf</mainClass>
                        </transformer>
                        <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
 />
                        <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"
 />
                        <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
                            <addHeader>false</addHeader>
                        </transformer>
                    </transformers>
                <filters>
                    <filter>
                        <artifact>*:*</artifact>
                        <excludes>
                            <!-- Some jars are signed but shading breaks that.
                                Don't include signing files.
                            -->
                            <exclude>META-INF/*.SF</exclude>
                            <exclude>META-INF/*.DSA</exclude>
                            <exclude>META-INF/*.RSA</exclude>
                        </excludes>
                    </filter>
                </filters>
                </configuration>
                <executions>
                    <execution>
                    <phase>package</phase>
                    <!--<phase /><!- - Switch off -->
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>http://repo.maven.apache.org/maven2</url>
        </repository>
        <repository>
            <id>unidata</id>
            <name>Unidata Repository</name>
            
<url>http://artifacts.unidata.ucar.edu/content/repositories/unidata-releases</url>
        </repository>
        <repository>
            <id>ome</id>
            <name>OME Artifactory</name>
            <url>http://artifacts.openmicroscopy.org/artifactory/maven/</url>
        </repository>
    </repositories>
</project>

> Apache commons-io needs to be added as dependency
> -------------------------------------------------
>
>                 Key: JENA-1720
>                 URL: https://issues.apache.org/jira/browse/JENA-1720
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 3.12.0
>            Reporter: Erich Bremer
>            Priority: Minor
>
> In using RDFDataMgr.write(out, m, RDFFormat.JSONLD_PRETTY)
> to write out a Model as jsonld, an error was generated for a missing library 
> found in apache commons-io.  Adding
> <dependency>
>             <groupId>commons-io</groupId>
>             <artifactId>commons-io</artifactId>
>             <version>2.6</version>
>         </dependency>
> to my maven project resolved the issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to