Serious problems with Maven
As much as I'd like to be concise, this will take a while to explain. I wanted to make simple annotation processor for my side project - http server with sort of MVC model. I added annotations
@Mapping
and @Mappings
(@Mapping
is @Repeatable
) and I proceeded with creating the processor. For this I used Google's AutoService, however it wouldn't generate the files (Maybe I did something wrong?). So, I included maven-compiler-plugin
in my build configuration, but it still wouldn't generate the files. I started digging deeper, running mvn clean
, mvn install
, mvn compile
, yet it almost always results in build failure. The only time it gets to work is when I delete the plugin mentioned earlier (which means that no files are generated). It's worth mentioning that my project has a umm unique structure, and so here it is:
22 Replies
⌛
This post has been reserved for your question.
Hey @ENDERFUN! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
And here are all pom.xml's:
(HttpSeverEnv)
:
(HttpServer)
:
And (Application)
:
When I try to compile my project, I get this build output:
And this is just one of many such errors (there's like 20 of them)
If you need any additional info, just ping me and I'll try to respond asap
Oh and it's worth noting I'm using IntelliJ
If you need a more detailed explanation, we can talk on vcwell
maybe the problem is the project structure
It could be, but when I looked into the logs (
mvn compile -X
) it was first compiling HttpServer
which seems right
Then all of a sudden it cannot find elementsIt's like huge
are all of those classes yours
or are some made by spring
Nah I ain't using spring
It's all mine
I'm writing a server from ground up
Thought it'd be a good idea It wasn't
😱
well thats kind of an interesting approach
what if you just switch to use spring
Well
I'm making a competition to spring
Something more lightweight
And simple
And just for the record: I'm writing
HttpServer
, the Application
is just a testing sitebtw for lombok you should mark it in annotation processors
Could it be the culprit?
Oh and also don't take a bad impression
I suck at maven
Only know how to add dependencies
I'm no expert in build process or anything else
yea same
this is the first time i see someone use maven without spring
show the encoder java class
maybe all ur errors are related to lombok
Oh alright
But I doubt it's that
There's even no lombok in here
(As for the code quality, I'm considering to change this mechanism such that there will be interface
Encoder
which would be implemented by GzipEncoder
, BrotliEncoder
, etc. so you don't have to scold at me)can u format the code
show the request class
seems to be throwing an error there
Sorry im away from computer rn
I'll send it when ill be active
I'm back
Sorry it's too long
(Don't comment me on overdose of stream api)
ill check it later cant open rn
Sure
Well, after deleting the whole
<build>
tag from pom.xml, auto-service
dependencies and all pieces of code including it the compilation works like a charm
So one of those things is definetly a culprit
The most probable cause is my mistake in <build>
part of pom💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.