How to externalize Spring Boot application.properties to tomcat/lib folder

A solution could be to load application-{profile}.properties as @PropertySource annotations as this question suggests, but then the logging system wont work, as you can see in the documentation. The logging system is initialized early in the application lifecycle and as such logging properties will not be found in property files loaded via @PropertySource annotations. This … Read more

How to keep Maven profiles which are activeByDefault active even if another profile gets activated?

One trick is to avoid activeByDefault, and instead activate the profile by the absence of a property, eg: <profiles> <profile> <id>firstProfile</id> <activation> <property> <name>!skipFirstProfile</name> </property> </activation> … </profile> </profiles> You should then be able to deactivate the profile with -DskipFirstProfile or with -P !firstProfile, but otherwise the profile will be active. See: Maven: The Complete … Read more

Maven 3 warnings about build.plugins.plugin.version

Add a <version> element after the <plugin> <artifactId> in your pom.xml file. Find the following text: <plugin> <artifactId>maven-compiler-plugin</artifactId> Add the version tag to it: <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> The warning should be resolved. Regarding this: ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-compiler-plugin is missing Many people have mentioned why the issue is happening, but fail to suggest a fix. All … Read more

Maven 3 – Worth it? [closed]

What’s new in Maven 3? Here is a little compilation of what you can find around the net. Backward compatibility – Maven 3 is backward compatible, that is extremely important (especially for those who experienced the Maven 1 to Maven 2 transition). Versionless parent elements – Maven 3 will remove the need to specify the … Read more

Maven: The packaging for this project did not assign a file to the build artifact

I don’t know if this is the answer or not but it might lead you in the right direction… (I believe these steps are for people working with Intellij IDE. The install:install is available in the Maven panel on the right by default. The below steps are alternative to it.) The command install:install is actually … Read more