某个项目中maven的发布配置

这个配置文件是做某个国外的汽车网站的配置文件, 其中在build模块中, 用了些插件,是发布更加便利。

通过注释进行了简单介绍。

    <build>
        <finalName>dealerportal</finalName>
		
		 <!-- 
                                 设置过滤文件的位置,过滤文件主要的作用是用来把过滤文件中的属性值替换被过滤文件的相同的值,
		 好处是可以在项目发布的时候灵活地配置程序 -->
        <filters>
            <filter>src/main/filters/filter.properties</filter>
        </filters>

		<!-- 
                                                resources :
			表示发布时要打包的资源文件,需要指明,这样才会打到包中去.
		 -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>application.properties</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>

		<!-- 
		
			Maven 插件,用来更具domain对象生成ddl
		 -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.1</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>2.0-alpha-2</version>
                <configuration>
                    <components>
                        <component>
                            <name>hbm2ddl</name>
                            <!-- 数据库ddl生成后的目录 -->
                            <outputDirectory>target/sql</outputDirectory>
                        </component>
                    </components>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>hbm2ddl</goal>
                        </goals>
                        <configuration>
                            <componentProperties>
                            	<!-- 这里根据hibernate.properties 及 hibernate.cfg.xml 
                            		来找具体的domain对象, 以及生成ddl时的数据库dialect
                            	 -->
                                <propertyfile>src/main/resources/hibernate.properties</propertyfile>
                                <configurationfile>src/main/resources/hibernate.cfg.xml</configurationfile>
                                <drop>false</drop>
                                <create>false</create>
                                <update>false</update>
                                <export>false</export>
                                <!-- 生成后的ddl文件名 -->
                                <outputfilename>schema.sql</outputfilename>
                                <format>true</format>
                            </componentProperties>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.2</version>
            </plugin>
            
            <!-- 使用 TestNG 进行测试的插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.4-SNAPSHOT</version>
                <configuration>
                    <suiteXmlFiles>
                    	<!--  指明了tesgng.xml的位置 -->
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.0-beta-2</version>
                <configuration>
                    <verbose>true</verbose>
                    <complianceLevel>1.5</complianceLevel>
                    <source>1.5</source>
                    <showWeaveInfo>true</showWeaveInfo>
                    <outxml>true</outxml>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>org.springframework</groupId>
                            <artifactId>spring-aspects</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!-- Axistools maven plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>axistools-maven-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <sourceDirectory>src/main/wsdl</sourceDirectory>
                    <packageSpace>com.trilogy.dealerportal.ws</packageSpace>
                    <testCases>false</testCases>
                    <serverSide>false</serverSide>
                    <subPackageByFileName>true</subPackageByFileName>
                    <outputDirectory>target/generated-sources</outputDirectory>
                    <timestampDirectory>target/wsdl</timestampDirectory>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值