Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan dependencies or other locations for annotations #614

Closed
kribblo opened this issue Sep 12, 2012 · 1 comment
Closed

Scan dependencies or other locations for annotations #614

kribblo opened this issue Sep 12, 2012 · 1 comment

Comments

@kribblo
Copy link

kribblo commented Sep 12, 2012

(Spin-off from: https://groups.google.com/d/msg/atmosphere-framework/NVXWWEMpod8/Y6gbgXISxHMJ)

We have one web project that is only JSPs, which is where the web.xml is defined for the various servlets,and so also where I define the servlet and mapping for my AtmosphereHandler(s).

However, all the actual java code, including the handler, is located inside another framework project. In maven there's a dependency "provided" from the web one to the framework one, and eclipse knows what to do.

When deployed to tomcat, the framework one is provided along with the rest of the maven dependencies, so it's a jar file in tomcat/lib when running (this is probably not the right way(TM) to do it but that's the current setup).

Inside this jar is the java class I wish to annotate as a AtmosphereHandlerService. Let's say that the web project is in tomcat/webapps/ROOT and the jar in tomcat/lib

I guess ideally it would be nice if the scanner could simply pick up the other projetc's classes somehow, not sure what that'd do to scanning time if even possible though.

Otherwise I guess some way to point out extra jar files, by relative path should be fine. Relative path because the structure is the same in dev, test, production, but the absolute paths are not. So, counting from the root of the web project, something like ../../lib/framework.jar

Note that I want to specify the jar all the way, if possible, because that directory is full of other libs that I don't want to scan. But that's my use case, I need one specific jar, others might need a directory.

@jfarcand
Copy link
Member

This is fixed now, you can specify the:

<init-param>
   <param-name>org.atmosphere.cpr.atmosphereHandlerPath</param-name>
   <param-value>...</param-value>
</init-param> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants