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

Fix running quarkus:dev #2475

Closed
wants to merge 1 commit into from
Closed

Conversation

nastra
Copy link
Contributor

@nastra nastra commented Oct 22, 2021

since quarkus 2.4.0.Final quarkus:dev expects the META-INF/resources
folder under target.

The issue is happening because of this line: https://github.com/quarkusio/quarkus/pull/20500/files#diff-dbfecb8ead57f5ad197c876b824b224ea62a3711ba4a3d2c0bb07da027aa11d1R708

Previously it was doing this via localProject.getSourcesDir().toAbsolutePath() but now it is checking module.getMainResources().iterator().next().getDestinationDir().toPath().toAbsolutePath().

Since our META-INF/resources directory is basically pointing to the build dir as defined in

nessie/ui/pom.xml

Lines 33 to 39 in 1d9e32e

<resources>
<!-- Generated by react-scripts -->
<resource>
<!-- Standard resources path per Servlet spec -->
<targetPath>META-INF/resources</targetPath>
<directory>build</directory>
<filtering>false</filtering>
the actual META-INF/resources directory doesn't exist under target, thus quarkus:dev complains

since quarkus 2.4.0.Final quarkus:dev expects the META-INF/resources
folder under target.

The issue is happening because of this line: https://github.com/quarkusio/quarkus/pull/20500/files#diff-dbfecb8ead57f5ad197c876b824b224ea62a3711ba4a3d2c0bb07da027aa11d1R708

Previously it was doing this via `localProject.getSourcesDir().toAbsolutePath()` but now it is checking `module.getMainResources().iterator().next().getDestinationDir().toPath().toAbsolutePath()`.

Since our `META-INF/resources` directory is basically pointing to the `build` dir as defined in https://github.com/projectnessie/nessie/blob/1d9e32e47c573f9c0906a264f83066f6a45dde03/ui/pom.xml#L33-L39 the actual `META-INF/resources` directory doesn't exist under `target`, thus `quarkus:dev` complains
@nastra nastra requested review from snazy and ajantha-bhat October 22, 2021 15:59
Comment on lines +201 to +205
<resource>
<targetPath>META-INF/resources</targetPath>
<directory>build</directory>
<filtering>false</filtering>
</resource>
Copy link
Member

Choose a reason for hiding this comment

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

Do we have to specify sources? Would it not use the default sources automatically?

@codecov
Copy link

codecov bot commented Oct 22, 2021

Codecov Report

Merging #2475 (4b1d733) into main (f7ab9aa) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2475      +/-   ##
============================================
+ Coverage     84.17%   84.19%   +0.02%     
- Complexity     1915     1916       +1     
============================================
  Files           251      251              
  Lines         10772    10772              
  Branches        764      764              
============================================
+ Hits           9067     9070       +3     
+ Misses         1400     1397       -3     
  Partials        305      305              
Flag Coverage Δ
java 84.19% <ø> (+0.03%) ⬆️
javascript 74.41% <ø> (ø)
python 85.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...nessie/versioned/persist/tx/TxDatabaseAdapter.java 75.00% <0.00%> (+0.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7ab9aa...4b1d733. Read the comment docs.

@@ -185,6 +185,29 @@
</execution>
</executions>
</plugin>
<!-- since quarkus 2.4.0.Final quarkus:dev expects the META-INF/resources folder under target -->
<plugin>
Copy link
Contributor

Choose a reason for hiding this comment

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

other modules also don't have this config right ? how it is working ?

@nastra nastra linked an issue Oct 25, 2021 that may be closed by this pull request
@nastra
Copy link
Contributor Author

nastra commented Oct 25, 2021

It looks like the hot reload ... issue is fixed by this, but UI resources are not loaded anymore

@nastra
Copy link
Contributor Author

nastra commented Oct 26, 2021

Will be fixed by quarkusio/quarkus#20974

@nastra nastra closed this Oct 26, 2021
@nastra nastra deleted the fix-quarkus-dev branch October 26, 2021 07:07
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.

Quarkus:dev fails on latest code
4 participants