Bug 1011123 - No settings.xml path validation during quickstarts installation
Summary: No settings.xml path validation during quickstarts installation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Installer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ER6
: EAP 6.2.0
Assignee: Francisco Canas
QA Contact: Petr Kremensky
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-23 16:14 UTC by Petr Kremensky
Modified: 2014-09-03 04:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:21:23 UTC
Type: Bug


Attachments (Terms of Use)

Description Petr Kremensky 2013-09-23 16:14:06 UTC
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 15:30:54 UTC
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 12:57:34 UTC
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.