Howdy, Am just shooting in the dark, am actually unsure how GH Action "local repo" behaves, but you might be installing your dep and THEN getting local repo from cache action maybe?
Do you use cache action? If so, is it invoked before or after you install this local depo? T On Tue, Jan 19, 2021 at 8:04 AM Alex Ford <[email protected]> wrote: > I have been trying to automate testing for our Maven project on GitHub > using Actions, but we have a local dependency and the install:install-file > command seems to be generating the path incorrectly. It doesn't do this on > my own Windows machine, so I'm at a loss on what it's doing, or why, and > how to fix it. > > I give it the following command: > mvn install:install-file -Dfile=libs/jfreechart-1.0.19.jar > -DgroupId=com.jfreechart.1 -DartifactId=jfreechart-1 -Dversion=1.0.19 > -Dpackaging=jar -DgeneratePom=true > > And when I look at the error messages, it says this: > Error: The specified file 'D:\a\bt\bt\OUGS_java_code\libs\jfreechart-1' > not exists > > I haven't been able to figure out why it seems to be using the artifact id > instead of the full path; this is also the result after a few weeks of > messing around with the repository structure, during which it came up with > several other paths that were even less similar to the file path in the > command. I tried changing the artifact ID to match the path, but it's > coming up with the exact same path in the error; the POM file doesn't let > me use the path as the artifact ID because it's the wrong structure, so I'm > not sure if that's where it's trying to pull the path from?? > > The dependency definition matches what I'm putting into the install command > above, here's the block: > <dependency> > <groupId>com.jcommon.1</groupId> > <artifactId>jcommon-1.jar</artifactId> > <version>1.0.23</version> > </dependency> > > I feel like I'm going crazy at this point because again, it works FINE on > my local computer. Actions is set to use the latest version of Windows & > JDK 8, and from the log it looks to be using Maven 2.5.2. If there's more > information I can provide please let me know, I just really have no idea > what else to even try at this point. >
