`

maven install复制非class文件pom配置

    博客分类:
  • JAVA
阅读更多
<build>
		<!-- 资源 -->
		<resources>
			<resource>
				<directory>src/main/resources/META-INF</directory>
				<filtering>true</filtering>
				<targetPath>META-INF</targetPath>
			</resource>
			<!-- 复制非class文件 -->
			<resource>
				<directory>src/main/java/com/proxy/bean</directory>
				<filtering>true</filtering>
				<includes>
					<include>*.betwixt</include>
				</includes>
				<targetPath>${project.build.directory}/classes/com/proxy/bean</targetPath>
			</resource>
		</resources>


注:如果不排除或包含设置会把java文件一起copy过去的,所以需要配置相应的后缀名。

// maven web工程,目录结构是一个标准的maven结构,如下:

D:. 
└─mywebapp 
    │  pom.xml 
    │ 
    └─src 
        └─main 
            ├─resources 
            └─webapp 
                │  index.jsp 
                │ 
                └─WEB-INF 
                    web.xml
分享到:
评论
1 楼 hw1287789687 2013-08-19  
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kunlunsoft</groupId>
<artifactId>password_mgmt016_paging</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.kunlunsoft</groupId>
<artifactId>io0007-find_progess</artifactId>
<version>0.0.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.5</version>
<classifier>bin</classifier>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>tdr_mbs_release</id>
<name>tdr_mbs_release</name>
<url>http://localhost:8081/nexus/content/repositories/release/</url>
</repository>
<snapshotRepository>
<id>tdr_mbs_snapshot</id>
<name>tdr_mbs_snapshot</name>
<url>http://localhost:8081/nexus/content/repositories/snapshot/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.pass.main.PassMgmtApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java/com/pass/img</directory>
<targetPath>com/pass/img</targetPath>
</resource>
</resources>
</build>
</project>

相关推荐

    maven的优缺点 项目

    Pom:文件夹,jar和war文件,mavenProject:一个项目,可以放jar和war包,通过pom,一般新创建的maven Project是POM 3.4.创建一个Maven Model 最外面的项目是MavenProject,其它的全部是Maven Model 3.4.1.创建JAR 目录...

    Maven权威指南 很精典的学习教程,比ANT更好用

    Maven权威指南 Authors Tim O'Brien (Sonatype, Inc.) , John Casey (Sonatype, Inc.) , Brian Fox (Sonatype, Inc.) , Bruce Snyder () , Jason Van Zyl (Sonatype, Inc.) , Juven Xu () Abstract Maven权威指南...

    maven-plugin-jarc:用于编译 Jarc 文件的 Maven 插件

    描述用于将 Jarc 源代码(.arc 文件)编译为 Java .class 文件的 Maven 插件。安装 mvn installmvn packagecp target/maven-plugin-jarc-1.0.1.jar .../repo/jarc/Jarc/maven-plugin-jarc/1.0.1/maven-plugin-jarc-...

    第一个spring IOC例子(maven)

    注: applicationContext.xml 配置bean信息所依赖的class路径要一致且大小写敏感,否则运行时会出现java.lang.NoClassDefFoundError (wrong name)。 https://blog.csdn.net/my_bkn/article/details/6875481

    Maven项目的构建与管理

    mvncompile编译,将java源文件编译成.class文件;mvntest测试,生成测试报告,运行test目录下的所有单元测试;mvnpackage打包,将项目打成jar、war或者pom;mvninstall安装,将当前项目安装到本地maven库,供其他...

    SpringOpenAPiClientDemo

    要将其部署到远程Maven存储库,请配置存储库的设置并执行: mvn clean deploy 有关更多信息,请参阅《 。 Maven用户 将此依赖项添加到项目的POM中: &lt; groupId&gt;org.openapitools &lt; artifactId&gt;openapi-java-...

    TheWizard:基于Java的游戏,与团队合作超过2周,由上而下的射手,用户扮演一个精明的法师,穿越一个方块世界,不断尝试摧毁扭曲的蘑菇王的邪恶奴才。

    CISC191-SUM20-A 巫师 A组自上而下的射手 ... 在安装了pom.xml中包含的pom.xml和Maven的情况下,运行以下命令编译并安装所有依赖项 mvn install 然后执行.jar文件以运行项目 java -jar target/WizardGame-0.0

    drools-distribution-7.10.0.Final

    打开菜单文件,菜单项导入,树项Maven,树项已有Maven项目,下一步按钮 然后从zip文件中选择“examples/sources/”,按钮Finish。 打开菜单运行,菜单项运行配置,添加新的Java应用程序 主类“org.drools.example . ...

    黑白棋java源码-othello:奥赛罗

    黑白棋java源码黑白棋 ...install构建项目 通过运行jar-filen java -jar target/othello-1.0-SNAPSHOT.jar或使用 Maven 启动应用程序: mvn exec:java -Dexec.mainClass=main.Othello 智能创意 查看代码: git clone ...

    91tdd:91个TDD类的作业

    安装maven &gt;= 3.2,mac可直接brew install maven 执行 open terminal run "mvn clean install" coverage report would be in target/site/jacoco-ut/index.html 说明 主要测试程式为 production程式为

    javacv-platform-1.3.3-src

    Maven (inside the pom.xml file) &lt;groupId&gt;org.bytedeco &lt;artifactId&gt;javacv-platform &lt;version&gt;1.3.3 Gradle (inside the build.gradle file) dependencies { compile group: 'org.bytedeco', name: '...

    锻炼奖励

    在终端中打开根文件夹,您将在其中看到pom.xml和src文件夹,并执行以下命令: mvn compile mvn clean install mvn exec:java -Dexec.mainClass=com.shubham.FetchRewardsExerciseApplication 使用Eclipse或...

    MCloud - OAuth2 认证中心

    修改相关配置之后,请在项目根目录下执行maven命令: ``` mvn flyway:clean flyway:migrate ``` 修改项目的数据库配置: **application.yml** ```yaml spring: datasource: url: jdbc:mysql://localhost/数据库...

    一个支持annotation的SSH整合示例项目

    │ pom.xml │ pom.xml~ │ text.txt │ ├─.settings │ org.maven.ide.eclipse.prefs │ ├─common │ │ .classpath │ │ .project │ │ pom.xml │ │ │ ├─.settings │ │ org.eclipse.jdt.core....

Global site tag (gtag.js) - Google Analytics