I need to implement nftools library, but is the first time that I work with maven and when I execute a demo I get this error message:
Failed to execute goal on project nfctools-examples: Could not resolve dependencies for project org.nfctools:nfctools-examples:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.nfctools:nfctools-api:jar:1.0-SNAPSHOT, org.nfctools:nfctools-core:jar:1.0-SNAPSHOT, org.nfctools:nfctools-ndef:jar:1.0-SNAPSHOT: Could not find artifact org.nfctools:nfctools-api:jar:1.0-SNAPSHOT -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Edited: yes here is my pom.xml 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>com.mycompany</groupId>
<artifactId>NFCTEST</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-ndef</artifactId>
<version>1.0.M8</version>
</dependency>
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-api</artifactId>
<version>1.0.M8</version>
</dependency>
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-core</artifactId>
<version>1.0.M8</version>
</dependency>
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-examples</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
</project>
Your project pom
should consist of these for the dependencies you require :
<dependencies >
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-core</artifactId>
<version>1.0-M8</version>
</dependency>
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-api</artifactId>
<version>1.0.M8</version>
</dependency>
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-ndef</artifactId>
<version>1.0.M8</version>
</dependency>
</dependencies>
Since examples are not something to be dependent on and doesn't provide any library support, the rest should be omitted . Still if you require the example package from source, you better know the correct version (if) provided online. Try this if it helps :
<dependency>
<groupId>org.nfctools</groupId>
<artifactId>nfctools-examples</artifactId
<version>1.0</version>
</dependency>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.