Project

General

Profile

Esempio file pomxml » History » Revision 2

Revision 1 (Gabor Murray, 03/13/2021 02:07 PM) → Revision 2/3 (Gabor Murray, 03/13/2021 02:19 PM)

h1. Esempio file pomxml 

 <pre> 
 <?xml version="1.0" encoding="UTF-8"?> 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
   <properties> 
     <properties> 
         <!-- java compiler version --> 
         
     <maven.compiler.source>1.8</maven.compiler.source> 
         
     <maven.compiler.target>1.8</maven.compiler.target> 
     
   </properties> 

     

   <modelVersion>4.0.0</modelVersion> 

     

   <groupId>com.your.organization</groupId> 
     
   <artifactId>NameOfProject</artifactId> 
     
   <version>1</version> 
   <dependencies> 
     <dependencies> <dependency> 
         <dependency> 
             <dependency> 
                 
         <groupId>org.apache.logging.log4j</groupId> 
                 
         <artifactId>log4j-api</artifactId> 
                 
         <version>2.14.1</version> 
             
       </dependency> 
             
       <dependency> 
                 
         <groupId>org.apache.logging.log4j</groupId> 
                 
         <artifactId>log4j-core</artifactId> 
                 
         <version>2.14.1</version> 
             
       </dependency> 
         
     </dependency> 
     
   </dependencies> 
   <build> 
     <build> 
         <sourceDirectory>path/of/sources</sourceDirectory> 
         
     <resources> 
             
       <resource> 
             
         <!-- additional directory. Files into this dir are added to classpath--> 
             
         <directory>additional/path/</directory> 
         
       </resource> 
         
     </resources> 
         
     <plugins> 
             
       <plugin> 
                 
         <groupId>org.apache.maven.plugins</groupId> 
                 
         <artifactId>maven-assembly-plugin</artifactId> 
                 
         <executions> 
                     
             <execution> 
                         
                 <phase>package</phase> 
                         
                 <goals> 
                             
                     <goal>single</goal> 
                         
                 </goals> 
                         
                 <configuration> 
                             
                     <archive> 
                                 
                     <manifest> 
                                     
                         <mainClass> 
                                         
                             package.MainClassName 
                                     
                         </mainClass> 
                                 
                     </manifest> 
                             
                     </archive> 
                             
                     <descriptorRefs> 
                                 
                         <descriptorRef>jar-with-dependencies</descriptorRef> 
                             
                     </descriptorRefs> 
                             <finalName>final-jar-name</finalName> 
                             <!-- Set to false to avoid the "jar-with-dependencies" suffix --> 
                             <appendAssemblyId>false</appendAssemblyId> 
                         
                 </configuration> 
                     
             </execution> 
                 
         </executions> 
             
     </plugin> 
         
     </plugins> 
     
   </build> 
 </project> 

 </pre>