Tabnine Logo
SessionScope
Code IndexAdd Tabnine to your IDE (free)

How to use
SessionScope
in
org.apache.maven.session.scope.internal

Best Java code snippets using org.apache.maven.session.scope.internal.SessionScope (Showing top 12 results out of 315)

origin: apache/maven

sessionScope.enter();
try
  MavenSession session = new MavenSession( container, repoSession, request, result );
  sessionScope.seed( MavenSession.class, session );
  sessionScope.exit();
origin: apache/maven

@Inject
public SessionScopeModule()
{
  this( new SessionScope() );
}
origin: apache/maven

  @Override
  protected void configure()
  {
    bindScope( SessionScoped.class, scope );
    bind( SessionScope.class ).toInstance( scope );

    bind( MavenSession.class ).toProvider( SessionScope.<MavenSession>seededKeyProvider() ).in( scope );
  }
}
origin: qoomon/maven-git-versioning-extension

public VersioningConfiguration get() {
  final MavenSession session = sessionScope.scope(Key.get(MavenSession.class), null).get();
origin: apache/maven

reactorContext =
  new ReactorContext( result, projectIndex, oldContextClassLoader, reactorBuildStatus,
            sessionScope.memento() );
origin: qoomon/maven-git-versioning-extension

  mavenSession = sessionScope.scope(Key.get(MavenSession.class), null).get();
  configuration = configurationProvider.get();
} catch (OutOfScopeException ex) {
origin: apache/maven

sessionScope.enter( reactorContext.getSessionScopeMemento() );
sessionScope.seed( MavenSession.class, session );
try
  sessionScope.exit();
origin: stackoverflow.com

public void setup() throws Exception {
     ConfigurableBeanFactory factory = (ConfigurableBeanFactory) wac.getAutowireCapableBeanFactory();
     factory.registerScope("session", new SessionScope());
 }
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

try
  sessionScope.enter();
  sessionScope.seed( MavenSession.class, session );
  sessionScope.exit();
origin: stackoverflow.com

 @BeforeClass(dependsOnMethod = "springTestContextPrepareTestInstance")
public void registerWebScopes() {
  ConfigurableBeanFactory factory = (ConfigurableBeanFactory) 
      this.applicationContext.getAutowireCapableBeanFactory();
  factory.registerScope("session", new SessionScope());
  factory.registerScope("request", new RequestScope());
}
origin: io.takari.maven.plugins/takari-plugin-testing

@Override
public Mojo executeMojo(MavenSession session, MavenProject project, MojoExecution execution) throws Exception {
 SessionScope sessionScope = container.lookup(SessionScope.class);
 try {
  sessionScope.enter();
  sessionScope.seed(MavenSession.class, session);
  MojoExecutionScope executionScope = container.lookup(MojoExecutionScope.class);
  try {
   executionScope.enter();
   executionScope.seed(MavenProject.class, project);
   executionScope.seed(MojoExecution.class, execution);
   Mojo mojo = lookupConfiguredMojo(session, execution);
   mojo.execute();
   MojoExecutionEvent event = new MojoExecutionEvent(session, project, execution, mojo);
   for (MojoExecutionListener listener : container.lookupList(MojoExecutionListener.class)) {
    listener.afterMojoExecutionSuccess(event);
   }
   return mojo;
  } finally {
   executionScope.exit();
  }
 } finally {
  sessionScope.exit();
 }
}
origin: stackoverflow.com

 @Before
public void prepareTestInstance() throws Exception {
  applicationContext.getBeanFactory().registerScope("session", new SessionScope());
  applicationContext.getBeanFactory().registerScope("request", new RequestScope());
  MockHttpServletRequest request = new MockHttpServletRequest();

  ServletRequestAttributes attributes = new ServletRequestAttributes(request);
  RequestContextHolder.setRequestAttributes(attributes);

   .......
org.apache.maven.session.scope.internalSessionScope

Most used methods

  • enter
  • exit
  • seed
  • <init>
  • memento
  • scope
  • seededKeyProvider

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • Menu (java.awt)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JFrame (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now