Skip to content

Commit

Permalink
Merge pull request #43 from ethlo/issue-42
Browse files Browse the repository at this point in the history
Fixes #42
  • Loading branch information
ethlo authored May 7, 2024
2 parents 0477f71 + ebcd648 commit d5f49a2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ethlo.persistence.tools</groupId>
<artifactId>eclipselink-maven-plugin</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
<packaging>maven-plugin</packaging>
<name>Eclipselink Maven Plugin</name>
<description>Maven Plugin for Eclipselink supporting static weaving, meta-model generation and DDL generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,17 @@ public void execute() throws MojoExecutionException

private Set<File> getSourceFiles()
{
if (source == null || !source.exists())
final Set<File> fromSource = getFilesFromDirectory(source);
final Set<File> fromGenerated = getFilesFromDirectory(generatedSourcesDirectory);
final Set<File> all = new TreeSet<>();
all.addAll(fromSource);
all.addAll(fromGenerated);
return all;
}

private Set<File> getFilesFromDirectory(File dir)
{
if (dir == null || !dir.exists())
{
return new TreeSet<>();
}
Expand All @@ -208,12 +218,12 @@ private Set<File> getSourceFiles()
}
}

Set<File> files = new HashSet<>();
final Scanner scanner = buildContext.newScanner(source);
final Set<File> files = new HashSet<>();
final Scanner scanner = buildContext.newScanner(dir);
scanner.setIncludes(filters);
scanner.scan();

String[] includedFiles = scanner.getIncludedFiles();
final String[] includedFiles = scanner.getIncludedFiles();
if (includedFiles != null)
{
for (String includedFile : includedFiles)
Expand Down

0 comments on commit d5f49a2

Please sign in to comment.