0

First of all, im a real beginner in Maven. I have problems with my first project. Here is my pom file (full) :

<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>hu.fornax</groupId>
<artifactId>maven</artifactId>
<version>0.0.1-SNAPSHOT</version>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>

    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.5.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
    </plugins>
</build>

After saving, maven downloaded the junit-4.12.jar and created a Maven dependencies folders, wich is added to build path. After these the testfile have errors, says: The import org.junit.Test cannot be resolved and want to add Junit 4 to build path. Im bit confused wath is the problem, but my program not working.

I hope you can help me :)

EDIT::::::: I got some tips: the maven dont accept the projectlibs and i should try this settings set in eclipse style. Maybe this helps you to help me?

SOLVED::::::: Thanks all of your helps. I found this page: http://skillshared.blogspot.hu/2012/10/aaa.html and it worked for me. Thanks :)

meszbogi
  • 1
  • 1
  • 3

1 Answers1

0

First clean the project and again install the Maven.