Maven build error on startup

Hi,

Whenever I open IDEA and it opens my last open project, which is a Maven project it prints the error messages appended to the end of this post in the "Message Generating sources" window.

However, when I build the project afterwards by selecting compile from the Maven Projects windows, it builds my project with no problem. Any ideas why is this happening? I have already enabled 'Print Exception Stack Traces'.


[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] Building Scatter/Gather Swing GUI

[INFO]

[INFO] Id: edu.monash.sg:scatter-gather-gui:jar:1.0

[INFO] task-segment: [generate-sources, generate-resources, generate-test-sources, generate-test-resources]

[INFO] ------------------------------------------------------------------------

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 11 source files to /Users/behrangsa/Projects/IDEA/scatter-gather/scatter-gather-gui/target/classes

[ERROR] BUILD FAILED

[ERROR] Compilation failure

Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





To view full stack traces, please go to the Settings->Maven and check the 'Print Exception Stack Traces' box.

[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] Building Scatter/Gather Framework

[INFO]

[INFO] Id: edu.monash.sg:scatter-gather-framework:jar:1.0

[INFO] task-segment: [generate-sources, generate-resources, generate-test-sources, generate-test-resources]

[INFO] ------------------------------------------------------------------------

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 2 source files to /Users/behrangsa/Projects/IDEA/scatter-gather/scatter-gather-framework/target/classes

[ERROR] BUILD FAILED

[ERROR] Compilation failure

Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





To view full stack traces, please go to the Settings->Maven and check the 'Print Exception Stack Traces' box.

[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] Building Scatter/Gather Command Line Interface

[INFO]

[INFO] Id: edu.monash.sg:scatter-gather-cli:jar:1.0

[INFO] task-segment: [generate-sources, generate-resources, generate-test-sources, generate-test-resources]

[INFO] ------------------------------------------------------------------------

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 1 source file to /Users/behrangsa/Projects/IDEA/scatter-gather/scatter-gather-cli/target/classes

[ERROR] BUILD FAILED

[ERROR] Compilation failure

Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





To view full stack traces, please go to the Settings->Maven and check the 'Print Exception Stack Traces' box.

[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] Building Scatter/Gather Text Extraction

[INFO]

[INFO] Id: edu.monash.sg:scatter-gather-extract:jar:1.0

[INFO] task-segment: [generate-sources, generate-resources, generate-test-sources, generate-test-resources]

[INFO] ------------------------------------------------------------------------

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 6 source files to /Users/behrangsa/Projects/IDEA/scatter-gather/scatter-gather-extract/target/classes

[ERROR] BUILD FAILED

[ERROR] Compilation failure

Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





To view full stack traces, please go to the Settings->Maven and check the 'Print Exception Stack Traces' box.

[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] Building Scatter/Gather API

[INFO]

[INFO] Id: edu.monash.sg:scatter-gather-api:jar:1.0

[INFO] task-segment: [generate-sources, generate-resources, generate-test-sources, generate-test-resources]

[INFO] ------------------------------------------------------------------------

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 11 source files to /Users/behrangsa/Projects/IDEA/scatter-gather/scatter-gather-api/target/classes

[ERROR] BUILD FAILED

[ERROR] Compilation failure

Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





To view full stack traces, please go to the Settings->Maven and check the 'Print Exception Stack Traces' box.

[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] Building Scatter/Gather Implementation

[INFO]

[INFO] Id: edu.monash.sg:scatter-gather-impl:jar:1.0

[INFO] task-segment: [generate-sources, generate-resources, generate-test-sources, generate-test-resources]

[INFO] ------------------------------------------------------------------------

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 11 source files to /Users/behrangsa/Projects/IDEA/scatter-gather/scatter-gather-impl/target/classes

[ERROR] BUILD FAILED

[ERROR] Compilation failure

Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





Failure executing javac, but could not parse the error:

javac: invalid target release: 1.6

Usage: javac <options> <source files>

