che icon indicating copy to clipboard operation
che copied to clipboard

How to customise project properties and preferences in Che?

Open mjitch opened this issue 10 years ago • 23 comments

In other versions of Eclipse, you've the option of customizing the properties of a project like maven settings, jdk ver, etc. I am not able see such options in che. As a result, maven fails to download my project dependencies and hence, build fails.

mjitch avatar Feb 12 '16 07:02 mjitch

There isn't such a possibility at the moment. Both Maven and JDK version are defined in a Dockerfile for a chosen environment that runs your workspace.

Can you share Maven output? Why does it fail? Private artifacts? Wrong Maven version?

ghost avatar Feb 12 '16 08:02 ghost

Problem here is i used a custom artifactory in my maven builds. So, I need an option to specify my own maven settings xml as a preference.

mjitch avatar Feb 12 '16 09:02 mjitch

You may try to use mvn clean install -s /path/to/your/settings.xml command in such case.

You can upload your setting.xml file directly in the IDE or copy it into the project directory on a local file system.

ddementieva avatar Feb 12 '16 09:02 ddementieva

i have tried copying my settings xml to my project folder, it didn't work out. It still takes the default maven settings

mjitch avatar Feb 16 '16 09:02 mjitch

Can you share the command you're running?

ghost avatar Feb 16 '16 10:02 ghost

I am actually running the standard mvn command from the Eclipse GUI - " mvn clean install package". Run --> Edit Commands

mjitch avatar Feb 16 '16 10:02 mjitch

Do not forget about -s /path/to/your/settings.xml

ghost avatar Feb 16 '16 10:02 ghost

ok...I'll check that option too and come back. Thanks!

mjitch avatar Feb 16 '16 11:02 mjitch

Or you may put your settings.xml to ~/.m2. Maven will use it by default then.

ghost avatar Feb 16 '16 11:02 ghost

Didn't want to change that actually.

mjitch avatar Feb 16 '16 12:02 mjitch

Well, these the are the 2 options - either tell Maven what settings to use in the command line or put your settings.xml in the location where Maven expects it.

ghost avatar Feb 16 '16 12:02 ghost

Now, the settings xml is detected. But it seems Che has issues understanding the Windows format of the location - <localRepository>.m2\repository</localRepository>

Logs -

`[INFO] Error stacktraces are turned on.

[ERROR] Could not create local repository at /.m2\repository -> [Help 1]

org.apache.maven.repository.LocalRepositoryNotAccessibleException: Could not create local repository at /.m2\repository`

Not sure now, how do i specify the path in my settings xml.

mjitch avatar Feb 16 '16 12:02 mjitch

You need to remove it. .m2/repository will be created by default.

ghost avatar Feb 16 '16 12:02 ghost

Yes, finally my project built worked in che! But a few questions still remains though -

  1. My custom commands are not saved permanently. Whenever i restart the container, these are wiped clean. Is there a way to save them permanently?
  2. We use an SVN repository instead of GitHub. Is there a plugin available to integrate SVN with Che?

mjitch avatar Feb 17 '16 09:02 mjitch

  1. What are the steps to reproduce? I create a workspace, start it, add a command, stop it. Restart it - the command is there.
  2. There's no SVN plugin at the moment. You may use terminal and svn command line instead (or commands). SVN is installed in a JAVA stack.

ghost avatar Feb 17 '16 09:02 ghost

#1 - The command settings are not retained when I restart Che.

mjitch avatar Feb 18 '16 09:02 mjitch

Just checked it. Commands are there. They are saved into a workspace configuration. Any special steps to reproduce?

ghost avatar Feb 18 '16 10:02 ghost

Nothing special just the routine start and stop. I face it almost every time. Not sure why as I am saving my commands

mjitch avatar Feb 18 '16 10:02 mjitch

I have tried to reproduce it a couple of times, and commands are there. Can you record a short video demoing the commands are gone/.

ghost avatar Feb 18 '16 10:02 ghost

ok

mjitch avatar Feb 18 '16 10:02 mjitch