Comments (7)
it is java regexp based so try something like fr\.mycompany\.*.*\.model.*
from assertj-assertions-generator-maven-plugin.
Hello Joel,
in fact, your feature doesn't work :-(
In my project, the fr.mycompany subdirectory contains many classes with imports on classes provided by JBoss EAP server.
Below, the stacktrace throws by the mojo :
A required class was missing while executing org.assertj:assertj-assertions-generator-maven-plugin:2.2.0:generate-assertions: org/jboss/security/RunAsIdentity
I think the filtering of full qualified name classes (based on java regexp) is maybe realised after loading classes with Class.forName() for example ?
For me, there are 2 solutions to solve this problem:
- be able to put wilcards on the definition of directory (ex: fr.mycompany.**.model)
- add a silent option in the mojo to not crash if a ClassNotFoundException is raised
I can write and push a pull-request if needed.
What do you think ?
Thanks for your help.
Best Regards,
Fabien
from assertj-assertions-generator-maven-plugin.
My bad I gave incorrect information, there is no support for regex when specifying packages.
When a package is specify, it will be introspected along with its subpackages.
You have then additional configuration to include and exclude classes based on regexes. see http://joel-costigliola.github.io/assertj/assertj-assertions-generator-maven-plugin.html#configuration as a reference.
If you believe this is not working, please provide a project sample to reprocude the issue.
Hope it helps!
from assertj-assertions-generator-maven-plugin.
Hello Joel,
I created a project sample to reproduce the problem described in issue #61.
You will find the sources here : https://github.com/fperie/issue_61_assert_assertions_generator_maven_plugin
The problem occured when a class extends an another class which is in a library injected in provided scope.
The mojo should not crash.
What do you think ?
Best regards,
Fabien
from assertj-assertions-generator-maven-plugin.
Thanks I will look at it after I release assertj-core 3.14.0, likely in a few weeks.
from assertj-assertions-generator-maven-plugin.
Hello Joel,
other question : when I build the mojo with maven in command line, I have 2 failures. Why ?
How can I have an success build with maven in command line ?
When I launch the junit tests in Eclipse, all tests are green !
stdout_maven_clean_install.txt
Thank's a lot,
Best regards,
Fabien
from assertj-assertions-generator-maven-plugin.
👀
from assertj-assertions-generator-maven-plugin.
Related Issues (20)
- Plugin fails if there is a space in project directory path
- Plugin is a Maven 2.x plugin, which will be not supported in Maven 4.x HOT 1
- Use Objects::deepEquals instead of deprecated Objects::areEqual
- Is this project still maintained? HOT 1
- Make build fail if assertion classes could not be generated HOT 1
- Only create assertion class when it does not exist or when the associated class has changed HOT 3
- custom_assertion_class does not use generateAssertionsInPackage HOT 5
- Custom templates not found in multi-module projects HOT 2
- Add option to make the generated SoftAssertions implement AutoCloseable HOT 2
- Allow for client-specified name for Assertions class HOT 1
- Plugin is generating assertions for test classes and code generated by other plugins HOT 1
- Running Assertj Generator with JDK 11 gives non-compiling code HOT 1
- A required class was missing while executing org.assertj:assertj-assertions-generator-maven-plugin:2.1.0:generate-assertions: org.junit.rules.TestRule HOT 3
- Exclude package private classe references from entry points assertions
- Plugin randomly generates classes that don't compile HOT 1
- Cut a new release for new `assertj-assertions-generator` version HOT 4
- Mark plugin as thread-safe HOT 1
- Update version of assertj-core HOT 1
- allow the jakarta version of `@Generated` instead of the javax one. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assertj-assertions-generator-maven-plugin.