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

Detect frontend directory locations dynamically based on project #4237

Merged
merged 6 commits into from
Jun 6, 2018

Conversation

mstahv
Copy link
Member

@mstahv mstahv commented Jun 6, 2018

If source and target directories are not explicitly defined, those are now detected dynamically based on the project type, so that spring boot projects don't need special settings.

This change is Reviewable

@mstahv mstahv changed the title Feature/detect boot Detect frontend directory locations dynamically based on project Jun 6, 2018
@caalador
Copy link
Contributor

caalador commented Jun 6, 2018

Review status: 0 of 2 files reviewed at latest revision, all discussions resolved.


flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/CopyProductionFilesMojo.java, line 64 at r1 (raw file):

        if(frontendWorkingDirectory == null) {
            // No directory given, try to find from common locations
            for(String dir : Arrays.asList(

Break out arrays.asList to have the for more readable.


flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/PackageForProductionMojo.java, line 117 at r1 (raw file):

                    && project.getArtifactMap().containsKey("com.vaadin:vaadin-spring-boot-starter")) {
                // in spring boot project there is not web app directory
                transpileOutputDirectory = new File(project.getBuild().getDirectory(), "classes/META-INF/resources");

drop "classes" and use getOutputDirectory() instead of getDirectory()


Comments from Reviewable

@caalador
Copy link
Contributor

caalador commented Jun 6, 2018

Review status: 0 of 2 files reviewed at latest revision, 2 unresolved discussions.


flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/CopyProductionFilesMojo.java, line 68 at r1 (raw file):

                    "src/main/resources/META-INF/resources/frontend", 
                    "src/main/resources/public/frontend",
                    "src/main/resources/static/frontend")) {

missing "src/main/resources/resources/frontend"


Comments from Reviewable

caalador added a commit to vaadin/skeleton-starter-flow-spring that referenced this pull request Jun 6, 2018
@caalador
Copy link
Contributor

caalador commented Jun 6, 2018

:lgtm:


Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@mstahv
Copy link
Member Author

mstahv commented Jun 6, 2018

@ripla, we need probably some similar logic to Designer, so that it creates design files to src/main/resources/META-INF/frontend for spring boot projects. Shall I create an issue for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants