最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - How to debug maven dependencies installed locally? - Stack Overflow

programmeradmin3浏览0评论

I am trying to use visual studio code on my linux ubuntu machine to debug a repo BigStitcher-Spark, specifically for one of its dependencies titled multiview-reconstruction.

I can see the dependency inside my BigStitcher-Spark pom.xml file below, it is pointing to version 5.2.2, which it downloads from online and places into my .m2 folder:

<project xmlns=".0.0"
         xmlns:xsi=";
         xsi:schemaLocation=".0.0 .0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>.scijava</groupId>
        <artifactId>pom-scijava</artifactId>
        <version>39.0.0</version>
        <relativePath/>
    </parent>

    <groupId>net.preibisch</groupId>
    <artifactId>BigStitcher-Spark</artifactId>
    <version>0.1.0-SNAPSHOT</version>

    <name>BigStitcher Spark</name>
    <description>Spark-based parallel BigStitcher project.</description>
    <url>;/url>
    <inceptionYear>2021</inceptionYear>
    <anization>
        <name>Fiji</name>
        <url>/</url>
    </anization>
    <licenses>
        <license>
            <name>GNU General Public License v2+</name>
            <url>.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>StephanPreibisch</id>
            <name>Stephan Preibisch</name>
            <url>:StephanP</url>
            <roles>
                <role>founder</role>
                <role>lead</role>
                <role>developer</role>
                <role>debugger</role>
                <role>reviewer</role>
                <role>support</role>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Marwan Zouinkhi</name>
        </contributor>
        <contributor>
            <name>Tobias Pietzsch</name>
            <url>;/url>
        </contributor>
    </contributors>

    <mailingLists>
        <mailingList>
            <name>ImageJ Forum</name>
            <archive>/</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:git:;/connection>
        <developerConnection>scm:git:[email protected]:JaneliaSciComp/BigStitcher-Spark</developerConnection>
        <tag>HEAD</tag>
        <url>;/url>
    </scm>
    <issueManagement>
        <system>GitHub Issues</system>
        <url>;/url>
    </issueManagement>
    <ciManagement>
        <system>GitHub Actions</system>
        <url>;/url>
    </ciManagement>

    <properties>
        <package-name>net.preibisch.bigstitcher.spark</package-name>

        <!-- <scijava.jvm.version>1.8</scijava.jvm.version> -->
        <license.licenseName>bsd</license.licenseName>
        <license.copyrightOwners>Developers.</license.copyrightOwners>

        <!--
        <imglib2.version>7.1.2</imglib2.version>
        <imglib2-realtransform.version>4.0.3</imglib2-realtransform.version>
        <imglib2-cache.version>1.0.0-beta-19</imglib2-cache.version>
        <imglib2-algorithm.version>0.16.0</imglib2-algorithm.version>
        <imglib2-roi.version>0.15.1</imglib2-roi.version>
        <n5-imglib2.version>7.0.2</n5-imglib2.version>
        <bigdataviewer-core.version>10.6.1</bigdataviewer-core.version>
        <bigdataviewer-vistools.version>1.0.0-beta-36</bigdataviewer-vistools.version>
        -->
        <!-- <n5-zarr.version>1.3.5</n5-zarr.version> -->

        <imglib2.version>7.1.4</imglib2.version>
        <imglib2-algorithm.version>0.17.2</imglib2-algorithm.version>
        <bigdataviewer-core.version>10.6.3</bigdataviewer-core.version>
        <spim_data.version>2.3.5</spim_data.version>
        <multiview-reconstruction.version>5.2.2</multiview-reconstruction.version>
        <BigStitcher.version>2.3.4</BigStitcher.version>

        <!--for the old bioformats to work properly (compared with old main branch to find out)-->
        <ome-codecs.version>0.3.0</ome-codecs.version>

    </properties>

    <repositories>
        <!-- NB: for project parent -->
        <repository>
            <id>imagej.public</id>
            <url>;/url>
        </repository>
        <repository>
            <id>jitpack.io</id>
            <url>;/url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>sc.fiji</groupId>
            <artifactId>bigdataviewer-core</artifactId>
            <!-- <version>10.4.6</version> -->
        </dependency>
        <dependency>
            <groupId>sc.fiji</groupId>
            <artifactId>bigdataviewer-vistools</artifactId>
            <!-- <version>1.0.0-beta-32</version> -->
        </dependency>
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-cache</artifactId>
            <!-- <version>1.0.0-beta-17</version> -->
        </dependency>
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2</artifactId>
            <!-- <version>6.3.0</version> -->
        </dependency>
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-algorithm</artifactId>
            <!-- <version>0.15.0</version> -->
        </dependency>
        <dependency>
            <groupId>.bigdataviewer</groupId>
            <artifactId>bigdataviewer-n5</artifactId>
            <version>1.0.1</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.annotation</groupId>
                    <artifactId>javax.annotation-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>sc.fiji</groupId>
            <artifactId>spim_data</artifactId>
        </dependency>
        <!-- <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-s3</artifactId>
            <version>${aws-java-sdk-s3.version}</version>
        </dependency> -->
        <!-- <dependency>
            <groupId>.bigdataviewer</groupId>
            <artifactId>bigdataviewer-omezarr</artifactId>
            <version>0.2.3</version>
        </dependency> -->
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5</artifactId>
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-zarr</artifactId>
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-aws-s3</artifactId>
            <!-- <version>4.0.0</version> -->
        </dependency>
