Maven Compilation Error: (use -source 7 or higher to enable diamond operator)

Check how your maven-compiler-plugin is configured, it should use java version 7 or higher: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> For a more complete answer see the one below.

How to check pom.xml for updated dependencies

You can do this with the Versions Maven Plugin. Check the following goals: versions:display-dependency-updates scans a project’s dependencies and produces a report of those dependencies which have newer versions available. versions:display-plugin-updates scans a project’s plugins and produces a report of those plugins which have newer versions available. Here is a sample output (taken from the … Read more

What are all of the Maven Command Line Options?

Found this page today. Maven CLI Options Reference. Text version to make it easy to copy/paste Maven CLI Options Reference Options >> Description -am,–also-make >> If project list is specified, also build projects required by the list -amd,–also-make-dependents >> If project list is specified, also build projects that depend on projects on the list -B,–batch-mode … Read more

Plugins in Maven and POM.xml

<project> <groupId>org.koshik.javabrains</groupId> <artifactId>JarName</artifactId> (A fldernamed JarName was created) <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>JarName</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <groupId>org.jibx</groupId> <artifactId>jibx-maven-plugin</artifactId> <version>1.2.4</version> <executions> <execution> <goals> <goal>bind</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> </project> You can also place plugins in the <build> section of <profile> if you use maven … Read more

Unable to locate Source XRef to link to

You should add the maven-jxr-plugin to the reportingPlugin section. <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> <version>3.3.0</version> </plugin> </plugins> </reporting> Re run it and enjoy. BTW, maybe you’ll need to run once the jxr:jxr goal to first generate some file that will be used by pmd.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)