where possible options include:

  -g                         Generate all debugging info

  -g:none                    Generate no debugging info

  -g:{lines,vars,source}     Generate only some debugging info

  -nowarn                    Generate no warnings

  -verbose                   Output messages about what the compiler is doing

  -deprecation               Output source locations where deprecated APIs are used

  -classpath <path>          Specify where to find user class files

  -cp <path>                 Specify where to find user class files

  -sourcepath <path>         Specify where to find input source files

  -bootclasspath <path>      Override location of bootstrap class files

  -extdirs <dirs>            Override location of installed extensions

  -endorseddirs <dirs>       Override location of endorsed standards path

  -d <directory>             Specify where to place generated class files

  -encoding <encoding>       Specify character encoding used by source files

  -source <release>          Provide source compatibility with specified release

  -target <release>          Generate class files for specific VM version

  -version                   Version information

  -help                      Print a synopsis of standard options

  -X                         Print a synopsis of nonstandard options

  -J<flag>                   Pass <flag> directly to the runtime system





To view full stack traces, please go to the Settings->Maven and check the 'Print Exception Stack Traces' box.




 

3 comments
Comment actions Permalink

I have temporarily fixed this by unchecking "Automatically generate sources and ... on import." Is this even a bug?

0
Comment actions Permalink

there's something strange, the compile phase of the maven lifecycle is not executed but the compiler is still launched ?
What's your pom like ?

0
Comment actions Permalink

This is the parrent POM:

<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>...</groupId>

    <artifactId>...</artifactId>

    <packaging>pom</packaging>

    <version>1.0</version>

    <name>...</name>


    <modules>

        <module>...</module>

        <module>...</module>

        <module>...</module>

        <module>...</module>

        <module>...</module>

        <module>...</module>

    </modules>


    <build>

        <pluginManagement>

            <plugins>

                <plugin>

                    <groupId>org.apache.maven.plugins</groupId>

                    <artifactId>maven-compiler-plugin</artifactId>

                    <configuration>

                        <source>1.6</source>

                        <target>1.6</target>

                    </configuration>

                </plugin>

                <plugin>

                    <groupId>org.apache.maven.plugins</groupId>

                    <artifactId>maven-surefire-plugin</artifactId>

                    <configuration>

                        <argLine>-Xms256m -Xmx2048m</argLine>

                        <forkMode>pertest</forkMode>

                        <testFailureIgnore>true</testFailureIgnore>

                    </configuration>

                </plugin>

            </plugins>

        </pluginManagement>

    </build>


    <dependencyManagement>

        <dependencies>

            <dependency>

                <groupId>commons-io</groupId>

                <artifactId>commons-io</artifactId>

                <version>1.4</version>

            </dependency>

            <dependency>

                <groupId>commons-cli</groupId>

                <artifactId>commons-cli</artifactId>

                <version>1.2</version>

            </dependency>

            <dependency>

                <groupId>commons-collections</groupId>

                <artifactId>commons-collections</artifactId>

                <version>3.2.1</version>

            </dependency>

            <dependency>

                <groupId>commons-io</groupId>

                <artifactId>commons-io</artifactId>

                <version>1.4</version>

            </dependency>

            <dependency>

                <groupId>org.apache.lucene</groupId>

                <artifactId>lucene-core</artifactId>

                <version>2.4.1</version>

            </dependency>

            <dependency>

                <groupId>com.miglayout</groupId>

                <artifactId>miglayout</artifactId>

                <version>3.7</version>

            </dependency>

            <dependency>

                <groupId>pdfbox</groupId>

                <artifactId>pdfbox</artifactId>

                <version>0.7.3</version>

            </dependency>

        </dependencies>

    </dependencyManagement>


    <dependencies>

        <dependency>

            <groupId>junit</groupId>

            <artifactId>junit</artifactId>

            <version>3.8.1</version>

            <scope>test</scope>

        </dependency>

        <dependency>

            <groupId>org.mockito</groupId>

            <artifactId>mockito-all</artifactId>

            <version>1.7</version>

            <scope>test</scope>

        </dependency>

    </dependencies>


</project>


And this is one of the sub module POMs:

<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>...</groupId>
        <artifactId>...</artifactId>
        <version>1.0</version>
    </parent>
    <artifactId>...</artifactId>
    <packaging>jar</packaging>
    <name>...</name>


    <dependencies>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
    </dependencies>


</project>


IDEA tries to generate sources, etc. while my project does not require any sources or resources to be generated at all.

Cheers,
Behrang
0

Please sign in to leave a comment.