`
这些年
  • 浏览: 399802 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

maven 实战(还没有看)

 
阅读更多

问题:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart

1.从http://maven.oschina.net/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/ 下载最新版maven-archetype-quickstart-1.1.jar
2.命令行到下载目录下执行mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=maven-archetype-quickstart-1.1.jar

 

我现在用的maven配置:

<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>chinacache-billing</groupId>
	<artifactId>TotalBandwidthDataImporter</artifactId>
	<version>1.0.0</version>
	<packaging>jar</packaging>

	<name>TotalBandwidthDataImporter</name>
	<url>http://maven.apache.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<spring.maven.artifact.version>3.0.2.RELEASE</spring.maven.artifact.version>
	</properties>

	<build>
		<finalName>TotalBandwidthDataImporter</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.0</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>*.sh</exclude>
						<exclude>*.properties</exclude>
					</excludes>

					<archive>
						<manifest>
							<mainClass>com.chinacache.billing.totalbandwidthdataimporter.main.Main</mainClass>
							<addClasspath>true</addClasspath>
							<classpathPrefix>lib/</classpathPrefix>
						</manifest>
						<manifestEntries>
							<Class-Path>.</Class-Path>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>src/assemble/distribution.xml</descriptor>
					</descriptors>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.5</version>
				<executions>
					<execution>
						<id>copy-log4j</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/conf</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/resources/conf/online</directory>
									<includes>
										<include>jdbc.properties</include>
										<include>system.properties</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-resources</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/resources</directory>
									<includes>
										<include>log4j.properties</include>
										<include>jdbc.properties</include>
										<include>system.properties</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-asm</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-expression</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.maven.artifact.version}</version>
		</dependency>
		<!-- logs -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-nop</artifactId>
			<version>1.6.1</version>
		</dependency>

		<!-- commons -->
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.5</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.4</version>
		</dependency>
		<dependency>
			<groupId>commons-digester</groupId>
			<artifactId>commons-digester</artifactId>
			<version>2.0</version>
		</dependency>
		<dependency>
			<groupId>commons-configuration</groupId>
			<artifactId>commons-configuration</artifactId>
			<version>1.6</version>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2.1</version>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.8.3</version>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.2.2</version>
		</dependency>

		<!-- utils -->
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<version>1.8.4</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-core-asl</artifactId>
			<version>1.9.12</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-mapper-asl</artifactId>
			<version>1.9.12</version>
		</dependency>
		<dependency>
			<groupId>freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>2.3.9</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
		</dependency>

		<!-- db -->
		<dependency>
			<groupId>ojdbc</groupId>
			<artifactId>ojdbc</artifactId>
			<version>14</version>
		</dependency>

		<dependency>
			<groupId>aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.5.3</version>
		</dependency>

		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>2.2.2</version>
		</dependency>

	</dependencies>
</project>

 程序目录如一图


 

  • 大小: 31.9 KB
分享到:
评论

相关推荐

    Maven 实战(中文pdf)

    《Maven实战》不仅覆盖了Maven的基础知识,还深入到高级特性和最佳实践,如使用 profiles 进行条件构建,或者处理复杂的多模块项目。对于初学者,书中提供的实例和实战经验可以帮助快速上手;对于经验丰富的开发者,...

    Maven 实战(361)_12804356.pdf

    Maven 实战(361)_12804356.pdf

    maven 实战 所有源代码

    ** Maven实战:所有源代码详解 ** Maven是一款强大的项目管理和构建工具,广泛应用于Java开发领域。它通过一套约定优于配置的原则,简化了项目的构建、依赖管理以及文档生成等工作。本篇文章将深入探讨"Maven实战...

    Maven实战 Maven实战Maven实战

    ### Maven实战:Maven的安装、配置及使用入门 #### Maven概述 Maven是一款流行的Java项目管理和理解工具,由Sonatype公司支持,并广泛应用于Java项目的构建、依赖管理和文档生成等领域。Maven通过一种约定优于配置...

    Maven实战.pdf

    Maven实战 好书 学习参考.pdf

    Maven 实战.pdf-完整版

    Maven不仅可以管理项目的构建、报告、文档生成,还可以管理依赖、源码、文档、测试、打包、分发等,并提供了对应的插件机制,以支持更广泛的构建任务。 Maven的实战性强,意味着在学习和使用过程中,通常会结合大量...

    Maven实战 完整高清版

    非常好的一本maven书 Maven实战 完整高清版

    Maven 实战(书签版),十分清晰强烈推荐

    Maven 实战(书签版) 影印版,影印规整,十分清晰,强烈推荐!

    Maven实战pdf+源码

    Maven实战为许晓斌著。资源里面包括Maven实战pdf、程序所带源码。在eclipse开发时,需要下载m2e,下载地址http://download.eclipse.org/technology/m2e/releases/。eclipse 4.5 以上版本带的有Maven 插件,在下载m2e...

    《Maven实战》

    《Maven实战》 许晓斌

    Maven 实战源码

    《Maven实战源码》是一本专为Java开发者设计的指南,旨在帮助初学者和有经验的开发者深入理解和掌握Maven这一强大的项目管理和构建工具。Maven不仅简化了项目的构建过程,还通过依赖管理和插件机制,使得软件开发...

    《Maven实战》完整高清版.pdf

    《Maven实战》徐晓斌 完整高清版.pdf

    Maven实战完整高清版

    项目管理,maven实战教程,提高对项目的管理和配置,改进项目效率

    《Maven实战》源代码

    《Maven实战》一书是Java开发者深入了解和掌握Maven构建工具的重要参考资料。该书的源代码涵盖了多个章节,包括ch-17、ch-3、ch-7、ch-8、ch-5、ch-10、ch-18和ch-12等,这些章节的内容广泛且深入,涉及了Maven的...

    Maven实战].许晓斌.高清PDF扫描版.

    Maven实战].许晓斌.高清PDF扫描版.

    Maven实战(高清完整带书签).pdf

    Maven实战(高清完整带书签).pdf

    Maven实战》完整高清版.pdf

    Maven实战》完整高清版.pdf

Global site tag (gtag.js) - Google Analytics