Bug 1011123 - No settings.xml path validation during quickstarts installation
No settings.xml path validation during quickstarts installation
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Installer (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ER6
: EAP 6.2.0
Assigned To: Francisco Canas
Petr Kremensky
Russell Dickenson
Depends On:
  Show dependency treegraph
Reported: 2013-09-23 12:14 EDT by Petr Kremensky
Modified: 2014-09-03 00:57 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-15 11:21:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Petr Kremensky 2013-09-23 12:14:06 EDT
I am able to set path to directory as settings.xml target path. We should add some validation here.

Following exception is thrown during installation:
Post Processing Error
Invocation Problem calling : com.redhat.installer.settings.MavenSettingsTransformer, java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.izforge.izpack.installer.ProcessPanelWorker$ExecutableClass.run(ProcessPanelWorker.java:765)
	at com.izforge.izpack.installer.ProcessPanelWorker$ProcessingJob.run(ProcessPanelWorker.java:516)
	at com.izforge.izpack.installer.ProcessPanelWorker.runJob(ProcessPanelWorker.java:462)
	at com.izforge.izpack.installer.ProcessPanelWorker.run(ProcessPanelWorker.java:388)
	at com.izforge.izpack.panels.ProcessPanelConsoleHelper.runConsole(ProcessPanelConsoleHelper.java:126)
	at com.izforge.izpack.installer.ConsoleInstaller.iterateAndPerformAction(ConsoleInstaller.java:278)
	at com.izforge.izpack.installer.ConsoleInstaller.doInstall(ConsoleInstaller.java:602)
	at com.izforge.izpack.installer.ConsoleInstaller.run(ConsoleInstaller.java:737)
	at com.izforge.izpack.installer.Installer.main(Installer.java:139)
Caused by: java.io.FileNotFoundException: /home/pkremens/test (Is a directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:146)
	at com.redhat.installer.settings.MavenSettingsTransformer.makeBackup(MavenSettingsTransformer.java:209)
	at com.redhat.installer.settings.MavenSettingsTransformer.run(MavenSettingsTransformer.java:66)
	... 13 more

Moreover there no default maven repo and settings.xml location while installing EAP via console. In gui there is default repo "${HOME}/.m2/repository" and default settings.xml "${HOME}/.m2/settings.xml", but in console there are just empty lines.
Comment 1 Francisco Canas 2013-10-11 11:30:54 EDT
I've added a touch of extra validation in the maven repo settings: It won't pass validation if the user enters a dir for his settings.xml instead of a proper file.

I have also added default repo paths in the -console installer to align it with the default paths in the GUI.
Comment 2 Petr Kremensky 2013-10-18 08:57:34 EDT
Verified on EAP 6.2.0.ER6 installer.

Note You need to log in before you can comment on or make changes to this bug.