maven 打包问题

不正常的物种 发布于 2013/05/17 16:29
阅读 5K+
收藏 0

打包的时候提示包找不到

<project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>storm</groupId>
	<artifactId>storm-cassandra</artifactId>
	<version>1.0</version>
	<dependencies>	
		<dependency>
			<groupId>cassandra-jdbc-.1.1.1</groupId>
			<artifactId>cassandra-jdbc</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>storm</groupId>
			<artifactId>storm</artifactId>
			<version>0.8.2</version>
		</dependency>
		<dependency>
			<groupId>libthrift7-0.7.0</groupId>
			<artifactId>libthrift7</artifactId>
			<version>0.7.0</version>
		</dependency>
	</dependencies>
	<build>
		<sourceDirectory>src</sourceDirectory>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<!-- 把依赖的jar包拷到lib目录下 -->
			<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>
						
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
这是pom.xml文件

谢谢各位了

<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>storm-cassandra</groupId>
	<artifactId>storm-cassandra</artifactId>
	<version>1.0</version>
	<dependencys>
		<dependency>
			<groupId>storm</groupId>
			<artifactId>storm</artifactId>
			<version>0.8.2</version>
		</dependency>
		<dependency>
			<groupId>caaaandra-jdbc</groupId>
			<artifactId>caaaandra-jdbc1</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>libthrift7</groupId>
			<artifactId>libthrift71</artifactId>
			<version>0.7.0</version>
		</dependency>
	</dependencys>
	<build>
		<plugins>
			<!-- bind the maven-assembly-plugin to the package phase this will create 
				a jar file without the storm dependencies suitable for deployment to a cluster. -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
					<archive>
						<manifest>
							<mainClass>com.iimedia.storm.db.Test</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.5.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

		</plugins>

	</build>
</project>
这是修改的

这个是.m2本地库

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   The project  (E:\iimedia\storm-cassandra\pom.xml) has 1 error
[ERROR]     Non-parseable POM E:\iimedia\storm-cassandra\pom.xml: Duplicated tag: 'artifactId' (position: START_TAG seen ...</groupId>\r\n\t\t\t<artifactId>... @10:16) -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
现在的错误是这个了

加载中
0
心扬
我严重怀疑groupId写的不正确
0
lateron
lateron
cassandra-jdbc-.1.1.1  这写的对?
0
心扬
哪个包找不到,能贴一下错误信息吗
0
不正常的物种
不正常的物种

引用来自“夕水溪下”的答案

cassandra-jdbc-.1.1.1  这写的对?
刚改了也不行
0
不正常的物种
不正常的物种

引用来自“心扬”的答案

哪个包找不到,能贴一下错误信息吗
storm-0.8.2这个包,但是这个包在工程里面哦
lateron
lateron
这jar是干啥用的
0
不正常的物种
不正常的物种

引用来自“清风居士”的答案

引用来自“心扬”的答案

哪个包找不到,能贴一下错误信息吗
storm-0.8.2这个包,但是这个包在工程里面哦
是那个twitter 分布式实时分析用的包
0
不正常的物种
不正常的物种

引用来自“心扬”的答案

我严重怀疑groupId写的不正确
我又上传了一次,id应该没错的
0
MasterHu
MasterHu
我也想知道这个错误是真么解决的,因为我也遇到了。
返回顶部
顶部