Ask a Question

lastOpened property causes svn conflict

SOLVED
Karbert
Occasional Contributor

lastOpened property causes svn conflict

Hi,

 

We store the composite projects in SVN. After closing and reopening a project, a new property is added to the project's setting.xml file: lastOpened. Unfortunately this causes SVN conflict in case more users open the same project, even if nobody changed anything. 

Is there a possibility to disable the creation of this property?

 

Best regards,

Norbert Kando

1 ACCEPTED SOLUTION

Accepted Solutions
Karbert
Occasional Contributor

Re: lastOpened property causes svn conflict

I've managed to "fix" this by removing the lastOpened attribute in a projectListener's beforeSave method:

 

@Override
public void beforeSave(Project project) {
    ProjectConfig pc = ((AbstractWsdlModelItem<ProjectConfig>) project).getConfig();
    pc.unsetLastOpened();
}

View solution in original post

3 REPLIES 3
Karbert
Occasional Contributor

Re: lastOpened property causes svn conflict

I've managed to "fix" this by removing the lastOpened attribute in a projectListener's beforeSave method:

 

@Override
public void beforeSave(Project project) {
    ProjectConfig pc = ((AbstractWsdlModelItem<ProjectConfig>) project).getConfig();
    pc.unsetLastOpened();
}

View solution in original post

jmwest
New Contributor

Re: lastOpened property causes svn conflict

Hi, can you share the entire java file that you used?  Also, what version of the soapui jar are you using?  I am trying to solve this exact same problem but there is no ProjectConfig.unsetLastOpened() method.  I have tried the following two artifacts to no avail:

 

<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>4.6.1</version>
</dependency>

 

and

 

<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.0.0</version>
</dependency>

 

I am not sure what I am missing.  Here is what I have so far:

 

package soapui.listeners.project;

 

import com.eviware.soapui.config.ProjectConfig;
import com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem;
import com.eviware.soapui.model.project.Project;
import com.eviware.soapui.model.support.ProjectListenerAdapter;

 

public class MyProjectListener extends ProjectListenerAdapter
{

    @Override
    public void beforeSave(Project project){
        ProjectConfig pc = ((AbstractWsdlModelItem<ProjectConfig>) project).getConfig();
        pc.unsetLastOpened(); //Compiler Error: "Method unsetLastOpened() is undefined for type..."
    }
}

 

 

My first attempt at a listener for SoapUI so any help here would be greatly appreciated.  

 

Thanks,

Jerry

linkeshkanna
Occasional Contributor

Re: lastOpened property causes svn conflict

I am using the latest version of Ready API - 1.9.0 and I am not able to see the BeforeSave Event Listener.

cancel
Showing results for 
Search instead for 
Did you mean: