Guest User

Untitled

a guest
Nov 17th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 15.29 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  4.  
  5.     <modelVersion>4.0.0</modelVersion>
  6.     <groupId>es.udc.ws.app</groupId>
  7.     <artifactId>ws-app</artifactId>
  8.     <packaging>pom</packaging>
  9.     <version>1.0.0</version>
  10.     <name>WS App Project</name>
  11.  
  12.     <modules>
  13.         <module>ws-app-model</module>
  14.         <module>ws-app-service</module>
  15.         <module>ws-app-client</module>
  16.     </modules>
  17.  
  18.     <!-- =================================================================== -->
  19.     <!-- Default values for properties. These default values are expected
  20.        to be valid for most profiles. Specific profiles can overwrite values when
  21.        necessary. -->
  22.     <properties>
  23.         <!-- Data source properties -->
  24.         <dataSource.user>ws</dataSource.user>
  25.         <dataSource.password>ws</dataSource.password>
  26.         <dataSource.jndiName>jdbc/ws-javaexamples-ds</dataSource.jndiName>
  27.         <testDataSource.user>${dataSource.user}</testDataSource.user>
  28.         <testDataSource.password>${dataSource.password}</testDataSource.password>
  29.  
  30.         <!-- Encoding -->
  31.         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  32.  
  33.         <!-- Package versions -->
  34.         <commonsDbcp.version>2.5.0</commonsDbcp.version>
  35.         <junit.version>4.12</junit.version>
  36.         <servletApi.version>2.3</servletApi.version>
  37.         <httpclient.version>4.5.6</httpclient.version>
  38.         <jdom2.version>2.0.6</jdom2.version>
  39.         <jaxws.version>2.3.0.2</jaxws.version>
  40.         <ws-util.version>3.2.4</ws-util.version>
  41.  
  42.         <!-- JDBC driver properties -->
  43.         <jdbcDriver.groupId>mysql</jdbcDriver.groupId>
  44.         <jdbcDriver.artifactId>mysql-connector-java</jdbcDriver.artifactId>
  45.         <jdbcDriver.version>8.0.11</jdbcDriver.version>
  46.         <jdbcDriver.className>com.mysql.cj.jdbc.Driver</jdbcDriver.className>
  47.  
  48.         <!-- Data source properties -->
  49.         <dataSource.baseUrl>jdbc:mysql://localhost/ws</dataSource.baseUrl>
  50.         <dataSource.url>${dataSource.baseUrl}?useSSL=false&amp;serverTimezone=Europe/Madrid&amp;allowPublicKeyRetrieval=true</dataSource.url>
  51.         <testDataSource.url>${dataSource.baseUrl}test?useSSL=false&amp;serverTimezone=Europe/Madrid&amp;allowPublicKeyRetrieval=true</testDataSource.url>
  52.         <dataSource.createTablesScript>MySQLCreateTables.sql</dataSource.createTablesScript>       
  53.  
  54.         <!-- Plugin versions -->
  55.         <mavenCompilerPlugin.version>3.7.0</mavenCompilerPlugin.version>
  56.         <mavenResourcesPlugin.version>3.1.0</mavenResourcesPlugin.version>
  57.         <execMavenPlugin.version>1.6.0</execMavenPlugin.version>
  58.         <sqlMavenPlugin.version>1.5</sqlMavenPlugin.version>
  59.         <mavenAssemblyPlugin.version>3.1.0</mavenAssemblyPlugin.version>
  60.         <jettyMavenPlugin>9.4.9.v20180320</jettyMavenPlugin>
  61.         <jaxwsMavenPlugin>2.5</jaxwsMavenPlugin>
  62.        
  63.     </properties>
  64.  
  65.     <!-- ========================================================== -->
  66.     <!-- Profiles -->
  67.     <profiles>
  68.         <profile>
  69.             <id>win</id>
  70.             <activation>
  71.                 <os>
  72.                     <family>windows</family>
  73.                 </os>
  74.             </activation>
  75.             <properties>
  76.                 <tool.wsgen>${java.home}/../bin/wsgen.exe</tool.wsgen>
  77.                 <tool.wsimport>${java.home}/../bin/wsimport.exe</tool.wsimport>
  78.             </properties>
  79.         </profile>
  80.         <profile>
  81.             <id>nix</id>
  82.             <activation>
  83.                 <os>
  84.                     <family>!windows</family>
  85.                 </os>
  86.             </activation>
  87.             <properties>
  88.                 <tool.wsgen>${java.home}/../bin/wsgen</tool.wsgen>
  89.                 <tool.wsimport>${java.home}/../bin/wsimport</tool.wsimport>
  90.             </properties>
  91.         </profile>
  92.     </profiles>
  93.    
  94.     <!-- ========================================================== -->
  95.     <!-- Additional repositories -->
  96.     <repositories>
  97.     </repositories>
  98.  
  99.     <!-- ========================================================== -->
  100.     <!-- Dependency management -->
  101.     <dependencyManagement>
  102.         <dependencies>
  103.             <!-- JDBC driver -->
  104.             <dependency>
  105.                 <groupId>${jdbcDriver.groupId}</groupId>
  106.                 <artifactId>${jdbcDriver.artifactId}</artifactId>
  107.                 <version>${jdbcDriver.version}</version>
  108.                 <scope>test</scope>
  109.             </dependency>
  110.             <!-- Commons DBCP - JDBC Connection Pool -->
  111.             <dependency>
  112.                 <groupId>org.apache.commons</groupId>
  113.                 <artifactId>commons-dbcp2</artifactId>
  114.                 <version>${commonsDbcp.version}</version>
  115.                 <scope>test</scope>
  116.             </dependency>
  117.             <!-- JUnit -->
  118.             <dependency>
  119.                 <groupId>junit</groupId>
  120.                 <artifactId>junit</artifactId>
  121.                 <version>${junit.version}</version>
  122.                 <scope>test</scope>
  123.             </dependency>
  124.             <!-- Servlet API -->
  125.             <dependency>
  126.                 <groupId>javax.servlet</groupId>
  127.                 <artifactId>servlet-api</artifactId>
  128.                 <version>${servletApi.version}</version>
  129.                 <scope>provided</scope>
  130.             </dependency>
  131.             <!-- JAXWS -->
  132.             <dependency>
  133.                 <groupId>com.sun.xml.ws</groupId>
  134.                 <artifactId>jaxws-rt</artifactId>
  135.                 <version>${jaxws.version}</version>
  136.             </dependency>
  137.             <!-- WS-JavaExamples Util -->
  138.             <dependency>
  139.                 <groupId>es.udc.ws</groupId>
  140.                 <artifactId>ws-util</artifactId>
  141.                 <version>${ws-util.version}</version>
  142.             </dependency>
  143.             <!-- Commons HttpClient -->
  144.             <dependency>
  145.                 <groupId>org.apache.httpcomponents</groupId>
  146.                 <artifactId>fluent-hc</artifactId>
  147.                 <version>${httpclient.version}</version>
  148.             </dependency>
  149.             <!-- JDOM2 -->
  150.             <dependency>
  151.                 <groupId>org.jdom</groupId>
  152.                 <artifactId>jdom2</artifactId>
  153.                 <version>${jdom2.version}</version>
  154.             </dependency>
  155.             <!-- Project Model -->
  156.             <dependency>
  157.                 <groupId>es.udc.ws.app</groupId>
  158.                 <artifactId>ws-app-model</artifactId>
  159.                 <version>${project.version}</version>
  160.             </dependency>
  161.         </dependencies>
  162.     </dependencyManagement>
  163.  
  164.     <build>
  165.  
  166.         <!-- =============================================================== -->
  167.         <!-- Filtering -->
  168.         <resources>
  169.  
  170.             <!-- Apply filtering to files matching the following expressions
  171.                in src/main/resources. -->
  172.             <resource>
  173.                 <directory>src/main/resources</directory>
  174.                 <filtering>true</filtering>
  175.                 <includes>
  176.                     <!-- TODO: revisar -->
  177.                     <include>*.properties</include>
  178.                 </includes>
  179.             </resource>
  180.  
  181.             <!-- Continue considering resources the files in src/main/resources,
  182.                but without applying filtering. -->
  183.             <resource>
  184.                 <directory>src/main/resources</directory>
  185.             </resource>
  186.  
  187.             <!-- Filter Jetty configuration -->
  188.             <resource>
  189.                 <directory>../src/main/jetty</directory>
  190.                 <includes>
  191.                     <include>jetty-env.xml</include>
  192.                 </includes>
  193.                 <targetPath>../jetty</targetPath>
  194.                 <filtering>true</filtering>
  195.             </resource>
  196.         </resources>
  197.  
  198.         <testResources>
  199.  
  200.             <!-- Apply filtering to files matching the following expressions
  201.                in src/test/resources. -->
  202.             <testResource>
  203.                 <directory>src/test/resources</directory>
  204.                 <filtering>true</filtering>
  205.                 <includes>
  206.                     <!-- TODO: revisar -->
  207.                     <include>*.properties</include>
  208.                 </includes>
  209.             </testResource>
  210.  
  211.             <!-- Continue considering resources the files in src/test/resources,
  212.                but without applying filtering. -->
  213.             <testResource>
  214.                 <directory>src/test/resources</directory>
  215.             </testResource>
  216.  
  217.         </testResources>
  218.  
  219.  
  220.         <plugins>
  221.  
  222.             <!-- ========================================================== -->
  223.             <!-- Compiler configuration -->
  224.             <plugin>
  225.                 <groupId>org.apache.maven.plugins</groupId>
  226.                 <artifactId>maven-compiler-plugin</artifactId>
  227.                 <version>${mavenCompilerPlugin.version}</version>
  228.                 <configuration>
  229.                     <verbose>true</verbose>
  230.                     <source>1.8</source>
  231.                     <target>1.8</target>
  232.                     <encoding>${project.build.sourceEncoding}</encoding>
  233.                     <showDeprecation>true</showDeprecation>
  234.                     <showWarnings>true</showWarnings>
  235.                 </configuration>
  236.             </plugin>
  237.            
  238.             <!-- ========================================================== -->
  239.             <!-- Resources plugin -->
  240.             <plugin>
  241.                 <groupId>org.apache.maven.plugins</groupId>
  242.                 <artifactId>maven-resources-plugin</artifactId>
  243.                 <version>${mavenResourcesPlugin.version}</version>
  244.             </plugin>
  245.  
  246.             <!-- ========================================================== -->
  247.             <!-- Exec plugin -->
  248.             <plugin>
  249.                 <groupId>org.codehaus.mojo</groupId>
  250.                 <artifactId>exec-maven-plugin</artifactId>
  251.                 <version>${execMavenPlugin.version}</version>
  252.             </plugin>
  253.            
  254.             <!-- ========================================================== -->
  255.             <!-- Setting SQL Plugin -->
  256.             <!-- - Configuration specifies onError="continue" since SQL scripts
  257.                try to drop tables before creating them (which causes errors if such tables
  258.                do not exist yet). - Configuartion specifies autocommit="true" since some
  259.                drivers (e.g the PostgreSQL JDBC 2 driver) do not commit changes if some
  260.                error ocurrs. -->
  261.             <plugin>
  262.                 <groupId>org.codehaus.mojo</groupId>
  263.                 <artifactId>sql-maven-plugin</artifactId>
  264.                 <version>${sqlMavenPlugin.version}</version>
  265.                 <dependencies>
  266.                     <dependency>
  267.                         <groupId>${jdbcDriver.groupId}</groupId>
  268.                         <artifactId>${jdbcDriver.artifactId}</artifactId>
  269.                         <version>${jdbcDriver.version}</version>
  270.                     </dependency>
  271.                 </dependencies>
  272.                 <configuration>
  273.                     <driver>${jdbcDriver.className}</driver>
  274.                     <url>${dataSource.url}</url>
  275.                     <username>${dataSource.user}</username>
  276.                     <password>${dataSource.password}</password>
  277.                     <autocommit>true</autocommit>
  278.                     <onError>continue</onError>
  279.                     <fileset>
  280.                         <basedir>${basedir}</basedir>
  281.                         <includes>
  282.                             <include>
  283.                                 src/sql/${dataSource.createTablesScript}
  284.                             </include>
  285.                         </includes>
  286.                     </fileset>
  287.                 </configuration>
  288.                 <executions>
  289.                     <execution>
  290.                         <id>create-tables-for-testing</id>
  291.                         <phase>process-test-resources</phase>
  292.                         <goals>
  293.                             <goal>execute</goal>
  294.                         </goals>
  295.                         <configuration>
  296.                             <driver>${jdbcDriver.className}</driver>
  297.                             <url>${testDataSource.url}</url>
  298.                             <username>${testDataSource.user}</username>
  299.                             <password>${testDataSource.password}</password>
  300.                             <autocommit>true</autocommit>
  301.                             <onError>continue</onError>
  302.                             <fileset>
  303.                                 <basedir>${basedir}</basedir>
  304.                                 <includes>
  305.                                     <include>
  306.                                         src/sql/${dataSource.createTablesScript}
  307.                                     </include>
  308.                                 </includes>
  309.                             </fileset>
  310.                         </configuration>
  311.                     </execution>
  312.                 </executions>
  313.             </plugin>
  314.  
  315.             <!-- ========================================================== -->
  316.             <!-- Assembly configuration -->
  317.             <plugin>
  318.                 <groupId>org.apache.maven.plugins</groupId>
  319.                 <artifactId>maven-assembly-plugin</artifactId>
  320.                 <version>${mavenAssemblyPlugin.version}</version>
  321.                 <configuration>
  322.                     <descriptors>
  323.                         <descriptor>src/main/assembly/src.xml</descriptor>
  324.                     </descriptors>
  325.                 </configuration>
  326.             </plugin>
  327.  
  328.         </plugins>
  329.  
  330.         <!-- ========================================================== -->
  331.         <!-- Prevent m2eclipse plugin to mark projects as invalid -->
  332.  
  333.         <pluginManagement>
  334.             <plugins>
  335.                 <plugin>
  336.                     <groupId>org.eclipse.m2e</groupId>
  337.                     <artifactId>lifecycle-mapping</artifactId>
  338.                     <version>1.0.0</version>
  339.                     <configuration>
  340.                         <lifecycleMappingMetadata>
  341.                             <pluginExecutions>
  342.                                 <pluginExecution>
  343.                                     <pluginExecutionFilter>
  344.                                         <groupId>org.jvnet.jax-ws-commons</groupId>
  345.                                         <artifactId>jaxws-maven-plugin</artifactId>
  346.                                         <versionRange>[1.0.0,)</versionRange>
  347.                                         <goals>
  348.                                             <goal>wsgen</goal>
  349.                                             <goal>wsimport</goal>
  350.                                         </goals>
  351.                                     </pluginExecutionFilter>
  352.                                     <action>
  353.                                         <ignore />
  354.                                     </action>
  355.                                 </pluginExecution>
  356.                                 <pluginExecution>
  357.                                     <pluginExecutionFilter>
  358.                                         <groupId>org.codehaus.mojo</groupId>
  359.                                         <artifactId>sql-maven-plugin</artifactId>
  360.                                         <versionRange>[1.0.0,)</versionRange>
  361.                                         <goals>
  362.                                             <goal>execute</goal>
  363.                                         </goals>
  364.                                     </pluginExecutionFilter>
  365.                                     <action>
  366.                                         <ignore />
  367.                                     </action>
  368.                                 </pluginExecution>
  369.                             </pluginExecutions>
  370.                         </lifecycleMappingMetadata>
  371.                     </configuration>
  372.                 </plugin>
  373.             </plugins>
  374.         </pluginManagement>
  375.  
  376.     </build>
  377.  
  378. </project>
Advertisement
Add Comment
Please, Sign In to add comment