2013-11-21 52 views
0

如何創建此處描述的ldap-authentation - $ {version} .jar文件?Fitnesse的AD認證java類

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

我這樣失去了。

我正在嘗試爲Fitnesse測試啓用Active Directory身份驗證。

任何幫助表示讚賞。

感謝, 阿里


好添我試圖它,現在我在一些問題上運行。首先構建失敗的問題正在發生變化,從20100303在pom.xml中的版本20131110.現在第二個版本是因爲這個失敗後問題:

[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" 

好吧,我取得了一些進展,這就是我現在越來越:

[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 

回答

1

當我創建FitNesse LDAP身份驗證器時,我假設了Git和Maven的知識。要構建一個jar文件:

  1. 使用git檢查出the code
  2. 運行Maven創建一個jar文件(MVN包)
  3. 的罐子會在目標目錄中籤出的代碼