mzaidi
mzaidi

Reputation: 129

Failed to execute goal in apache maven IntelliJ Idea

I'm a beginner to maven and trying to make a project and successfully build it in IntelliJ Idea. My pom.xml is as follows:

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"> 4.0.0

<groupId>jetbrains</groupId>
<artifactId>EAN-Scraper</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
    <java.version>1.8</java.version>
    <maven.compiler.version>3.8.1</maven.compiler.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.53.1</version>
    </dependency>

    <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>1.13.1</version>
    </dependency>

    <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>1.4</version>
    </dependency>
</dependencies>

<build>
    <defaultGoal>install</defaultGoal>
    <!-- Source directory configuration -->
    <sourceDirectory>src</sourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven.compiler.version}</version>
            <configuration>
                <source>1.8}</source>
                <target>1.8</target>
            </configuration>
        </plugin>
    </plugins>
</build> </project>

And the error that I get is

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project EAN-Scraper: Fatal error compiling

I already tried the changes as suggested here. My jdk version is 13. My project structure is attached below enter image description here

Upvotes: 1

Views: 5206

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35843

There is a typo in the declaration of the compiler plugin:

<source>1.8}</source>

Upvotes: 2

Related Questions