2 Replies Latest reply on Dec 6, 2010 9:29 AM by Richard Barabe

    Seam-security doesn't build

    Richard Barabe Newbie
      hello guys, hope someone will help me with this one.

      I cloned seam-security some time ago from github and didn't manage to build it.  Today, learning about the Alpha1 release, I updated and gave it another try.

      More precisely, the Seam Security Implementation module doesn't compile :

      [ERROR] /home/baraber/projects/seam/security/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentitySessionProducer.java:[95,16] cannot find symbol
      symbol  : method setDefaultAttributeStoreId(java.lang.String)
      location: class org.picketlink.idm.impl.configuration.metadata.IdentityRepositoryConfigurationMetaDataImpl

      [ERROR] /home/baraber/projects/seam/security/impl/src/main/java/org/jboss/seam/security/management/picketlink/IdentitySessionProducer.java:[127,39] createIdentitySession(java.lang.String) in org.picketlink.idm.api.IdentitySessionFactory cannot be applied to (java.lang.String,java.util.Map<java.lang.String,java.lang.Object>)

      [INFO] 2 errors
      [INFO] -------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] Seam Security Parent .............................. SUCCESS [2.289s]
      [INFO] Seam Security API ................................. SUCCESS [3.034s]
      [INFO] Seam Security Implementation ...................... FAILURE [3.242s]

      Searching for explanation, I found that for the picketlink dependency in the pom, no version is specified.  I therefore ran an mvn dependency:tree in the impl module and here is the results :

      [INFO] org.jboss.seam.security:seam-security-impl:jar:3.0.0-SNAPSHOT
      [INFO] +- javax.el:el-api:jar:2.2:provided
      [INFO] +- javax.validation:validation-api:jar:1.0.0.GA:provided
      [INFO] +- javax.enterprise:cdi-api:jar:1.0-SP2:provided
      [INFO] |  +- javax.annotation:jsr250-api:jar:1.0:provided
      [INFO] |  \- javax.inject:javax.inject:jar:1:provided
      [INFO] +- org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec:jar:1.0.0.Beta1:provided
      [INFO] +- org.jboss.weld:weld-extensions:jar:1.0.0.Beta1:compile
      [INFO] +- org.slf4j:slf4j-api:jar:1.5.10:provided
      [INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:provided
      [INFO] +- org.drools:drools-core:jar:5.1.1:compile
      [INFO] |  +- org.mvel:mvel2:jar:2.0.16:compile
      [INFO] |  \- org.drools:drools-api:jar:5.1.0.M2:compile (version managed from 5.1.1)
      [INFO] +- org.drools:drools-compiler:jar:5.1.1:compile
      [INFO] |  +- org.antlr:antlr-runtime:jar:3.1.3:compile
      [INFO] |  \- org.eclipse.jdt.core.compiler:ecj:jar:3.5.1:compile
      [INFO] +- org.jboss.seam.security:seam-security-api:jar:3.0.0-SNAPSHOT:compile
      [INFO] |  \- org.picketlink.idm:picketlink-idm-api:jar:1.1.5.CR01:compile
      [INFO] +- org.jboss.seam.persistence:seam-persistence-api:jar:3.0.0.Beta1:compile
      [INFO] +- org.picketlink.idm:picketlink-idm-core:jar:1.1.5.CR01:compile
      [INFO] |  +- org.picketlink.idm:picketlink-idm-common:jar:1.1.5.CR01:compile
      [INFO] |  \- org.picketlink.idm:picketlink-idm-spi:jar:1.1.5.CR01:compile
      [INFO] +- org.hibernate:hibernate-core:jar:3.5.1-Final:provided
      [INFO] |  +- antlr:antlr:jar:2.7.6:provided
      [INFO] |  +- commons-collections:commons-collections:jar:3.1:provided
      [INFO] |  +- dom4j:dom4j:jar:1.6.1:provided
      [INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:provided
      [INFO] |  \- javax.transaction:jta:jar:1.1:provided
      [INFO] +- org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.0.Beta2:provided
      [INFO] \- javax.faces:jsf-api:jar:2.0.2-FCS:provided


      I did not find where it is said to use version 1.1.5.CR01.  It seems not to be in impl pom, nor in the parent pom and more recent versions are available in the repository... :(

      I tried to modify the security-api pom and security-impl pom to specify version 1.1.7.GA of picketlink, but that alone didn't work : same compilation error, and the dependency tree was :

      [INFO] org.jboss.seam.security:seam-security-impl:jar:3.0.0-SNAPSHOT
      [INFO] +- javax.el:el-api:jar:2.2:provided
      [INFO] +- javax.validation:validation-api:jar:1.0.0.GA:provided
      [INFO] +- javax.enterprise:cdi-api:jar:1.0-SP2:provided
      [INFO] |  +- javax.annotation:jsr250-api:jar:1.0:provided
      [INFO] |  \- javax.inject:javax.inject:jar:1:provided
      [INFO] +- org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec:jar:1.0.0.Beta1:provided
      [INFO] +- org.jboss.weld:weld-extensions:jar:1.0.0.Beta1:compile
      [INFO] +- org.slf4j:slf4j-api:jar:1.5.10:provided
      [INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:provided
      [INFO] +- org.drools:drools-core:jar:5.1.1:compile
      [INFO] |  +- org.mvel:mvel2:jar:2.0.16:compile
      [INFO] |  \- org.drools:drools-api:jar:5.1.0.M2:compile (version managed from 5.1.1)
      [INFO] +- org.drools:drools-compiler:jar:5.1.1:compile
      [INFO] |  +- org.antlr:antlr-runtime:jar:3.1.3:compile
      [INFO] |  \- org.eclipse.jdt.core.compiler:ecj:jar:3.5.1:compile
      [INFO] +- org.jboss.seam.security:seam-security-api:jar:3.0.0-SNAPSHOT:compile
      [INFO] |  \- org.picketlink.idm:picketlink-idm-api:jar:1.1.5.CR01:compile (version managed from 1.1.7.GA)
      [INFO] +- org.jboss.seam.persistence:seam-persistence-api:jar:3.0.0.Beta1:compile
      [INFO] +- org.picketlink.idm:picketlink-idm-core:jar:1.1.7.GA:compile
      [INFO] |  +- org.picketlink.idm:picketlink-idm-common:jar:1.1.7.GA:compile
      [INFO] |  \- org.picketlink.idm:picketlink-idm-spi:jar:1.1.7.GA:compile
      [INFO] +- org.hibernate:hibernate-core:jar:3.5.1-Final:provided
      [INFO] |  +- antlr:antlr:jar:2.7.6:provided
      [INFO] |  +- commons-collections:commons-collections:jar:3.1:provided
      [INFO] |  +- dom4j:dom4j:jar:1.6.1:provided
      [INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:provided
      [INFO] |  \- javax.transaction:jta:jar:1.1:provided
      [INFO] +- org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.0.Beta2:provided
      [INFO] \- javax.faces:jsf-api:jar:2.0.2-FCS:provided

      I don't quite understand the line saying : "[INFO] |  \- org.picketlink.idm:picketlink-idm-api:jar:1.1.5.CR01:compile (version managed from 1.1.7.GA)"  Where 1.1.5.CR01 come from ?

      I then realised that I can build the project if I force picketlink version to be 1.5.0.Alpha02, BUT just if I also add dependency to picketlink-idm-api in security-impl pom.xml :
      <dependency>
        <groupId>org.picketlink.idm</groupId>
        <artifactId>picketlink-idm-api</artifactId>
        <version>1.5.0.Alpha02</version>        
        <exclusions>
           <exclusion>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
           </exclusion>
        </exclusions>
      </dependency>

      So my question is : Wich version of picketlink should be used with seam-security ?  Should the version be managed in seam-security poms or is it in a parent pom (I didn't find it yet) ?  How did you manage to make a release ?  I'm missing something :$

      Thanks in advance :)