Fuchs/confluence-remote-user-sso

cannot find symbol

Closed this issue · 7 comments

Hello.
Trying to compile this plugin using command:

/root/confluence-5.6.6-source/maven3/apache-maven-3.0.5/bin/mvn package -gs /root/confluence-5.6.6-source/settings.xml

but I'm getting the following error:

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for ch.fuchsnet.confluence:russo-confluence:jar:1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 32, 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.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building russo-confluence 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.atlassian.filestore:dt-filestore-httpclient:jar:0.3.0 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ russo-confluence ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ russo-confluence ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/sso/confluence-remote-user-sso-master/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/BielBienneConfluenceAuthenticator.java:[3,25] error: package javax.servlet.http does not exist
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[4,25] error: package javax.servlet.http does not exist
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[57,26] error: cannot find symbol
[ERROR]  class ConfluenceAuthenticator
/root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[57,54] error: cannot find symbol
[ERROR]  class ConfluenceAuthenticator
/root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[93,26] error: cannot access HttpServletRequest
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.178s
[INFO] Finished at: Tue Sep 29 03:02:03 EEST 2015
[INFO] Final Memory: 37M/323M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project russo-confluence: Compilation failure: Compilation failure:
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[3,25] error: package javax.servlet.http does not exist
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[4,25] error: package javax.servlet.http does not exist
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[57,26] error: cannot find symbol
[ERROR] class ConfluenceAuthenticator
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[57,54] error: cannot find symbol
[ERROR] class ConfluenceAuthenticator
[ERROR] /root/sso/confluence-remote-user-sso-master/src/main/java/ch/fuchsnet/confluence/ConfluenceAuthenticator.java:[93,26] error: cannot access HttpServletRequest
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Any suggestions please?
Thank you!

Fuchs commented

Hi, looks like there is a missing dependency.

In general I would not recommend to build directly with maven, but rather install the Atlassian SDK and use the tools and scripts they provide, that should also pull in all the needed dependencies.

Kind regards,

Christian

Hi,
Thanks for the quick reply.
I get the same error as above if I run atlas-package with sdk version 5.0.0.
If I use a later SDK (tried a few including latest), when running atlas-package I get a dependency error, the one I've already emailed you about:
[ERROR] Failed to execute goal on project russo-confluence: Could not resolve dependencies for project ch.fuchsnet.confluence:russo-confluence:jar:1.0: Could not find artifact com.atlassian.filestore:dt-filestore-httpclient:jar:0.3.0 in atlassian-public (https://maven.atlassian.com/repository/public) -> [Help 1]

Regards,
Bogdan

Fuchs commented

Hi, thanks for the reply,

I'll see that I can get someone to try to build it with a newer version of the SDK next week. As our code doesn't use that specific dependency I assume it is something coming from Atlassian, so we'll have to check what we can do about this.

I'll try to get back to you as soon as possible, thanks in advance for the patience.

Kind regards,

Christian

Fuchs commented

Hi,
I manually added the dependency to the pom.xml, it now builds with the most recent Atlassian SDK here. Please pull, retry and let me know if it works, then I'll close the ticket.

Kind regards,

Christian

Thank you Christian.
I will do this over the weekend.

On Thu, Oct 8, 2015 at 12:22 PM, Christian notifications@github.com wrote:

Hi,
I manually added the dependency to the pom.xml, it now builds with the
most recent Atlassian SDK here. Please pull, retry and let me know if it
works, then I'll close the ticket.

Kind regards,

Christian

Fuchs commented

Hi csbogdan, did you have a chance to test the fix? If yes: does it work? Then I'll close the ticket.

Thanks for your feedback

Hello Christian,
I apologies for the the very late reply.
Plugin compiled perfectly now.

Thank you for looking into this!
Regards,
Bogdan