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

Static css resources are not compiled by Java builder #1910

Closed
testforstephen opened this issue Apr 29, 2021 · 3 comments
Closed

Static css resources are not compiled by Java builder #1910

testforstephen opened this issue Apr 29, 2021 · 3 comments
Assignees

Comments

@testforstephen
Copy link
Collaborator

When opening https://github.com/spring-projects/spring-petclinic in VS Code, everything is fine except that static css resources are not compiled. The reason for this is that this project uses a 3rd party maven plugin wro4j-maven-plugin to generate css from less files, but the plugin does not seem to be executed by Java builder of VS Code Java extension.

<plugin>
        <groupId>ro.isdc.wro4j</groupId>
        <artifactId>wro4j-maven-plugin</artifactId>
        <version>${wro4j.version}</version>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
...
</plugin>
@testforstephen
Copy link
Collaborator Author

A workaround is to configure an inline m2e lifecycle mapping for wro4j-maven-plugin.

<?m2e execute onConfiguration,onIncremental?>
<plugin>
        <groupId>ro.isdc.wro4j</groupId>
        <artifactId>wro4j-maven-plugin</artifactId>
        <version>${wro4j.version}</version>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <?m2e execute onConfiguration,onIncremental?> // Configure an inline m2e lifecycle mapping metadata.
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
       ...
<plugin>

@testforstephen
Copy link
Collaborator Author

This issue is similar as #935 and #177, where some custom source generation maven goals are not executed by m2e builder.

Since it is not trivial to improve m2e to automatically recognize these 3rd party maven plugins, one idea in my mind is that we provide quick fixes in the pom.xml if there are maven execution goals not executed by Java builder. If the user clicks the quick fix, it will insert the inline m2e lifecycle mapping to the pom.xml for the corresponding maven plugin.

// @fbricon @rgrunber thoughts?

@rgrunber
Copy link
Member

Marking this as closed since we merged the patch that tries to improve this.

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

No branches or pull requests

2 participants