質問

How can I create ldap-authentation-${version}.jar file described here?

https://github.com/timander/fitnesse-ldap-authenticator

I am so lost.

I am trying to enable Active Directory authentication for Fitnesse test.

Any help is appreciated.

Thanks, Ali


Ok Tim I attempted it and now I am running in some issues. First build failure issue was solved after changing the version in pom.xml from 20100303 to 20131110. Now the second build is failing because of this:
"

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project fitnesse-ldap-authenticator: Compilation failure: Compilation failure:
[ERROR] c:\Users\araza\Documents\GitHub\fitnesse-ldap-authenticator\src\main\java\fitnesse\authentication\LDAPAuthenticator.java:[26,16] error: isAuthenticated(String,String) in LDAPAuthenticator cannot override isAuthenticated(String,String) in Authenticator
[ERROR] 
[ERROR] could not parse error message:   overridden method does not throw Exception
[ERROR] c:\Users\araza\Documents\GitHub\fitnesse-ldap-authenticator\src\main\java\fitnesse\authentication\LDAPAuthenticator.java:3: warning: LdapCtxFactory is internal proprietary API and may be removed in a future release
[ERROR] import javax.naming.AuthenticationException;
[ERROR] ^
[ERROR] 
[ERROR] c:\Users\araza\Documents\GitHub\fitnesse-ldap-authenticator\src\main\java\fitnesse\authentication\LdapContextFactory.java:[12,26] LdapCtxFactory is internal proprietary API and may be removed in a future release"

Ok, I made some progress and this is what I am getting now:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project fitnesse-ldap-authenticator: Compilation failure
[ERROR] /c:/Users/araza/Documents/GitHub/fitnesse-ldap-authenticator/src/main/java/fitnesse/authentication/LDAPAuthenticator.java:[26,24] isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.LDAPAuthenticator cannot override isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.Authenticator
[ERROR] overridden method does not throw java.lang.Exception
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project fitnesse-ldap-authenticator: Compilation failure


c:/Users/araza/Documents/GitHub/fitnesse-ldap-authenticator/src/main/java/fitnesse/authentication/LDAPAuthenticator.java:[26,24] isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.LDAPAuthenticator cannot override isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.Authenticator
  overridden method does not throw java.lang.Exception

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure

-

 c:/Users/araza/Documents/GitHub/fitnesse-ldap-authenticator/src/main/java/fitnesse/authentication/LDAPAuthenticator.java:[26,24] isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.LDAPAuthenticator cannot override isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.Authenticator
  overridden method does not throw java.lang.Exception

    at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
    at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
役に立ちましたか?

解決

I assumed knowledge of Git and Maven when I created the FitNesse LDAP Authenticator. To build a jar file:

  1. Use Git to check out the code
  2. Run Maven to create a jar file (mvn package)
  3. The jar will be in the target directory where you checked out the code
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top