Răsfoiți Sursa

pom.xml update

Changed pom.xml to specify main class and append build number to
artifact name.
Tankernn 8 ani în urmă
părinte
comite
77668ea6df
1 a modificat fișierele cu 30 adăugiri și 7 ștergeri
  1. 30 7
      pom.xml

+ 30 - 7
pom.xml

@@ -2,7 +2,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>eu.tankernn.accountmanager</groupId>
   <artifactId>eu.tankernn.accountmanager</artifactId>
-  <version>0.0.1-SNAPSHOT</version>
+  <version>1.0.0</version>
   <name>Account Manager</name>
   <description>A super-simple account management system.</description>
   
@@ -16,16 +16,39 @@
   </dependencies>
   
   <build>
+  	<finalName>${project.artifactId}-${project.version}.${build.number}</finalName>
     <sourceDirectory>src</sourceDirectory>
     <plugins>
       <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>3.3</version>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+        	<execution>
+        		<phase>package</phase>
+        		<goals>
+        			<goal>single</goal>
+        		</goals>
+        		<configuration>
+		          <archive>
+		          	<manifest>
+		          		<addClasspath>true</addClasspath>
+		          		<mainClass>eu.tankernn.accounts.frame.MainFrame</mainClass>
+		          	</manifest>
+		          	<manifestEntries>
+		          		<Implementation-Version>${build.number}</Implementation-Version>
+		          	</manifestEntries>
+		          </archive>
+		          <finalName>${project.build.finalName}</finalName>
+		          <appendAssemblyId>false</appendAssemblyId>
+		        </configuration>
+        	</execution>
+        </executions>
       </plugin>
     </plugins>
   </build>
+  
+  <properties>
+  	<maven.compiler.source>1.8</maven.compiler.source>
+  	<maven.compiler.target>1.8</maven.compiler.target>
+  	<build.number>SNAPSHOT</build.number>
+  </properties>
 </project>