Git Product home page Git Product logo

Comments (4)

pun-ky avatar pun-ky commented on August 19, 2024

I tried with TCCL switch with no effect, switching parentFirst also with no effect.

/**
 * Utility class for running operations on an explicitly specified class loader.
 *
 * @see <https://www.javacodegeeks.com/2016/08/remembering-reset-thread-context-class-loader.html>
 */
object TcclSwitch {

    fun <T> execute(classLoader: ClassLoader, action: () -> T): T {
        val originalClassLoader = Thread.currentThread().contextClassLoader
        try {
            Thread.currentThread().contextClassLoader = classLoader
            return action()
        } finally {
            Thread.currentThread().contextClassLoader = originalClassLoader
        }
    }
}
        val antClassPath = Path(antProject, sourceSet.runtimeClasspath.asPath)
        TcclSwitch.execute(AntClassLoader.newAntClassLoader(javaClass.classLoader, antProject, antClassPath, true), {
            antTask.execute()
        })

so I am thinking about extending Gradle buildscript classpath dynamically only for aemProcessClasses...

from gradle-aem-plugin.

toniedzwiedz avatar toniedzwiedz commented on August 19, 2024

@pun-ky perhaps it would be prudent to give up using the SCR annotations?

Starting from AEM 6.2, there's another way to describe OSGi services and, when using Maven, all you need is the bundle plugin. Perhaps supporting this would be a better investment than retro-fitting the SCR annotations.

http://www.nateyolles.com/blog/2017/05/osgi-declarative-services-annotations-in-aem
http://blogs.adobe.com/experiencedelivers/experience-management/osgi/using-osgi-annotations-aem6-2/

from gradle-aem-plugin.

pun-ky avatar pun-ky commented on August 19, 2024

Agree. Time to move on. I will try to introduce support and examples for new annotations.

from gradle-aem-plugin.

pun-ky avatar pun-ky commented on August 19, 2024

SCR support will be discontinued due to #19
in 1.1.0 will be removed and covered by BND tool

see http://blogs.adobe.com/experiencedelivers/experience-management/osgi/using-osgi-annotations-aem6-2/

from gradle-aem-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.