javydreamercsw
javydreamercsw

Reputation: 5099

Validate Maven values in Java

This might be an easy task so I believe there should be something out there already. I'm trying to validate Maven related stuff like: artifact ID, group ID, Java package name, Version and a path.

Those are going to be provided from a NetBeans plug in in order to generate a maven project, thus need to be verified from the plugin before even attempting to create the project. (More friendly than letting the process blow up).

Right now I'm trying to verify with Java string checks but there should be something better like a regex.

Any ideas?

Upvotes: 5

Views: 390

Answers (1)

Tomas F
Tomas F

Reputation: 7596

You can use maven's Model class and validate with their ModelValidator.

Upvotes: 2

Related Questions