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

Refactor java folder to follow Maven/Gradle convention #230

Open
magreenblatt opened this issue Jul 28, 2016 · 5 comments
Open

Refactor java folder to follow Maven/Gradle convention #230

magreenblatt opened this issue Jul 28, 2016 · 5 comments
Labels
proposal Proposed change or action

Comments

@magreenblatt
Copy link
Collaborator

Original report by Paul Furbacher (Bitbucket: Paul Furbacher).


There's a widely adopted, standard way of setting up Java source and test directories/folders, first specified by Maven and continued in Gradle.

java-cef doesn't honor this convention, but it there's no reason it shouldn't.

The current folder structure:

java-cef/
    java/
        org/
        tests/

should be refactored to

java-cef
    src/
        main/
            java/
                org/...
        test/
            java/
                tests/...

In addition, the tests folder should be refactored to

java-cef/
    src/
        test/
            org/
                cef/
                    demos/
                        detailed/ 
                        simple/

Given the nature of the "tests" (they don't run in a test harness), I'd favor either "demos" or "examples".

@magreenblatt
Copy link
Collaborator Author

Why is this necessary? Is there some tooling you're trying to use that does not work with the current directory layout?

@magreenblatt
Copy link
Collaborator Author

Original comment by Paul Furbacher (Bitbucket: Paul Furbacher).


It's not necessary, that's why I set the issue type to "proposal" and priority to "minor".

Reasons:

  1. Convention
  2. Tooling

I don't know, I've been doing Java development since 1997. I have found it's generally good to follow conventions. Most Java developers use the Maven/Gradle project structure, even when it includes building native libs, etc.

And it's not that for example, Gradle won't work with this folder structure:

sourceSets { 
    // Make allowance for unconventional folder hierarchy ...
    main {
        java {
            srcDir 'java'
        }
    }
}

accommodates it.

And there is a Java project convention around "tests". They are run in a test harness (e.g., JUnit, Selenium). What you present are examples, demos, uses. Hence the proposal to align the naming and project structure accordingly in this regard.

Just suggestions; you can close this issue if you don't feel I've made a compelling enough case.

@magreenblatt
Copy link
Collaborator Author

If we proceed with Maven support then we should roll in issue #262 and issue #189 which discuss distribution.

@magreenblatt
Copy link
Collaborator Author

@magreenblatt
Copy link
Collaborator Author

Maven build/config is now available at https://github.com/jcefmaven/jcefmaven

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposed change or action
Projects
None yet
Development

No branches or pull requests

1 participant