Open gu4re opened 2 months ago
Can you add your pom fime?
Good evening Ignazio,
Here you have my POM file:
<?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>es.codeurjc</groupId>
<artifactId>sbc-app</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>es.codeurjc.Application</mainClass>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
<version>3.14.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-api</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-apibinding</artifactId>
<version>5.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.14</version>
</dependency>
</dependencies>
</project>
pom looks correct to me, I've downloaded it in a test project and executed the code, it works when directing the output to a local file.
Check that
Files.newOutputStream(Paths.get(URIConstants.ONTOLOGY_URI))
is working as expected. Another possibility is that the owlapi libraries you downloaded got corrupted during download, so you can try deleting them from your local maven repository and try again.
Good afternoon,
I am writing here to request some assistance regarding the execution of my application from the terminal. Despite functioning correctly in my working environment (IntelliJ), when generating a build with its corresponding artifact, it fails when attempting to launch OWLOntologyManager.saveOntology(), regardless of the specified format or whether the ontology is being dumped to a file or a stream. Even it fails either using maven for building or IntelliJ Build Artefact options. Attached is the stack trace as well as my code snippet where I am using ontology dumping:
Please let me know if you need further information or assistance regarding this matter.
Best regards, gu4re.