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 support for configuring web resource directories in Web facets #127

Closed
wants to merge 2 commits into from

Conversation

ingokegel
Copy link

@ingokegel ingokegel commented Dec 4, 2021

In web projects it is important to be able to configure web resource directories for various purposes.

Because I cannot create a pull request for IntelliJ Ultimate, support on the IDE side has been added in a plugin located at

https://github.com/ingokegel/intellij-web-facet-importer

The plugin has been published in the marketplace:

https://plugins.jetbrains.com/plugin/18139-web-facet-importer

The source code is in the public domain and can be used for IntelliJ Ultimate by JetBrains.

This makes it possible to test changes by publishing the plugin to the Maven local repository
Support on the IDE side has been added in a plugin located at https://github.com/ingokegel/intellij-web-facet-importer
The source code is in the public domain and can be used for IntelliJ Ultimate
@hsz
Copy link
Member

hsz commented Dec 4, 2021

Publishing to Maven Local isn't the best way to test the Gradle plugin.
I'd suggest you add the following line to the settings.gradle file

includeBuild("/path/to/the/Gradle/plugin/sources")

That way, you'll always have the latest sources available with the ability to debug it.

@ingokegel
Copy link
Author

Thank you, that's good to know!

@nskvortsov
Copy link
Member

Thank you for your pull request.
IntelliJ IDEA Ultimate supports Gradle-based web projects and should automatically configure web content roots based on information in Gradle's war plugin. What is the purpose of this pull request and the accompanying IDEA plugin?

@ingokegel
Copy link
Author

Ok, thank you. How would you add an arbitrary directory to the web resource roots with the war plugin?

@nskvortsov
Copy link
Member

According to this example it is sufficient to add from clause to the war configuration:

war {
    webAppDirectory = file('src/main/webapp')
    from 'src/rootContent' // adds a file-set to the root of the archive
   ...
}

@ingokegel
Copy link
Author

OK, thank you, I did not know that. I suppose this is good enough for most situations.

@ingokegel ingokegel closed this Feb 4, 2022
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.

None yet

3 participants