• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfpm scan: Incorrect usage of scan command. It must be scan CODEBASEPATH CFSERVERURL.

Explorer ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

I'm trying to use the scan command for cfpm (on a Windows machine).  I have taken the following steps:

  • Opened the command prompt
  • Entered the collowing command: c:\ColdFusion2021\cfusion\bin\cfpm
  • At the ensuing cfpm prompt entered the command: scan c:\path\to\application

I get the following error message:

Incorrect usage of scan command. It must be scan CODEBASEPATH CFSERVERURL.

 

The "c:\path\to\application" is correct and exists.  I am issuing the scan command from the cfpm prompt.  Any suggestions why I am receiving this error would be helpful.

 

Thanks

 

Views

175

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 29, 2024 Jan 29, 2024

Yes, and in that talk, when I was demonstrating that I clarified both that a) it's with CF2023 that you no longer need the url and b) that with cf2021 update 5 and beyond the scan no longer works at all as that url is never recognized as valid. Catch-22,for sure.

 

So I mentioned as well that one could certainly install cf2023 (on the same or another machine) to use that to scan your code (there should be no difference in the result).

 

Another option I failed to mention (but thought of right af

...

Votes

Translate

Translate
Community Expert ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

I don't know much about cfpm, but would guess it's because you're not specifying a CFSERVERURL attribute.

 

Dave Watts, Eidolon LLC 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

Thanks for your reply. I just watched a replay of a preso Charlie Arehart did a few days ago (The Many Capabilities of CF Package Management and cfpm) where he successfully executes a scan as I did above with no CFSERVERURL attribute. If I add a value for the CFSERVERURL attribute I get the following error:

Error: CODEBASEPATH c:\path\to\application not found

Which makes no sense to me because the path does exist.
 
In Charlie's preso it looks like he's on CF2023 so maybe CODEBASEPATH and CFSERVERURL are required for CF2021.  If that's the case the scan command still doesn't work for me and I know the CODEBASEPATH and CFSERVERURL I am providing are correct.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

Yes, and in that talk, when I was demonstrating that I clarified both that a) it's with CF2023 that you no longer need the url and b) that with cf2021 update 5 and beyond the scan no longer works at all as that url is never recognized as valid. Catch-22,for sure.

 

So I mentioned as well that one could certainly install cf2023 (on the same or another machine) to use that to scan your code (there should be no difference in the result).

 

Another option I failed to mention (but thought of right after and meant to demo and blog about) is that if you installed cf2021 using the full/gui installer, you could get the zip "installer" instead and extract that, and use the tool in there. As. I noted in the session, since the cf2023 cfpm scan does NOT require that Cf be running, you need not fear any conflict in doing that. (And you should not need to run the cfinstall.bat or .sh, which WOULD offer to setup the service to run that new instance.) 

 

(And those who had already implemented cf2021 already via the zip could just implement the new one in a new folder.)

 

Either way, don't update that new zip-based instance to update or later lest it break this scan tool. And obviously don't use it to run code since you'll not be updating it.

 

And all this will be obviated/mitigated when Adobe addresses the bug with CF2021, whose tracker ticket I pointed out I see now I failed to point out in the talk. It's here (and I've just updated the slidedeck to have it):
https://tracker.adobe.com/#/view/CF-4216277

 

Again, I've yet to test this zip approach. If you try it, let us know. I'm writing all this on my phone at the moment. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

Genius!  Can confirm the "zip approach" works on both Windows and Mac.

 

We can't / aren't allowed to install CF on machines but we are allowed to use CommandBox so I had also been trying to use cfpm via CommandBox and that was also producing errors so this solution is very helpful for our current need.

 

Thanks very much for suggesting it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

LATEST

Glad to have helped.

 

FWIW, you could also have started a Commandbox cf2021 instance that was left at update 4 or earlier. It's just a bit of a hassle digging deep (into the structure of how it implements itself) to find that cfusion/bin folder, whereas with the zip it's easy to find. 🙂 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation