mojohaus / properties-maven-plugin

The Properties Maven Plugin

Home Page:https://www.mojohaus.org/properties-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

comma separated list of files

michaldo opened this issue · comments

If I want to launch a build and pass in command line 3 property files I do

mvn install -Dfile1=jboss.properties -Dfile2=db.properties -Dfile3=mq.properties 


<execution>
  <phase>initialize</phase>
  <goals><goal>read-project-properties</goal></goals>
  <configuration>
      <files>
          <file>${file1}</file>
          <file>${file2}</file>
          <file>${file3}</file>
        </files>
  </configuration>
</execution>

But when I want to launch another build (for selenium test in my case) and I want pass only 1 property file:

mvn install -Dfile1=jboss.properties 

execution fails with null pointer exception

I would to modify my build in command line by passing 1 or many property files

mvn install -Dmy.property.files=jboss.properties,db.properties,mq.properties 

<execution>
  <phase>initialize</phase>
  <goals><goal>read-project-properties</goal></goals>
  <configuration>
      <commaSeparatedFiles>${my.property.files}</commaSeparatedFiles>
  </configuration>
</execution>