0

I am trying to create my custom class for Sesame. I have my Eclipse (Mars) project with all Sesame librarys and a new project where I created my custom class as described in this tutorial and I folloved the instructions to install it in the other project as a local maven dependency install:install-file -Dfile=C:\Users\muletto.4\workspace\eternal_jars\CustomClassTest.jar -DgroupId=com.example -DartifactId=customclasstest -Dversion=0.1 -Dpackaging=jar -DgeneratePom=true but when I add the dependency to my pom.xml Eclipse id telling me that the artifact for my customclasstest is missing... and when I try to attache the source to if it is telling me that my jar is not correct. So my question is: How do I create a correct jar and what should be the content of it. Or maybe I am installing it in a wrong way? I tried searching but didn't found anything diffrent than the official instructions and I run out off ideas... Any help will be appreciated.

my pom.xml of the project in whih I try to install the jar:

<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>ECJCSesame</groupId>
  <artifactId>ECJCSesame</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <description>Execute Custom Java Classes</description>
   <build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
   <dependency>
  <groupId>org.openrdf.sesame</groupId>
  <artifactId>sesame-runtime</artifactId>
  <version>4.0.1</version>
 </dependency>
   <dependency>
  <groupId>ch.qos.logback</groupId>
  <artifactId>logback-classic</artifactId>
  <version>1.1.3</version>
 </dependency>
 <dependency>
  <groupId>com.example</groupId>
  <artifactId>customclasstest</artifactId>
  <version>0.1</version>
 </dependency>

  </dependencies>
</project>
  • Can you show the contents of your `pom.xml` file (in particular, the dependency you added)? And can you verify that the jar was actually installed in your local maven repository (just go to the local maven repo directory and check that in `com/example/` a new artifacted named `customclasstest` was added). – Jeen Broekstra Jan 13 '16 at 18:58
  • Also: are you using Eclipse's m2e plugin to handle maven in your project, or are you executing maven commands from the command line? If the former: have you tried refreshing/rebuilding your maven project? – Jeen Broekstra Jan 13 '16 at 19:01
  • Hi Jeen, thanks for the response. Yes I'am usng m2e plugin for Eclipse and the jars are installed into maven repository... I will add my pom to the question now. – odkrywczyni Jan 18 '16 at 09:43
  • 1
    Finaly I have tried the exact same procedure on the other computer opening this same project an it worked so the procedure is CORRECT and probably there was something wrong in the properties of the other computer or the Eclipse installation...Thanks for comments. – odkrywczyni Jan 19 '16 at 15:09

0 Answers0