Forum Discussion

IonutSKL's avatar
IonutSKL
Occasional Contributor
2 years ago

Composite project cannot be load in pom file of maven

Hello guys, 

Recently I migrated my ReadyAPI project from one xml file to a composite project.


pom.xml file for the project as one file: 

<pluginRepositories>
		<pluginRepository>
			<!--SoapUI plugun-->
			<id>smartbear-sweden-plugin-repository</id>
			<url>http://www.soapui.org/repository/maven2/</url>
			
			<!--Ready API plugun-->
			<!--<id>SmartBearPluginRepository</id>-->
			<!--<url>http://smartbearsoftware.com/repository/maven2</url>-->
		</pluginRepository>
	</pluginRepositories>
	
	<properties>
		<maven-compiler-plugin-version>3.6.1</maven-compiler-plugin-version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>
	
	<!-- Dependencies -->
	<dependencies>
		<dependency>
			<groupId>org.reflections</groupId>
			<artifactId>reflections</artifactId>
			<version>0.9.9-RC1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>3.10-FINAL</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>2.5.6</version>
			<type>pom</type>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.8.1</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
			<version>3.0.5</version>
		</dependency>
	</dependencies>
	
	<!-- Build -->
	<build>
		<plugins>
			<plugin>
				<!--SoapUI plugun-->
				<groupId>com.smartbear.soapui</groupId>
				<artifactId>soapui-maven-plugin</artifactId>
				<version>5.5.0</version>
				<dependencies>
					<dependency>
						<groupId>com.jgoodies</groupId>
						<artifactId>forms</artifactId>
						<version>1.2.1</version>
					</dependency>
				</dependencies>
				<!--Ready API plugun-->
				<!--<groupId>com.smartbear</groupId>-->
				<!--<artifactId>ready-api-maven-plugin</artifactId>-->
				<!--<version>2.6.0</version>-->
				
				<executions>
					<execution>
						<id>test-report</id>
						<phase>test</phase>
						<configuration>
							<projectFile>${project.basedir}/src/test/PROJECT-API.xml</projectFile>
							<!-- Define the testSuits and testCase, if any to run particularly -->
							<!-- <testSuite>user</testSuite>
							<testCase>testCaseName</testCase> -->
							<projectProperties>
								<value>env=https://url.com</value>
								<value>property=${property}</value>
							</projectProperties>
							<!-- <soapuiProperties combine.children="append">
								<property>
									<name>soapui.properties</name>
									<value>${project.basedir}/src/resources/properties/xxx.properties</value>
								</property>
							</soapuiProperties> -->
							<junitReport>true</junitReport>
							<exportAll>true</exportAll>
							<printReport>true</printReport>
							<testFailIgnore>true</testFailIgnore>
							<outputFolder>${project.basedir}/target/site</outputFolder>
							<reports>${project.basedir}/target/site</reports>
						</configuration>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

In the above case Jenkins can load the project: 

00:31:00,847 INFO  [WsdlProject] Loaded project from [file:/F:/Jenkins/workspace/PROJECT-QA/property/XXX/runner_node/node/src/test/PROJECT-API.xml]


At this point, I updated the pom.xml file in order to check the folder with the composite project: 

<pluginRepositories>
		<pluginRepository>
			<!--SoapUI plugun-->
			<id>smartbear-sweden-plugin-repository</id>
			<url>http://www.soapui.org/repository/maven2/</url>
			
			<!--Ready API plugun-->
			<!--<id>SmartBearPluginRepository</id>-->
			<!--<url>http://smartbearsoftware.com/repository/maven2</url>-->
		</pluginRepository>
	</pluginRepositories>
	
	<properties>
		<maven-compiler-plugin-version>3.6.1</maven-compiler-plugin-version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>
	
	<!-- Dependencies -->
	<dependencies>
		<dependency>
			<groupId>org.reflections</groupId>
			<artifactId>reflections</artifactId>
			<version>0.9.9-RC1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>3.10-FINAL</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>2.5.6</version>
			<type>pom</type>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.8.1</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
			<version>3.0.5</version>
		</dependency>
	</dependencies>
	
	<!-- Build -->
	<build>
		<plugins>
			<plugin>
				<!--SoapUI plugun-->
				<groupId>com.smartbear.soapui</groupId>
				<artifactId>soapui-maven-plugin</artifactId>
				<version>5.5.0</version>
				<dependencies>
					<dependency>
						<groupId>com.jgoodies</groupId>
						<artifactId>forms</artifactId>
						<version>1.2.1</version>
					</dependency>
				</dependencies>
				<!--Ready API plugun-->
				<!--<groupId>com.smartbear</groupId>-->
				<!--<artifactId>ready-api-maven-plugin</artifactId>-->
				<!--<version>2.6.0</version>-->
				
				<executions>
					<execution>
						<id>test-report</id>
						<phase>test</phase>
						<configuration>
							<projectFile>${project.basedir}/src/test/PROJECT-API-FOLDER</projectFile>
							<!-- Define the testSuits and testCase, if any to run particularly -->
							<!-- <testSuite>user</testSuite>
							<testCase>testCaseName</testCase> -->
							<projectProperties>
								<value>env=https://url.com</value>
								<value>property=${property}</value>
							</projectProperties>
							<!-- <soapuiProperties combine.children="append">
								<property>
									<name>soapui.properties</name>
									<value>${project.basedir}/src/resources/properties/xxx.properties</value>
								</property>
							</soapuiProperties> -->
							<junitReport>true</junitReport>
							<exportAll>true</exportAll>
							<printReport>true</printReport>
							<testFailIgnore>true</testFailIgnore>
							<outputFolder>${project.basedir}/target/site</outputFolder>
							<reports>${project.basedir}/target/site</reports>
						</configuration>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

But in this case, Jenkins cannot load the composite project: 

ERROR [SoapUI] An error occurred [Failed to load project from file [file:/F:/Jenkins/workspace/PROJECT-QA/property/XXX/runner_node/node/src/test/PROJECT-API-FOLDER/]], see error log for details


Could you please advise me on how should be updated the pom.xml file in order to load the composite project? 

Thanks in advance

 

No RepliesBe the first to reply