Doesn't compile with Maven3
diwakergupta opened this issue · 1 comments
diwakergupta commented
I cloned the git repo and ran 'mvn compile' (using Maven 3.0.3). First, I get these warnings:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for se.cgbystrom.netty:netty-tools:jar:1.2.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 52, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 60, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
Then I get this error -- presumably maven3 doesn't like the way the embedded-repo has been specified:
[ERROR] Failed to execute goal on project netty-tools: Could not resolve dependencies for project se.cgbystrom.netty:netty-tools:jar:1.2.7-SNAPSHOT: Failure to find org.apache.thrift:thrift:jar:2009-08-26 in ...
The following patch fixes the issues (note that Thrift 0.6.1 onwards is available in Maven central):
--- pom.xml
+++ pom.xml
@@ -29,8 +29,8 @@
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
- <artifactId>thrift</artifactId>
- <version>2009-08-26</version>
+ <artifactId>libthrift</artifactId>
+ <version>0.6.1</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -52,6 +52,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
@@ -59,6 +60,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
+ <version>2.1.1</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -79,15 +81,5 @@
<enabled>false</enabled>
</snapshots>
</repository>
- <repository>
- <id>embedded-repo</id>
- <url>file://${basedir}/embedded-repo</url>
- </repository>
- <repository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>http://download.java.net/maven/2/</url>
- <layout>default</layout>
- </repository>
</repositories>
</project>
cgbystrom commented
Thanks for reporting.
ntolia also had similar problems and sent pull request that I merged. Should be working now.
Also switched to the public libthrift (which wasn't available when I wrote the initial version).