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

Check, that dev-mode is omitted on projects with pom packaging #1009

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

fedinskiy
Copy link
Contributor

Summary

Check, that dev-mode is omitted on projects with pom packaging
Required for QUARKUS-2757

Please select the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • Dependency update
  • Refactoring
  • Backport
  • New scenario (non-breaking change which adds functionality)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)

Checklist:

  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

@fedinskiy fedinskiy requested a review from pjgg January 19, 2023 16:03
@pjgg pjgg added the triage/backport-2.13? It needs to backport changes to branch 2.13 label Jan 23, 2023
{//set packaging to POM
Path pom = getFileFromApplication(app, ROOT_FOLDER, "pom.xml").toPath();
System.out.println(pom);
List<String> content = Files.readAllLines(pom);
Copy link
Contributor

Choose a reason for hiding this comment

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

And what about to use this maven lib:

<dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <scope>test</scope>
        </dependency>

And then parser / change the pom with something like

File pom = getFileFromApplication(app, ROOT_FOLDER, "pom.xml");
            MavenXpp3Reader reader = new MavenXpp3Reader();
            Model model = reader.read(new FileReader(pom));
            model.setPackaging("pom");

            MavenXpp3Writer mavenWriter = new MavenXpp3Writer();
            Writer writer = new FileWriter(pom.getPath());
            mavenWriter.write(writer, model);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do not need such advanced modifications. Read+replace is enough

@fedinskiy fedinskiy force-pushed the feature/pom-dev-exclusion branch from f329ba8 to 32af77b Compare January 24, 2023 07:59
@fedinskiy fedinskiy force-pushed the feature/pom-dev-exclusion branch from 32af77b to 4fd38c7 Compare January 24, 2023 08:30
@fedinskiy fedinskiy requested a review from pjgg January 24, 2023 08:31
Copy link
Contributor

@pjgg pjgg left a comment

Choose a reason for hiding this comment

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

LGTM

@pjgg pjgg merged commit 5f036e5 into quarkus-qe:main Jan 25, 2023
@pjgg pjgg added this to the 2.7 milestone Feb 2, 2023
@pjgg pjgg removed the triage/backport-2.13? It needs to backport changes to branch 2.13 label Feb 2, 2023
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.

2 participants