Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

Wednesday, June 14, 2017

Not so well known IntelliJ keyboard sortcuts

IntelliJ is well known for its heavy use of keyboard shortcuts.
Many times you don't even know that a shortcut exists.

This blog shows how to refactor maven's pom.xml
https://blog.jetbrains.com/idea/2010/04/maven-refactorings-introduce-property/

Select the dependency version then:
Ctrl-Alt-V (Extract property) 
will introduce a version property.

Thursday, June 2, 2016

Display the value of a property with Maven

Sometime you need to know the value of a property in you maven scripts.
This happend to me when there were to many profiles.

So can just write the value of a property.
Add this plugin definintion in you build section
et voilĂ 


<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-antrun-plugin</artifactId>
  <version>1.1</version>
  <executions>
    <execution>
      <phase>validate</phase>
      <goals>
        <goal>run</goal>
      </goals>
      <configuration>
       <tasks>
         <echo>Displaying value of 'myProperty' property</echo>
         <echo>[myProperty] ${myProperty}</echo>
       </tasks>
      </configuration>
    </execution>
  </executions>
</plugin>

Thank you http://www.avajava.com/tutorials/lessons/how-do-i-display-the-value-of-a-property.html