bonej-org / BoneJ2

Plugins for bone image analysis
BSD 2-Clause "Simplified" License
20 stars 12 forks source link

Build scripts fail with DependencyResolutionException #156

Closed mdoube closed 5 years ago

mdoube commented 5 years ago

Describe the bug The build scripts IJinstall.sh and IJinstall_naughty.sh fail with the following error:

[ERROR] Failed to execute goal net.imagej:imagej-maven-plugin:0.7.0:copy-jars (copy-jars) on project pom-bonej: Couldn't resolve dependencies for artifact: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.bonej:pom-bonej:jar:6.0.1-SNAPSHOT in imagej.public (https://maven.imagej.net/content/groups/public) -> [Help 1]

This is despite all tests passing and mvn clean install passing and copying newly-compiled artefacts to the local repository.

To Reproduce Steps to reproduce the behavior:

  1. On the command line go to the git repository for bonej-aggregator
  2. run ./IJinstall_naughty.sh <path/to/your/Fiji.app>

Expected behavior BoneJ compiles and jars are copied into Fiji.app/plugins; old BoneJ jars are deleted from Fiji.app/plugins

Additional Context The build scripts do this: mvn -Dimagej.app.directory="$1" -Ddelete.other.versions=true -Dmaven.test.skip=true clean install

rimadoma commented 5 years ago

This is a known issue with imagej-maven-plugin:0.7.0. That's why I set pom to use 0.6.0. Has that been removed?

Issue is fixed in 0.7.1, but I don't know if it's out yet.

mdoube commented 5 years ago

Thanks @rimadoma. Where do we set which version of imagej-maven-plugin to use?

rimadoma commented 5 years ago

@mdoube it was on pom.xml at root of Modern before I left. It goes in

mdoube commented 5 years ago

It goes in

...?

OK, I think I see it in the pom.xml files that were live at your last commit 685963f4, blocks like this, right?

 <build>
        <plugins>
            <plugin>
                <groupId>net.imagej</groupId>
                <artifactId>imagej-maven-plugin</artifactId>
                <version>0.6.0</version>
                <executions>
                    <execution>
                        <id>copy-jars</id>
                        <phase>install</phase>
                        <goals>
                            <goal>copy-jars</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
mdoube commented 5 years ago

This commit 41b6fd2 by @ctrueden removed the pom.xml files from Modern and Legacy and thus the version @rimadoma set for imagej-maven-plugin.

Looks like this <build> block needs to be put back - where would be a good place to do that?

P.S. doing it while not increasing the number of pom.xml files would be welcome; BoneJ2 has 16 of them.

alessandrofelder commented 5 years ago

Thanks a lot for investigating this, @rimadoma and @mdoube. Putting the code block above just in the top-level pom solves the problem for me. Just committed a fix to master: @mdoube could you double-check this fixes it for you, too?

mdoube commented 5 years ago

Leaving this issue open for now because the install scripts still contain deprecated code and the top-level pom.xml has the version downgrade in it.

ctrueden commented 5 years ago

I changed it to the newest version of imagej-maven-plugin (https://github.com/bonej-org/BoneJ2/commit/621afe10013f324ad169553c5ffe3722d355315b) and the Travis build passed this time. Personally I think it is fine to close this issue. The switch to scijava-maven-plugin will happen automatically with the commit that updates the pom-scijava parent version in the future.

mdoube commented 5 years ago

Confirming, build works here with imagej-maven-plugin 0.7.1