Tuesday 15 February 2011

java - Maven compile: package does not exist -


I have (seemingly) a normal Maven problem that I can not solve. In my POM I have specified openrdf-sill such dependency:

   & Lt; Version & gt; 2.7.2 & lt; / Edition & gt; & Lt; / Dependencies & gt;   

The project works well on eclipse, I can also export a runner jar file. Unfortunately, I can not do it in the CMD-Line Maven to work properly, to make a jar, I've added the following for my palm:

  & lt; Build & gt; & Lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-compliant plugin & lt; / ArtifactId> & Lt; Version & gt; 2.3.2 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Source & gt; 1.6 & lt; / Source & gt; & Lt; Goal & gt; 1.6 & lt; / Target & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; Plugin & gt; & Lt; ArtifactId & gt; Maven-assembly-plug-in & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; DescriptorRefs & gt; & Lt; DescriptorRef & gt; Jarar-with-Dependency & lt; / DescriptorRef & gt; & Lt; / DescriptorRefs & gt; & Lt; Collections & gt; & Lt; Appearance & gt; & Lt; MainClass & gt; Foo.bar.Cli & lt; / MainClass & gt; & Lt; / Reveal & gt; & Lt; / Collection & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; & Lt; / Create & gt;   

Compilation with the following errors fails:

  ... / PLDReducer.java: [25,29] package org.openrdf.rio. Rdfxml does not exist ... / PLDReducer.java:[27.33] package org.openrdf.sail.nativerdf does not exist ... / LowPLDReducer.java: [25,29] package org.openrdf.rio.rdfxml does not exist Is ... / cli.java: [23.33] package org.openrdf.sail.nativerdf does not exist ... / schemaibooler.java: [30.33] package org.openrdf.sail.nativerdf does not exist. ../RepoQuerier.java: [23.33] package org.openrdf.sail.nativerdf does not exist ... / PLDReducer.java:[78,44] Icons can not be found   

Oddly, as soon as I add the compilation plugin to pom and change the updated settings, the eclipse slang can start compiling even further. I have checked my repository, and all the mole files are there.

MVN - version gives this output:

  Apache Maven 2.2.1 (rdebian-8) Java version: 1.6.0_27 Java home: / usr / lib / Jvm / java-6-openjdk-amd64 / jre Default location: en_US, Platform encoding: UTF-8 OS name: "Linux" version: "3.8.0-25-General" Arc: "MD 64" Family: "Unix"   

I think this indicates a zeroe, but my googling indicated that if the compiler was not himself, then I found another error would be found. I have it, if it is of any help.

Am I missing something? I do not find any errors in my pom

You have to add the following dependency to your creation:

  & lt; Dependency & gt; & Lt; Group & gt; Org.openrdf.sesame & lt; / Group & gt; & Lt; ArtifactId & gt; Sesame-rio-api & lt; / ArtifactId> & Lt; Version & gt; 2.7.2 & lt; / Edition & gt; & Lt; / Dependencies & gt;   

In addition, I would suggest a deeper look at .

No comments:

Post a Comment