Comments (15)
Sorry. I posted many partial results so I deleted it all. I need to sit down, isolate as much as possible and send you a report. That's what I'll do.
from java.
It's also worth pointing out that you don't need to create the entire Structurizr model in a single pass ... you can have multiple Java programs that each append different information to a single model, as described at https://github.com/structurizr/java/blob/master/docs/usage-patterns.md
from java.
Yesterday I also tried adding the documentation java source coude into parent POM, but this didn't help, because all maven parent project plugins execute before module build and plugins.
from java.
Hello, i have been dealing with the same issue and wound up creating a completely separate project that has all my spring boot service jars as dependencies. I have created a component finder per service, scoped by package, and played with a variety of finder strategies to get results. I'm still getting weird class not found exceptions on things outside of the service packages, but at least I have a separation of components correlating to the services.
from java.
Exactly the same here. Yes, these ClassNotFound exceptions dependencies are wierd. Do you have any ideas about these exceptions?
Did your finder strategies ever return anything useful? For me only PetClinic (the example) worked. Any packaged spring boot app as dependency din't work for me.
from java.
I am trying to track them down - I've had weird ones on jaxrs which shouldn't happen, and others on static inner classes. Not sure yet what the deal is.
The finder strategies have been interesting:
- using the SprintComponentFinderStrategy returns good stuff, and also allows me to do like the sample and hook them up to the relevant containers (Repository to a manually created database container for example).
- using the TypeMatcherComponentFinderStrategy has also given good results, although makes me have to do more things. I've used the regex type matcher as well as suffix matcher. This gives me more things (and granularity) than the Spring finder, so I can separate things into different layers (Resource, Service, Mapper, DAO, Validator, etc). If your service code is very consistent in naming, this attempt is going well.
What issues are you having with your own packaged springboot services? I've had to reduce the package level to only what the service has - anything else seems to blow up. This then excludes all shared code, so I want to tackle that next somehow.
from java.
I extended one of the type finder strategies and overrode findComponents() to get some visibility into the NoClassDefs - definitely appears to be on inner classes and private interfaces. I excluded all of them via the componentFinder.exclude() method and now have lots of data. Not sure if that's the correct approach, but it got me further anyways.
from java.
I'll add some more info with my specific ClassNotFound error logs. But I'm afraid won't handle it this week. It's good not to be alone in this situation.
from java.
I don't think I will be willing to create a "completely new project" as you did. I want the documentation to be part of the very same codebase.
from java.
Where in your codebase are you planning to put the documentation? Do you want a per service yaml/json alongside the service? Or one giant output for all services? How you manage the output is most likely going to determine if something is in the same codebase, not where the code lives that generates it.
That being said, it should be just as possible to create another module in your project that has the service jars as dependencies. This would allow you to have everything in the same codebase. I was much more successful with the service jar as a dependency approach than any other classpath building approach I could come up with. Even using mvn build:dependency output did not yield results.
from java.
My ambitions for now are:
- Create a maven module called e.g. "documentation" with dependencies on all modules it's going to document.
- Add build plugins for the documentation module to: Generate diagram sources, process sources to diagrams (PlantUML or GraphViz diagrams)
- Use the diagrams from prepared markdown documentation.
- There, write all the "supplementary" information about system context, prepare system context diagram etc.
- Somewhere in the module, define a set of containers (a list of original modules of my project) and for each a strategy to be used. (Extract description from POM file, if the module is a spring app, extract components etc). Then define component diagrams for those container.
- I have a little trougle describing "uses" relationships between containers, because the source code we have doesn't give that information clearly.
But I still get these reflextion ClassNotFound or similar errors. Now, I'm gettin an impression, that the reflection problems start when I add the build plugins. No more clues now.
from java.
This would allow you to have everything in the same codebase. I was much more successful with the service jar as a dependency approach than any other classpath building approach I could come up with.
What is a "service jar". Is it somehow different that just "jar"?
from java.
I would also suggest adding another module (e.g. "documentation") to your project, with the appropriate dependencies needed to generate the model.
I can see there other a few other issues referenced in the comments. Please feel free to open separate GitHub issues for them.
from java.
What is a "service jar". Is it somehow different that just "jar"?
When i say "service jar", i mean the jar generated by the springboot plugin "package" operation. This is just a regular jar, but is the one you use to start your service: java -jar "the service jar". This jar will have all the dependencies for the service included in it via the springboot packaging process. This was the jar I had the most success with, rather than attempt to add every dependency each service had.
I added the service jar dependency via maven by referencing the maven info for my service - artifact id, version id, etc. and installing my service jar in my local maven repo.
from java.
@dhawken Could you please elaborate a bit more on this?
I added the service jar dependency via maven by referencing the maven info for my service - artifact id, version id, etc. and installing my service jar in my local maven repo.
from java.
Related Issues (20)
- Use !include with private URL
- Usage for really big and complex systems
- Delete relationship
- Implied relationship don't preserve tags in scripts
- Include systems to several groups
- Add support to filter on element properties using DSL
- Unknown model item type on 'element' HOT 1
- How to have all child relationship description display on parent context view?
- Support observing changes (at least to model)
- Ability to include single files as documentation
- Unable to call parse() methods in plugins due to DSL parser validation additional curl brace validation HOT 1
- Workspace.trim() is not correctly removing relationships when the destination of a relationship is removed from the workspace HOT 1
- Implied relationships for some filtered views aren't rendered HOT 2
- Groovy interop call yields illegal argument exception from DSL - using CLI, works from test HOT 5
- !include doesn't work with files encoded as UTF-8 BOM HOT 2
- Better / verbose error reporting
- public wasm version on npmjs.com
- Let RelationshipView be a PropertyHolder
- Let implementations of PropertyHolder return an immutable map HOT 2
- prevent overlapping relations by changing the order in plantUML export HOT 3
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 java.