Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add includes & excludes Maven config options for source file filtering #200

Merged
merged 1 commit into from
Jun 2, 2014

Conversation

ctrimble
Copy link
Collaborator

@ctrimble ctrimble commented Jun 1, 2014

This PR adds general support for file filtering when scanning for schemas and configuration for that feature in the Maven plugin.

Usage:

<plugin>
    <groupId>org.jsonschema2pojo</groupId>
    <artifactId>jsonschema2pojo-maven-plugin</artifactId>
    <version>0.4.3-SNAPSHOT</version>
    <configuration>
        <sourceDirectory>${basedir}/schema</sourceDirectory>
        <includes>
            <include>**/*.json</include>
        </includes>
        <excludes>
            <exclude>exclude.json</exclude>
        </excludes>
        ...
    </configuration>
    ...
</plugin>

This feature only works with the sourceDirectory option and not with sourcePaths.

@ctrimble
Copy link
Collaborator Author

ctrimble commented Jun 1, 2014

This PR is related to PR #180

@@ -1,5 +1,21 @@
/**
* Copyright © 2010-2013 Nokia
* Copyright © 2010-2013 Nokia
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this character keeps getting into the headers.

@ctrimble
Copy link
Collaborator Author

ctrimble commented Jun 1, 2014

@joelittlejohn I think this is good to go. Please let me know if there are any changes required.

@joelittlejohn
Copy link
Owner

I'll try to take a detailed look though the code tomorrow. I've had a quick glance and this looks great!

@joelittlejohn joelittlejohn added this to the 0.4.3 milestone Jun 1, 2014
<configuration>
<sourceDirectory>${basedir}/schema</sourceDirectory>
<targetPackage>com.example.types</targetPackage>
<includes>
<include>**/*.json</include>
</includes>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't intend to change this, I will back the changes to this file out.

@ctrimble
Copy link
Collaborator Author

ctrimble commented Jun 2, 2014

Rebased onto master.

joelittlejohn added a commit that referenced this pull request Jun 2, 2014
@joelittlejohn joelittlejohn merged commit 48c7c61 into joelittlejohn:master Jun 2, 2014
@joelittlejohn joelittlejohn changed the title Source File Filtering Add includes & excludes Maven config options for source file filtering Jun 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants