Skip to content

Instantly share code, notes, and snippets.

@huberflores
Last active January 20, 2016 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huberflores/9e197b7915ea63b47516 to your computer and use it in GitHub Desktop.
Save huberflores/9e197b7915ea63b47516 to your computer and use it in GitHub Desktop.
maven fixes
#
# author Huber Flores
#
$ mvn install
#Build jar with dependencies
$ mvn assembly:assembly -DdescriptorId=jar-with-dependencies
#Issue 1: Error with @Override
When the project is transformed into a maven project, Eclipse or any other detects @Override as an error.
Solution:
This is because the compiler complains about java versions. Lower version of java < 1.5 present this error. The solution is to upgrade the maven-compiler-plugin to a java version > 1.6.
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<configuration>
<source>1.6</source>
<complianceLevel>1.6</complianceLevel>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment