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

Unable to run test using mvn clean test on main application when Flyway is embedded in an external jar. #3787

Closed
dcdh opened this issue Aug 30, 2019 · 4 comments
Labels
kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant

Comments

@dcdh
Copy link
Contributor

dcdh commented Aug 30, 2019

Describe the bug
I have designed a POC to ensure that CDI, JPA, Flyway and Kafka integration defined in an external jar are working well.
Excepted Flyway all other libraries are working.

Expected behavior
The appliation should compile and produce a jar file.

Actual behavior
The application fails to compile.
This error arise when compiling it:

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.355 s <<< FAILURE! - in com.damdamdeo.helloworld.HelloWorldServiceAppTest
[ERROR] should_say_hello  Time elapsed: 0.011 s  <<< ERROR!
org.junit.jupiter.api.extension.TestInstantiationException: 
TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [com.damdamdeo.helloworld.HelloWorldServiceAppTest]: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.flyway.FlywayProcessor#build threw an exception: java.nio.file.FileSystemNotFoundException
Caused by: java.lang.RuntimeException: 
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.flyway.FlywayProcessor#build threw an exception: java.nio.file.FileSystemNotFoundException
Caused by: io.quarkus.builder.BuildException: 
Build failure: Build failed due to errors
        [error]: Build step io.quarkus.flyway.FlywayProcessor#build threw an exception: java.nio.file.FileSystemNotFoundException
Caused by: java.nio.file.FileSystemNotFoundException

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/dcdh/poc-quarkus-external-jar.git
  2. cd helloworld-service
  3. mvn clean install
  4. cd ../helloworld-app
  5. mvn clean install

Configuration

# Add your application.properties here, if applicable.

Screenshots
Deepin Capture-écran_20190831213604

Environment (please complete the following information):

Additional context

@dcdh dcdh added the kind/bug Something isn't working label Aug 30, 2019
@dcdh dcdh changed the title Unable to run test using mvn clean test when Flyway is embedded in an external jar. Unable to run test using mvn clean test on main application when Flyway is embedded in an external jar. Aug 30, 2019
@dcdh
Copy link
Contributor Author

dcdh commented Aug 31, 2019

FlywayProcessor:

When test is running from Intellij the path is /home/damien/IdeaProjects/pocquarkusexternaljar/helloworld-service/target/classes/db/migration

When test is running using mvn -Dtest=HelloWorldServiceAppTest -Dmaven.surefire.debug test the path is file:/home/damien/.m2/repository/com/damdamdeo/helloworld-service/1.0-SNAPSHOT/helloworld-service-1.0-SNAPSHOT.jar!/db/migration and Paths.get(path.toURI()) throw a FileNotFoundException.

We need to avoid the use of Paths.get(path.toURI()) and find another way to fulfill both executions.

dcdh added a commit to dcdh/quarkus that referenced this issue Aug 31, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 1, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 1, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 1, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 2, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 2, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 3, 2019
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 4, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 4, 2019
dcdh added a commit to dcdh/quarkus that referenced this issue Sep 4, 2019
In case migration files are presents on an external jar, the external
jar must be unzipped to avoid FileSystemNotFoundException
gsmet added a commit that referenced this issue Sep 5, 2019
#3787 handle different sources of migrations files
@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you!
We are doing this automatically to ensure out-of-date issues does not stay around indefinitely.
If you believe this issue is still relevant please put a comment on it on why and if it truly needs to stay request or add 'pinned' label.

@stale stale bot added the stale label Nov 13, 2019
@maxandersen maxandersen removed the stale label Nov 13, 2019
@gsmet
Copy link
Member

gsmet commented Nov 18, 2019

@jaikiran would you be interested in having a look to that one?

@jaikiran
Copy link
Member

Hello @gsmet, it looks to me that @dcdh fixed this in this PR #3793 that got merged?

@dcdh is this still an issue in 1.0.0.CR1 of Quarkus or can we close this as fixed now?

@stuartwdouglas stuartwdouglas added the triage/out-of-date This issue/PR is no longer valid or relevant label Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant
Projects
None yet
Development

No branches or pull requests

5 participants