Skip to content

Conversation

@nrayburn-tech
Copy link
Contributor

@nrayburn-tech nrayburn-tech commented Sep 24, 2025

Ref #74
Ref #64 (personal preference is to close this as not planned, I left a comment on that PR though so it can be discussed there)

Closes #60
Closes #59
Closes #52

import jakarta.validation.ValidatorFactory;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hibernate Validator changed from javax to jakarta, so the imports needed to be updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, a lot of projects still use the javax namespace. Thats why this project has ValueExtractors for javax and jakarta. We should support javax at least until Jackson 3, since that is based on Java 17, at which point all projects should have migrated to jakarta.

<goal>repackage</goal>
</goals>
<configuration>
<skip>true</skip>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this execution is skipped, I don't see how this plugin would be doing anything. I did a build with and without the plugin enabled and didn't see any changes in files.

<!-- endregion -->
</properties>

<dependencyManagement>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This section is to aid in the migration away from jackson-base longer term. Instead of relying on the versions provided by the parent, provide the versions ourselves here.

import jakarta.validation.ValidatorFactory;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, a lot of projects still use the javax namespace. Thats why this project has ValueExtractors for javax and jakarta. We should support javax at least until Jackson 3, since that is based on Java 17, at which point all projects should have migrated to jakarta.


<!-- region Dependency Versions -->
<!-- Validator 8+ requires Java 11, Validator 9+ requires Java 17. -->
<hibernate-validator.version>7.0.5.Final</hibernate-validator.version>
Copy link
Contributor

Choose a reason for hiding this comment

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

This likely has to be rolled back to 6.x, since that is the last version that supports the javax namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This and the Jakarta import changes are test only, so I think it’s a safe change to make. The project runtime still allows the consumer to provide whichever (javax or Jakarta) they want to use.

Copy link
Contributor

Choose a reason for hiding this comment

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

I took a look at the implementation again and you are right. I thought the implementations were more entangled with the namespace.

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>${maven-gpg-plugin.version}</version>
Copy link
Member

Choose a reason for hiding this comment

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

this will update gpg plugin to v3.2.8. let's give it try

if it doesn't work, we will revert the upgrade

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ya I wasn’t really sure how to test it. I’m not familiar with the plugin, but the available options looked the same from what I noticed.

@wing328
Copy link
Member

wing328 commented Sep 24, 2025

@nrayburn-tech thanks for the PR

@Til7701 thanks for the review

@wing328 wing328 merged commit ebb20c4 into OpenAPITools:master Sep 24, 2025
@wing328
Copy link
Member

wing328 commented Sep 24, 2025

tests in the master failed (restarted didn't help):

https://github.com/OpenAPITools/jackson-databind-nullable/actions/runs/17972102820

can you please take a look when you've time?

@Til7701
Copy link
Contributor

Til7701 commented Sep 24, 2025

#76 should fix this. See https://stackoverflow.com/a/76762846

In the maven release action is a mvn clean package install call which causes the sources plugin to fail.

@nrayburn-tech
Copy link
Contributor Author

Yes. I’ll have most of the day tomorrow to work on this project.

Just glancing at the error, my guess is jackson-base parent pom has the attach sources configured and so does this project. I haven’t actually confirmed that though.

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.

Upgrade jackson-core to latest. Is this repo still maintained ?

3 participants