Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
/target
/.classpath
/.project
/.idea
/*.iml
/.vscode/
10 changes: 7 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<groupId>com.overstock.sample</groupId>
<artifactId>jpa-annotation-processor</artifactId>
<version>trunk-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
Expand Down Expand Up @@ -45,12 +48,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*
*/
@SupportedAnnotationTypes({"javax.persistence.Entity", "javax.persistence.OneToMany"})
@SupportedSourceVersion(SourceVersion.RELEASE_6)
@SupportedSourceVersion(SourceVersion.RELEASE_8)
public class JpaProcessor extends AbstractProcessor {

// various types we'll want to refer to, initialized in init method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.lang.model.element.Element;
import javax.tools.Diagnostic.Kind;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Matchers;
Expand All @@ -26,6 +27,11 @@ public void setup() throws Exception{
compiler = new Compiler();
}

@After
public void teardown() {
compiler.cleanUp();
}

@Test
public void testEntityWithNoArgConstructor() throws Exception {
SourceFile[] sourceFiles = { new SourceFile(
Expand Down