ianlee-dev / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

pom.xml seems to lack Apache Commons Lang #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Get source from 
http://facebook-java-api.googlecode.com/svn/tags/release-2.1.0/facebook-java-api

2. Write code to get a Facebook user's friends list:

            FacebookJaxbRestClient client = new
FacebookJaxbRestClient(FacebookVariables.URL_FB,
                    siteUserSession.getSiteApplication().getUniqueKey(),
                    siteUserSession.getSiteApplication().getSecret(),
                    siteUserSession.getSiteAppUser().getSessionKey());
            client.friends_get();
            FriendsGetResponse friendsResponse = (FriendsGetResponse)
client.getResponsePOJO();

RESULT:

java.lang.ClassNotFoundException:
org.apache.commons.lang.builder.ToStringBuilder

EXPECT:

No exception thrown.

FIX:

I believe FacebookJaxbRestClient depends on Commons Lang,
and that doesn't seem to be included in the pom.xml.

By adding a reference to commons-lang version 2.4 in
the pom.xml, the correct jar is pulled down to my local
Maven repository, and the code works.

If this can be confirmed, could you please add this dependency
to pom.xml?  That way I can cleanly pull down the pom.xml
from the repository, rather than insert my own hack.

What version of the product are you using? On what operating system?

Facebook-java-api v. 2.1
Windows XP
Java 1.6

Please provide any additional information below.

Original issue reported on code.google.com by atomicm...@gmail.com on 31 Mar 2009 at 11:15

GoogleCodeExporter commented 8 years ago
The dependency:tree plugin goal shows that the commons-lang is pulled in as a
transitive dependency of jaxb2_commons

Here it is running on my PC:

[INFO] ------------------------------------------------------------------------
[INFO] Building Facebook Java Library - Parent Pom
[INFO] 
[INFO] Id: com.google.code.facebookapi:parent-pom:pom:2.1.1-SNAPSHOT
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree]
[INFO] com.google.code.facebookapi:parent-pom:pom:2.1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Building Facebook Java Library
[INFO] 
[INFO] Id: 
com.google.code.facebookapi:facebook-java-api-schema:jar:2.1.1-SNAPSHOT
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] Attempting to resolve a version for plugin:
org.apache.maven.plugins:maven-eclipse-plugin using meta-version: LATEST
[INFO] Using version: 2.6 of plugin: 
org.apache.maven.plugins:maven-eclipse-plugin
[INFO] [dependency:tree]
[INFO] com.google.code.facebookapi:facebook-java-api-schema:jar:2.1.1-SNAPSHOT
[INFO] \- org.jvnet.jaxb2_commons:runtime:jar:0.4.1.3:compile
[INFO]    +- com.sun.xml.bind:jaxb-impl:jar:2.1.9:compile
[INFO]    |  \- javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]    |     +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]    |     \- javax.activation:activation:jar:1.1:compile
[INFO]    \- commons-lang:commons-lang:jar:2.2:compile
[INFO] ------------------------------------------------------------------------
[INFO] Building Facebook Java Library
[INFO] 
[INFO] Id: com.google.code.facebookapi:facebook-java-api:jar:2.1.1-SNAPSHOT
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] Attempting to resolve a version for plugin:
org.apache.maven.plugins:maven-eclipse-plugin using meta-version: LATEST
[INFO] Using version: 2.6 of plugin: 
org.apache.maven.plugins:maven-eclipse-plugin
[INFO] [dependency:tree]
[INFO] com.google.code.facebookapi:facebook-java-api:jar:2.1.1-SNAPSHOT
[INFO] +- 
com.google.code.facebookapi:facebook-java-api-schema:jar:2.1.1-SNAPSHOT:compile
[INFO] |  \- org.jvnet.jaxb2_commons:runtime:jar:0.4.1.3:compile
[INFO] |     +- com.sun.xml.bind:jaxb-impl:jar:2.1.9:compile
[INFO] |     |  \- javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO] |     |     +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |     |     \- javax.activation:activation:jar:1.1:compile
[INFO] |     \- commons-lang:commons-lang:jar:2.2:compile
[INFO] +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.json:json:jar:20070829:compile
[INFO] +- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- junit:junit:jar:4.5:test
[INFO] +- org.ostermiller:utils:jar:1.07.00:test
[INFO] \- commons-httpclient:commons-httpclient:jar:3.1:test
[INFO]    \- commons-codec:commons-codec:jar:1.2:test

Original comment by david.j....@googlemail.com on 3 Apr 2009 at 3:18

GoogleCodeExporter commented 8 years ago

Original comment by david.j....@googlemail.com on 6 Apr 2009 at 11:12

GoogleCodeExporter commented 8 years ago
This is completely broken in the current release.

Repro steps:
1. svn co
http://facebook-java-api.googlecode.com/svn/tags/release-2.1.1/facebook-java-api
2. cd facebook-java-api
3. mvn clean install

here's the output from maven:

INFO] Scanning for projects...
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Facebook Java Library
[INFO]    task-segment: [clean, install]
[INFO] 
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://repo1.maven.org/maven2/org/jvnet/jaxb2_commons/runtime/0.4.1.3/runtime-0.
4.1.3.pom
[INFO] [compiler:compile]
[INFO] Compiling 44 source files to 
/Users/tom/tmp/facebook-java-api/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

/Users/tom/tmp/facebook-java-api/src/main/java/com/google/code/facebookapi/Exten
sibleClient.java:[37,30]
package org.apache.commons.lang does not exist

/Users/tom/tmp/facebook-java-api/src/main/java/com/google/code/facebookapi/Exten
sibleClient.java:[2728,7]
cannot find symbol
symbol  : variable StringUtils
location: class com.google.code.facebookapi.ExtensibleClient<T>

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Mon May 04 13:54:09 PDT 2009
[INFO] Final Memory: 21M/59M
[INFO] ------------------------------------------------------------------------

Original comment by mccann....@gmail.com on 4 May 2009 at 8:55