Lei Yang
Lei Yang

Reputation: 4365

maven pom: difference between application.main.class and exec.main.class

I've searched and read maven docs, but didn't find the answer. I'm new to java, so please forgive me if this is a duplication.

In our company project I see a pom defines such elements:

    <properties>
      <application.main.class>com.xxx.classfoo</application.main.class>
      <exec.main.class>com.yyy.classbar</exec.main.class>
      ...others...
    </properties>

So the question is what's the differences between them? Their names seem so much alike!

Upvotes: 0

Views: 154

Answers (2)

YK S
YK S

Reputation: 3430

Quoting from maven docs :

Maven properties are value placeholder, like properties in Ant. Their values are accessible anywhere within a POM by using the notation ${X}, where X is the property.

As described above they are just placeholders and can be referred to using ${propertyName} .

Now there may be need to refer to the classes defined by application.main.class or exec.main.class and that's why they are defined in proeprties and wherever to be used they can be referred using ${application.main.class} or ${exec.main.class}.

Upvotes: 1

Igor
Igor

Reputation: 814

these are your custom properties defined specifically for your project - for more info: https://maven.apache.org/pom.html#Properties

try searching for ${application.main.class} in your pom.xml and you will see where it is used

Upvotes: 1

Related Questions