War file, build by Gradle, do not find resource with withspace - spring

I am unsure where my problem exactly is...it shows as following:
Build my project using Maven, everything works
Build my project using Gradle, start up and behavior are fine; except for one icon that has a white space in his name
If I open the URL I get a 404
In my log file I get:
2016-02-02 16:55:49 INFO VaadinServlet:738 - Requested resource [/VAADIN/themes/ThemeName/icon/ic-A A_active.png] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
If I look into the folder in webapps on the server, the file is there. With exactly the same size as in the folder of the maven build.
I use pretty basic stuff and the examples provided by spring boot (for gradle & maven)...
The only difference between maven & gradle that I could spot was that gradle do not have the transform steps of the parent-pom of spring-boot.
Is that the reason? Because spring boot is configuring the war file slightly differently so that white spaces are okay?
Anybody an idea how I can allow white spaces in the war file?
I hope you can understand my questions. I can upload my build files, but they are pretty standard in this regards...
Best regards

Found the issue, it was based on missing BOMs in gradle.
I skipped the VAADIN BOM but it was updating the version of some VAADIN dependencies...

Related

IntelliJ No files were downloaded for xyz

I've created a new project in IntelliJ.
When I go in to:
Project Structure -> Libraries -> Add -> From Maven -> 'com.atlassian.seraph:atlassian-seraph:3.0.3'
I get the error message 'No files were downloaded for com.atlassian.seraph:atlassian-seraph:3.0.3'
Backstory:
I'm using IntelliJ to write a custom SSO authenticator for JIRA. This is not a JIRA plugin, it's just a class that a custom JSP will use.
I intend to produce a JAR and put it in WEB-INF/lib.
I'm not sure what I've missed here. This is my first exposure to maven and I've googled this extensively.
If you did not change the default remote repository of your maven, it should be this . It seems that the artifact (com.atlassian.seraph:atlassian-seraph:3.0.3), you are looking for, is not in the default remote repository. There are two solutions for your case,
1.Add a new remote repository, which has this artifact, to your project.
2.Find the jar file somewhere on internet, add it to your project as an external jar file. Here is a great tutorial about this.
I've changed from idea 14 to idea 15, and downloading maven jar feature started to work)
My Maven setup in ide aimed to external v3.2.1, but may be it would work even with bundled one.

MAVEN - generating jboss 7 (or EAP 6.x) modules from dependencies

I would like to ask, if there is some maven plugin (or another way) to generate jboss modules hierarchy (with modules.xml files) from maven dependencies (or in list of libraries for such a maven plugin) ?
I have found this plugin :
https://www.smartics.eu/confluence/display/SJBMMP/smartics+JBoss+Modules+Maven+Plugin;jsessionid=3CA5AE2D1DEB5DFB62C1E64692EDCAB6
But documentation / usage pages seem to be offline (or for some reason I cannot open page).
Thank you very much for your help !
I have tried SMARTICS plugin plugin and it created for each maven module special JAR file with ALL dependencies in it.
It is like using maven assembly plugin but all libraries are packed in standalone jar which can be placed into own jboss module. Than in your application : jboss-deployment-structure.xml you reference to this librari (e.g. jar file) and application has all libraries provided.
But splitting dependencies into own directories and generating modules.xml is not possible (confirmed by JBOSS EAP support).
I will create standalone maven project (something like "JBOSS-modules BOM project") which will generate such structure (this structure will be ready for usage on jboss).
I just would like to add an introduction to the mentioned plugin for Maven:
https://www.smartics.eu/confluence/display/BLOG/2013/10/18/Maven+Plugin+to+generate+a+Modules+Directory+for+JBoss+AS+7
The article includes screenshots that help new users to get an idea on how the plugin generates separate modules.
(I would like to comment to your answer, but unfortunately I'm some points from being entitles to do so :( )

How to post process a war with maven?

I am wondering a nice way of post processing a war produced with maven to add libs to it.
I have a war that is generated by maven. This war has many dependencies with scope provided because the application server is meant to provide them through shared libraries (don't blame me for shared libs...)
I am trying to change this behaviour and to have a standalone war. I'd like to find a way to generate a war that contains those additional jar.
I have tried with an assembly to add the jars and repack it but w/o any success. Mainly because I didn't find a way to add dependencies from maven within an assembly.
Any point, suggestions or anything else that could help ?

Maven project with maven-shade-plugin doesn't deploy to SpringSource Server correctly

We assemble a war file from several Maven based projects.
One of the projects uses maven-shade-plugin to include additional library inside its target jar file. Let's call it x.jar for the sake of this discussion.
When maven builds the war file it contains the correct x.jar file with packaged additional library inside.
We use Spring Source of the latest version (3.4.0) to deploy it to the server configured in Spring Source. Server is Sprint TC Server 2.0.3.
As soon as the project gets deployed to the server (which is Sprint TC Server 2.0), the jar file (x.jar) somehow gets replaced with incorrect small one without packaged library inside.
This smaller x.jar doesn't exist anywhere in the file system before the deployment, so it looks like Spring Source compiles it on its own.
As a result we can't deploy our system in Spring Source.
Do you, guys, the reason or a workaround for our problem?
----------- UPDATE -----------
We've conducted a test. We've broken maven pom.xml file before we deployed it and as a result Spring Source deployed the original files without recompiling it. It resulted in a correct deployment.
This test shows that Spring Source rebuilds jars silently upon deploying them to servers.
Is there a way to stop it or to make it work properly?
My suggestion, unfortunately, is to not use the shade plugin, but rather a clever combination between assembly, dependency and jar plugins, kinda like the guy in the answer here:
Invalid or corrupt JAR File built by Maven shade plugin
If you have any trouble configuring it, let me know.
And if you have the error logs of the server, it would be nice to post them as well.

2 WARs in maven EAR build

I am new to maven and as a matter of fact new to the build tools and process or should i say the whole web structure. I have a slight problem for which i need help.
I am going to make a web project which on compiling/deployment will give a war file. And i have a separate project for which the war(just the war file after bundling the project) file will be given to me.
Now my requirement is to make a EAR file comprising both my project bundle and also including the war of the other completed project. I need to use maven for this.
I know the multi-module projects can be created using maven. But i am not sure how it will handle isolated war file. I mean for my project it will have the whole structure , artifactId and groupId. What about the other war how will it be handled.
I know this may be a novice question. But can someone please help.
Thanks
The way this would typically be handled would be making the isolated WAR file a dependency. Install it in your local maven repo and just list it as a dependency in the POM for your EAR module. Also, making your WAR project a module under your EAR project would handle the WAR that you're actually building.

Resources