[FOLIO-2928] Maven deploy fails on mod-remote-storage master branch Created: 23/Dec/20 Updated: 05/Jan/21 Resolved: 25/Dec/20 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | P2 |
| Reporter: | Siarhei Charniak | Assignee: | Jakub Skoczen |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||||||||||
| Sprint: | DevOps: Sprint 104 | ||||||||||||||||||||||||
| Development Team: | FOLIO DevOps | ||||||||||||||||||||||||
| Description |
|
Overview:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/jenkins/workspace/io-org_mod-remote-storage_master/src/main/java/org/folio/rs/mapper/ConfigurationsMapper.java:[17,8] Internal error in the mapping processor: java.lang.RuntimeException: javax.annotation.processing.FilerException: Attempt to recreate a file for type org.folio.rs.mapper.ConfigurationsMapperImpl ...
Local maven build works fine. |
| Comments |
| Comment by Mikhail Fokanov [ 23/Dec/20 ] |
|
My gut feeling is that it is due to Linux user, which run maven build doesn't have permissions to create files. |
| Comment by Sergiy Vysotskiy [ 24/Dec/20 ] |
|
Jakub Skoczen Could you please help, who could check this ticket today or no later than Monday? |
| Comment by Siarhei Charniak [ 24/Dec/20 ] |
|
This error occurs because ConfigurationsMapperImpl.class already exists in target dir. Is it possible to clean target before maven deploy? |
| Comment by Marc Johnson [ 24/Dec/20 ] |
Does that mean this issue occurs locally if following the same steps as the Jenkins build without using a clean goal? |
| Comment by Siarhei Charniak [ 24/Dec/20 ] |
|
Marc Johnson, yes |
| Comment by Marc Johnson [ 24/Dec/20 ] |
|
Does that mean it can be fixed without the involvement of the DevOps folks by making the deploy step tolerate the pre-existence of that class? By any chance is ConfigurationsMapperImpl generated code? |
| Comment by Siarhei Charniak [ 24/Dec/20 ] |
|
Marc Johnson |
| Comment by Marc Johnson [ 24/Dec/20 ] |
I've just cloned the code, this can be reproduced by issuing mvn compile twice without an intermediary clean. My understanding is that it should be ok to execute the compile goal repeatedly without a clean with each one performing an incremental compile. I think rather than asking the DevOps folks to change the build process, instead change the code generation to not fail on subsequent executions by not attempting to regenerate the file unless it needs to. I'm not a maven expert, so I may be wrong about this, maybe folks like Adam Dickmeiss or Julian Ladisch can advise on this better. |
| Comment by Siarhei Charniak [ 25/Dec/20 ] |
|
This issue was solved by adding maven-clean-plugin into pom.xml - https://github.com/folio-org/mod-remote-storage/pull/10 |
| Comment by Siarhei Charniak [ 25/Dec/20 ] |
|
This issue was solved by adding maven-clean-plugin into pom.xml - https://github.com/folio-org/mod-remote-storage/pull/10 |