opentracing-contrib / java-jfr-tracer

This is a delegating tracer to be used with OpenTracing. It records span information into the JFR, allowing very deep tracing.
Apache License 2.0
77 stars 14 forks source link

Proposal how to workaround the too long CLASSPATH issue #29

Closed docwarems closed 3 years ago

docwarems commented 3 years ago

Non Eclipse users like me need a Maven solution. One solution would probably to use the appassembler-maven-plugin Booter mechanism - but it's hard to setup if you are not used to it. An easier workaround, which however needs a manual change in the generated bat files would be

                <configuration>
                    <extraJvmArguments>-Xms128m</extraJvmArguments>
                    <assembleDirectory>target</assembleDirectory>
                    <repositoryLayout>flat</repositoryLayout>
                    <programs>
                        <program>
                            <mainClass>se.hirt.examples.robotshop.customerservice.Main</mainClass>
                            <id>customerService</id>
                        </program>
                    </programs>
                </configuration>

This would reduce the CLASSPATH length because you get rid of the package directories, but even this generated CLASSPATH becomes too long. But now that all JARs reside flat in the repo directory, so

set CLASSPATH="%BASEDIR%"\etc;"%REPO%"\*

A somehow ugly procedure but because you will normally do Maven build only once, it's a true workaround. Maybe you can add a comment like this to your README.

docwarems commented 3 years ago

Refers actually to this project: https://github.com/thegreystone/problematic-microservices. I'll move it tonight - sorry!