<!--        Scala is sensitive to fasterxml version -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.13.4</version>
        </dependency>
        <dependency>
            <groupId>.apache.spark</groupId>
<!--            Spark 3.3.2 release comes with scala 2.12.15 -->
            <artifactId>spark-core_2.12</artifactId>
            <version>3.3.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>netty-all</artifactId>
                    <groupId>ioty</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>netty</artifactId>
                    <groupId>ioty</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jcl-over-slf4j</artifactId>
                    <groupId>.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jul-to-slf4j</artifactId>
                    <groupId>.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>aopalliance-repackaged</artifactId>
                    <groupId>.glassfish.hk2.external</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>javax.inject</artifactId>
                    <groupId>.glassfish.hk2.external</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jersey-client</artifactId>
                    <groupId>.glassfish.jersey.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jersey-core</artifactId>
                    <groupId>com.sun.jersey</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>lz4</artifactId>
                    <groupId>net.jpountz.lz4</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jets3t</artifactId>
                    <groupId>net.java.dev.jets3t</groupId>
                </exclusion>
                <!--<exclusion>
                        <groupId>com.esotericsoftware</groupId>
                        <artifactId>kryo-shaded</artifactId>
                </exclusion>-->
                <exclusion>
                        <groupId>javax.xml.stream</groupId>
                        <artifactId>stax-api</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.12.15</version>
        </dependency>
        <dependency>
            <groupId>net.preibisch</groupId>
            <artifactId>multiview-reconstruction</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>ch.epfl.biop</groupId>
                    <artifactId>ijp-kheops</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.esotericsoftware</groupId>
                    <artifactId>reflectasm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-bsd</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-gpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ioty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.68.Final</version>
        </dependency>
        <dependency>
            <groupId>ioty</groupId>
            <artifactId>netty</artifactId>
            <version>3.9.9.Final</version>
        </dependency>
        <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli</artifactId>
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-hdf5</artifactId>
            <!-- <version>2.0.0</version> -->
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-imglib2</artifactId>
        </dependency>
        <!-- .java.dev.jna/jna needed for M1 native library loading -->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>5.7.0</version>
        </dependency>
        <dependency>
            <groupId>net.preibisch</groupId>
            <artifactId>BigStitcher</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>ch.epfl.biop</groupId>
                    <artifactId>ijp-kheops</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.esotericsoftware</groupId>
                    <artifactId>reflectasm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-bsd</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-gpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- old bioformats -->
        <dependency>
            <groupId>.openmicroscopy</groupId>
            <artifactId>ome-common</artifactId>
            <version>6.0.4</version>
            <exclusions>
                <exclusion>
                    <groupId>com.esotericsoftware.kryo</groupId>
                    <artifactId>kryo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ome</groupId>
            <artifactId>formats-bsd</artifactId>
            <version>6.5.1</version>
            <exclusions>
                <exclusion>
                    <groupId>com.esotericsoftware.kryo</groupId>
                    <artifactId>kryo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ome</groupId>
            <artifactId>formats-gpl</artifactId>
            <version>6.5.1</version>
            <exclusions>
                <exclusion>
                    <groupId>ch.systems.cisd</groupId>
                    <artifactId>jhdf5</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.esotericsoftware.kryo</groupId>
                    <artifactId>kryo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>fatjar</id>
            <build>
                <plugins>
                    <!-- Maven shade for Uber Jar -->
                    <!-- .html -->
                    <!-- .html -->
                    <plugin>
                        <groupId>.apache.maven.plugins</groupId>
                        <artifactId>maven-shade-plugin</artifactId>
                        <configuration>
                            <!-- Do not minimize for now to speed up packaging. -->
                            <transformers combine.children="append">
                                <transformer
                                        implementation=".apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/json/mpicbg.spim.data.generic.sequence.ImgLoaderIo</resource>
                                </transformer>
                                <transformer
                                        implementation=".apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/json/.janelia.saalfeldlab.n5.Compression$CompressionType</resource>
                                </transformer>
                            </transformers>
                            <!--<minimizeJar>true</minimizeJar> -->
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>Angle0.tif</exclude>
                                        <exclude>LICENSE</exclude>
                                        <exclude>LICENSE.txt</exclude>
                                        <exclude>META-INF/DEPENDENCIES</exclude>
                                        <exclude>META-INF/LICENSE</exclude>
                                        <exclude>META-INF/NOTICE</exclude>
                                        <exclude>META-INF/BSDL</exclude>
                                        <exclude>META-INF/COPYING</exclude>
                                        <exclude>META-INF/LEGAL</exclude>
                                        <exclude>META-INF/LICENSE.RUBY</exclude>
                                        <exclude>META-INF/json/.scijava.plugin.Plugin</exclude>
                                        <exclude>META-INF/*.MF</exclude>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                        <exclude>META-INF/*.txt</exclude>
                                        <exclude>module-info.class</exclude>
                                        <exclude>plugins.config</exclude>
                                        <exclude>META-INF/versions/9/module-info.class</exclude>
                                        <exclude>META-INF/okio.kotlin_module</exclude>
                                        <exclude>META-INF/services/com.fasterxml.jackson.core.JsonFactory</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <!-- Additional configuration. -->
                            <artifactSet>
                                <excludes>
                                    <exclude>xpp3:xpp3</exclude>
                                </excludes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>.apachemonspress</pattern>
                                    <shadedPattern>.janelia.saalfeldlab.apachemonspress</shadedPattern>
                                </relocation>
                                <!-- Protect newer gson version from the old one preloaded by spark -->
                                <relocation>
                                    <pattern>com.google.gson</pattern>
                                    <shadedPattern>.janelia.saalfeldlab.google.gson</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                        <!-- binds by default to package phase -->
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>shade</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Maven shade end -->
                </plugins>
            </build>
        </profile>
    </profiles>

</project>

If i run my debugger in visual studio code, I can step through the dependency, but I cannot add print statements. I want to be able to edit the code in my dependency.

I can clone the github repo for the dependency, and run 'mvn clean package' to generate the .jar files.

Can I change my pom.xml to point towards my locally installed multiview-reconstruction github repo folder, and tell BigStitcher-Spark to use that for all the dependency calls? So that I can step through the multiview-reconstruction code and edit it as I go?

I am trying to use visual studio code on my linux ubuntu machine to debug a repo BigStitcher-Spark, specifically for one of its dependencies titled multiview-reconstruction.

I can see the dependency inside my BigStitcher-Spark pom.xml file below, it is pointing to version 5.2.2, which it downloads from online and places into my .m2 folder:

<project xmlns="http://maven.apache./POM/4.0.0"
         xmlns:xsi="http://www.w3./2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache./POM/4.0.0 https://maven.apache./xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>.scijava</groupId>
        <artifactId>pom-scijava</artifactId>
        <version>39.0.0</version>
        <relativePath/>
    </parent>

    <groupId>net.preibisch</groupId>
    <artifactId>BigStitcher-Spark</artifactId>
    <version>0.1.0-SNAPSHOT</version>

    <name>BigStitcher Spark</name>
    <description>Spark-based parallel BigStitcher project.</description>
    <url>https://github/JaneliaSciComp/BigStitcher-Spark</url>
    <inceptionYear>2021</inceptionYear>
    <anization>
        <name>Fiji</name>
        <url>https://fiji.sc/</url>
    </anization>
    <licenses>
        <license>
            <name>GNU General Public License v2+</name>
            <url>https://www.gnu./licenses/gpl.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>StephanPreibisch</id>
            <name>Stephan Preibisch</name>
            <url>http://imagej/User:StephanP</url>
            <roles>
                <role>founder</role>
                <role>lead</role>
                <role>developer</role>
                <role>debugger</role>
                <role>reviewer</role>
                <role>support</role>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Marwan Zouinkhi</name>
        </contributor>
        <contributor>
            <name>Tobias Pietzsch</name>
            <url>https://imagej/people/tpietzsch</url>
        </contributor>
    </contributors>

    <mailingLists>
        <mailingList>
            <name>ImageJ Forum</name>
            <archive>https://forum.image.sc/</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:git:https://github/JaneliaSciComp/BigStitcher-Spark</connection>
        <developerConnection>scm:git:[email protected]:JaneliaSciComp/BigStitcher-Spark</developerConnection>
        <tag>HEAD</tag>
        <url>https://github/JaneliaSciComp/BigStitcher-Spark</url>
    </scm>
    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github/JaneliaSciComp/BigStitcher-Spark/issues</url>
    </issueManagement>
    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github/JaneliaSciComp/BigStitcher-Spark/actions</url>
    </ciManagement>

    <properties>
        <package-name>net.preibisch.bigstitcher.spark</package-name>

        <!-- <scijava.jvm.version>1.8</scijava.jvm.version> -->
        <license.licenseName>bsd</license.licenseName>
        <license.copyrightOwners>Developers.</license.copyrightOwners>

        <!--
        <imglib2.version>7.1.2</imglib2.version>
        <imglib2-realtransform.version>4.0.3</imglib2-realtransform.version>
        <imglib2-cache.version>1.0.0-beta-19</imglib2-cache.version>
        <imglib2-algorithm.version>0.16.0</imglib2-algorithm.version>
        <imglib2-roi.version>0.15.1</imglib2-roi.version>
        <n5-imglib2.version>7.0.2</n5-imglib2.version>
        <bigdataviewer-core.version>10.6.1</bigdataviewer-core.version>
        <bigdataviewer-vistools.version>1.0.0-beta-36</bigdataviewer-vistools.version>
        -->
        <!-- <n5-zarr.version>1.3.5</n5-zarr.version> -->

        <imglib2.version>7.1.4</imglib2.version>
        <imglib2-algorithm.version>0.17.2</imglib2-algorithm.version>
        <bigdataviewer-core.version>10.6.3</bigdataviewer-core.version>
        <spim_data.version>2.3.5</spim_data.version>
        <multiview-reconstruction.version>5.2.2</multiview-reconstruction.version>
        <BigStitcher.version>2.3.4</BigStitcher.version>

        <!--for the old bioformats to work properly (compared with old main branch to find out)-->
        <ome-codecs.version>0.3.0</ome-codecs.version>

    </properties>

    <repositories>
        <!-- NB: for project parent -->
        <repository>
            <id>imagej.public</id>
            <url>https://maven.imagej/content/groups/public</url>
        </repository>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>sc.fiji</groupId>
            <artifactId>bigdataviewer-core</artifactId>
            <!-- <version>10.4.6</version> -->
        </dependency>
        <dependency>
            <groupId>sc.fiji</groupId>
            <artifactId>bigdataviewer-vistools</artifactId>
            <!-- <version>1.0.0-beta-32</version> -->
        </dependency>
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-cache</artifactId>
            <!-- <version>1.0.0-beta-17</version> -->
        </dependency>
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2</artifactId>
            <!-- <version>6.3.0</version> -->
        </dependency>
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-algorithm</artifactId>
            <!-- <version>0.15.0</version> -->
        </dependency>
        <dependency>
            <groupId>.bigdataviewer</groupId>
            <artifactId>bigdataviewer-n5</artifactId>
            <version>1.0.1</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.annotation</groupId>
                    <artifactId>javax.annotation-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>sc.fiji</groupId>
            <artifactId>spim_data</artifactId>
        </dependency>
        <!-- <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-s3</artifactId>
            <version>${aws-java-sdk-s3.version}</version>
        </dependency> -->
        <!-- <dependency>
            <groupId>.bigdataviewer</groupId>
            <artifactId>bigdataviewer-omezarr</artifactId>
            <version>0.2.3</version>
        </dependency> -->
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5</artifactId>
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-zarr</artifactId>
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-aws-s3</artifactId>
            <!-- <version>4.0.0</version> -->
        </dependency>
<!--        Scala is sensitive to fasterxml version -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.13.4</version>
        </dependency>
        <dependency>
            <groupId>.apache.spark</groupId>
<!--            Spark 3.3.2 release comes with scala 2.12.15 -->
            <artifactId>spark-core_2.12</artifactId>
            <version>3.3.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>netty-all</artifactId>
                    <groupId>ioty</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>netty</artifactId>
                    <groupId>ioty</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jcl-over-slf4j</artifactId>
                    <groupId>.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jul-to-slf4j</artifactId>
                    <groupId>.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>aopalliance-repackaged</artifactId>
                    <groupId>.glassfish.hk2.external</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>javax.inject</artifactId>
                    <groupId>.glassfish.hk2.external</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jersey-client</artifactId>
                    <groupId>.glassfish.jersey.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jersey-core</artifactId>
                    <groupId>com.sun.jersey</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>lz4</artifactId>
                    <groupId>net.jpountz.lz4</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jets3t</artifactId>
                    <groupId>net.java.dev.jets3t</groupId>
                </exclusion>
                <!--<exclusion>
                        <groupId>com.esotericsoftware</groupId>
                        <artifactId>kryo-shaded</artifactId>
                </exclusion>-->
                <exclusion>
                        <groupId>javax.xml.stream</groupId>
                        <artifactId>stax-api</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.12.15</version>
        </dependency>
        <dependency>
            <groupId>net.preibisch</groupId>
            <artifactId>multiview-reconstruction</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>ch.epfl.biop</groupId>
                    <artifactId>ijp-kheops</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.esotericsoftware</groupId>
                    <artifactId>reflectasm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-bsd</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-gpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ioty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.68.Final</version>
        </dependency>
        <dependency>
            <groupId>ioty</groupId>
            <artifactId>netty</artifactId>
            <version>3.9.9.Final</version>
        </dependency>
        <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli</artifactId>
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-hdf5</artifactId>
            <!-- <version>2.0.0</version> -->
        </dependency>
        <dependency>
            <groupId>.janelia.saalfeldlab</groupId>
            <artifactId>n5-imglib2</artifactId>
        </dependency>
        <!-- https://mvnrepository/artifact/net.java.dev.jna/jna needed for M1 native library loading -->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>5.7.0</version>
        </dependency>
        <dependency>
            <groupId>net.preibisch</groupId>
            <artifactId>BigStitcher</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>ch.epfl.biop</groupId>
                    <artifactId>ijp-kheops</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.esotericsoftware</groupId>
                    <artifactId>reflectasm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-bsd</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ome</groupId>
                    <artifactId>formats-gpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- old bioformats -->
        <dependency>
            <groupId>.openmicroscopy</groupId>
            <artifactId>ome-common</artifactId>
            <version>6.0.4</version>
            <exclusions>
                <exclusion>
                    <groupId>com.esotericsoftware.kryo</groupId>
                    <artifactId>kryo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ome</groupId>
            <artifactId>formats-bsd</artifactId>
            <version>6.5.1</version>
            <exclusions>
                <exclusion>
                    <groupId>com.esotericsoftware.kryo</groupId>
                    <artifactId>kryo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ome</groupId>
            <artifactId>formats-gpl</artifactId>
            <version>6.5.1</version>
            <exclusions>
                <exclusion>
                    <groupId>ch.systems.cisd</groupId>
                    <artifactId>jhdf5</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.esotericsoftware.kryo</groupId>
                    <artifactId>kryo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>fatjar</id>
            <build>
                <plugins>
                    <!-- Maven shade for Uber Jar -->
                    <!-- https://maven.apache./plugins/maven-shade-plugin/shade-mojo.html -->
                    <!-- https://databricks.gitbooks.io/databricks-spark-knowledge-base/content/troubleshooting/missing_dependencies_in_jar_files.html -->
                    <plugin>
                        <groupId>.apache.maven.plugins</groupId>
                        <artifactId>maven-shade-plugin</artifactId>
                        <configuration>
                            <!-- Do not minimize for now to speed up packaging. -->
                            <transformers combine.children="append">
                                <transformer
                                        implementation=".apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/json/mpicbg.spim.data.generic.sequence.ImgLoaderIo</resource>
                                </transformer>
                                <transformer
                                        implementation=".apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/json/.janelia.saalfeldlab.n5.Compression$CompressionType</resource>
                                </transformer>
                            </transformers>
                            <!--<minimizeJar>true</minimizeJar> -->
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>Angle0.tif</exclude>
                                        <exclude>LICENSE</exclude>
                                        <exclude>LICENSE.txt</exclude>
                                        <exclude>META-INF/DEPENDENCIES</exclude>
                                        <exclude>META-INF/LICENSE</exclude>
                                        <exclude>META-INF/NOTICE</exclude>
                                        <exclude>META-INF/BSDL</exclude>
                                        <exclude>META-INF/COPYING</exclude>
                                        <exclude>META-INF/LEGAL</exclude>
                                        <exclude>META-INF/LICENSE.RUBY</exclude>
                                        <exclude>META-INF/json/.scijava.plugin.Plugin</exclude>
                                        <exclude>META-INF/*.MF</exclude>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                        <exclude>META-INF/*.txt</exclude>
                                        <exclude>module-info.class</exclude>
                                        <exclude>plugins.config</exclude>
                                        <exclude>META-INF/versions/9/module-info.class</exclude>
                                        <exclude>META-INF/okio.kotlin_module</exclude>
                                        <exclude>META-INF/services/com.fasterxml.jackson.core.JsonFactory</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <!-- Additional configuration. -->
                            <artifactSet>
                                <excludes>
                                    <exclude>xpp3:xpp3</exclude>
                                </excludes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>.apachemonspress</pattern>
                                    <shadedPattern>.janelia.saalfeldlab..apachemonspress</shadedPattern>
                                </relocation>
                                <!-- Protect newer gson version from the old one preloaded by spark -->
                                <relocation>
                                    <pattern>com.google.gson</pattern>
                                    <shadedPattern>.janelia.saalfeldlab.google.gson</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                        <!-- binds by default to package phase -->
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>shade</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Maven shade end -->
                </plugins>
            </build>
        </profile>
    </profiles>

</project>

If i run my debugger in visual studio code, I can step through the dependency, but I cannot add print statements. I want to be able to edit the code in my dependency.

I can clone the github repo for the dependency, and run 'mvn clean package' to generate the .jar files.

Can I change my pom.xml to point towards my locally installed multiview-reconstruction github repo folder, and tell BigStitcher-Spark to use that for all the dependency calls? So that I can step through the multiview-reconstruction code and edit it as I go?

Share Improve this question edited Mar 15 at 17:56 aled 26k4 gold badges34 silver badges48 bronze badges asked Mar 15 at 16:15 MartinMartin 1,5924 gold badges43 silver badges91 bronze badges 4
  • 1 You seem to be confusing a git repository (which is local and not on GitHub) and a Maven repository. Different things. – aled Commented Mar 15 at 17:58
  • The github repo in question (multiview-reconstruction) is the repo used to build and publish the package which maven installs – Martin Commented Mar 15 at 18:01
  • Correct. Once you install the package into a Maven repository you can use it from your project. – aled Commented Mar 15 at 18:05
  • I want to add System.out.println statements into my the multiview-reconstruction dependency, when I run the project as-is with the pom.xml, the .jar it downloads is read-only and I can't edit it. I'm trying to point my project pom.xml to a locally downloaded folder instead, where I can edit the files – Martin Commented Mar 15 at 18:16
Add a comment  | 

1 Answer 1

Reset to default 1

Eclipse supports "workspace resolution", which allows you to use different checked out projects as if they were dependencies in Maven. I don't think Visual Studio Code has such a feature.

The best idea I have would be to insert the print statements, build the project under a different version number and then use that version number for the dependency in your original project.

发布评论

评论列表(0)

  1. 暂无评论