Skip to content

Commit

Permalink
Merge pull request #122 from kalili99/main
Browse files Browse the repository at this point in the history
modified pom_jar.xml and Information added to readme
  • Loading branch information
dgarijo authored Oct 25, 2024
2 parents 851d0d9 + d11f475 commit fb8ae93
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 48 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,26 @@ curl -X POST "http://localhost:8083/assessOntology" -H "accept: application/json

As a result, you should see a JSON in your console, such as the one in sample.json.

## Running the JAR in local
To create the JAR, just run:

```
mvn install -f pom_jar.xml
```

Then run the following command to test a URI:

```
java -jar target/fair_ontologies-0.1.0.jar -ontURI https://w3id.org/example
```

You can also test one ontology from a file:

```
java -jar target/fair_ontologies-0.1.0.jar -ontFile filePath
```

As a result, you should see a JSON in your folder, such as the one in sample.json.


If you want to change the out file path you can use the flag -out
60 changes: 12 additions & 48 deletions pom_jar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--<parent>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.3</version>
<relativePath/>
</parent>-->
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>es.oeg</groupId>
<artifactId>fair_ontologies</artifactId>
<version>0.1.0</version>
<packaging>jar</packaging>
<name>fair_ontologies</name>
<description>FOOPS!: An Ontology Pitfall scanner for the FAIR principles</description>

<!--<properties>
<properties>
<maven.compiler.source>15</maven.compiler.source>
<maven.compiler.target>15</maven.compiler.target>
</properties>-->
<properties>
</properties>
<!--<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>
<java.version>1.8</java.version>
</properties>
</properties>-->

<dependencies>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand All @@ -37,7 +36,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>-->
</dependency>

<!-- logging -->
<dependency>
Expand Down Expand Up @@ -82,9 +81,12 @@

<build>
<plugins>
<!-- <plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>fair.FOOPS</mainClass> <!-- Aquí se indica la clase principal alternativa -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -93,44 +95,6 @@
<source>11</source>
<target>11</target>
</configuration>
</plugin>-->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}-jar-with-dependencies</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>launcher</shadedClassifierName>
<outputDirectory>JAR/</outputDirectory>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>fair.FOOPS</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit fb8ae93

Please sign in to comment.