add source folder src/test/resources

feature_23026
Francesco Mangiacrapa 2 years ago
parent b1dac31708
commit 1a62ba4ca2

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/java">
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -11,6 +11,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
@ -33,5 +34,12 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

@ -1,39 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="workspace-tree-widget">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/target/generated-sources/annotations"/>
</wb-module>

@ -258,20 +258,4 @@ public class ApplicationProfileReader {
return builder.toString();
}
// public static void main(String[] args) {
//
// try {
// ScopeProvider.instance.set("/gcube");
// ApplicationProfileReader ap = new ApplicationProfileReader("Workspace-Explorer-App", "org.gcube.portlets.user.workspaceexplorerapp.server.WorkspaceExplorerAppServiceImpl");
// System.out.println(ap.readProfileFromInfrastrucure());
// }
// catch (Exception e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
//
//
// }
}

@ -0,0 +1 @@
/resources/

@ -3,27 +3,44 @@ package org.gcube.portlets.user.workspace;
import java.io.IOException;
import java.util.Properties;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl;
import org.gcube.portlets.user.workspace.server.reader.ApplicationProfileReader;
public class TestProperties {
// public static void main(String[] args) {
//
// Properties prop = new Properties();
//
// try {
// // load a properties file from class path, inside static method
// prop.load(GWTWorkspaceServiceImpl.class.getClassLoader().getResourceAsStream("portletClassName.properties"));
//
// // get the property value and print it out
// System.out.println(prop.getProperty("idreport"));
// System.out.println(prop.getProperty("idtemplate"));
//
//
// } catch (IOException ex) {
// ex.printStackTrace();
// }
//
// }
public static void main(String[] args) {
Properties prop = new Properties();
try {
// load a properties file from class path, inside static method
prop.load(GWTWorkspaceServiceImpl.class.getClassLoader().getResourceAsStream("portletClassName.properties"));
// get the property value and print it out
System.out.println(prop.getProperty("idreport"));
System.out.println(prop.getProperty("idtemplate"));
} catch (IOException ex) {
ex.printStackTrace();
ScopeProvider.instance.set("/d4science.research-infrastructures.eu/D4Research/Limnodata");
ApplicationProfileReader ap = new ApplicationProfileReader("Workspace-Explorer-App", "org.gcube.portlets.user.workspaceexplorerapp.server.WorkspaceExplorerAppServiceImpl");
System.out.println(ap.readProfileFromInfrastrucure());
}
catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

Loading…
Cancel
Save