Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problems to build working war file
Problems to build working war file [message #1800493] Sun, 30 December 2018 14:37 Go to next message
Sebastian von Klinski is currently offline Sebastian von KlinskiFriend
Messages: 12
Registered: October 2012
Junior Member
Hi folks,

I hope you had nice christmas holiday!

Due to the major changes in firefox we need to switch to the new version 3.7 of the rap runtime. So I installed eclipse 4.10, the RAP target and created the mail demo.
From the development environment everything works fine, of course. Unfortunately, I fail to create a working war file.

First I tried to use the WAR Product. But this is not running under Eclipse 4.10. The editor crashes when you open the .warproduct file. You just seed the tab, but no HMI-Form is created. I assume there are parsing problems.

The last working version of the warproduct editor runs under oxygen. But, RAP 3.7 would not run under oxygen.

Then I tried to switch to tycho to produce the war file. It worked so far. I used the following POM for the feature:

<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>Test.Feature</artifactId>
	<packaging>eclipse-feature</packaging>

	<parent>
		<groupId>Tycho_War_Test</groupId>
		<artifactId>Test.releng</artifactId>
		<version>1.0.0</version>
		<relativePath>../Test.releng</relativePath>
	</parent>

	<properties>
		<output-directory>${basedir}/target/WEB-INF</output-directory>
	</properties>

	<build>
		<plugins>
		
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.4.3</version>
				<executions>
					<execution>
						<id>copy-web-inf</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${output-directory}</outputDirectory>
							<resources>
								<resource>
									<directory>${basedir}/templates/WEB-INF</directory>
									<includes>
										<include>**</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-plugins</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${output-directory}</outputDirectory>
							<resources>
								<resource>
									<directory>${basedir}/target/site</directory>
									<includes>
										<include>*/**</include>
									</includes>
									<excludes>
										<exclude>*.jar</exclude>
									</excludes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2-beta-5</version>
				<configuration>
					<descriptors>
						<descriptor>assembly.xml</descriptor>
					</descriptors>
					<finalName>TestDemo</finalName>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>verify</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>


The war is generated and looks ok, if I compare it to existing and working war files.
But the dependency to javax.servlet ist not resolved. All bundes, that require javax.servlet are not startet with the message, that the requirement is not resolved (see shell output).

index.php/fa/34585/0/

Can anybody tell me where the I can tell the web app to retrieve the javax.servlet from the tomcat? (I tried it with tomcat 7 and 8.5.) Do You see a major bug in my POM?

I assume, that some manifest is not generated appropriately. But I don't know where the mistake is. Or are some launch configurations missing?

Just to be complete: I also tried to add javax.servlet to the war file. This worked so far that all bundles startet. But the entry point would still not be opened.

Many thanks for your help in advance!

Sebastian
Re: Problems to build working war file [message #1800494 is a reply to message #1800493] Sun, 30 December 2018 15:45 Go to previous messageGo to next message
Moritz Aleithe is currently offline Moritz AleitheFriend
Messages: 13
Registered: April 2015
Junior Member
Hi, Check out this thread for Info on libra war product: https://www.eclipse.org/forums/index.php/t/1093948/

Concerning tycho: i think you followed the same tutorial as i did to create the war. there is one lib in the template. This lib is too old , i replaced it with the newest version and it worked like a charm

Cheers and Happy new year
Re: Problems to build working war file [message #1800498 is a reply to message #1800494] Sun, 30 December 2018 20:17 Go to previous messageGo to next message
Sebastian von Klinski is currently offline Sebastian von KlinskiFriend
Messages: 12
Registered: October 2012
Junior Member
Hi Moritz,

Thanks a lot! That was a late christmas present for me! One of the best ;-)

I wish you soon a happy and healthy new year!

Sebastian
Re: Problems to build working war file [message #1800512 is a reply to message #1800498] Mon, 31 December 2018 13:10 Go to previous message
Moritz Aleithe is currently offline Moritz AleitheFriend
Messages: 13
Registered: April 2015
Junior Member
Hi Sebastian,

Thank you for confirming that this solves your problem. I've created a Bugzilla issue to include those demos into the RAP Git repository in the eclipse git. Also, there is now an issue and a pull request on Github, providing the new File.

Hopefully no one else runs into this time wasting issue.

Cheers,
Moritz
Previous Topic:How to Display Image in SWT TableColumn Sortable Column
Next Topic:TableCursor on RAP
Goto Forum:
  


Current Time: Fri Dec 06 11:05:55 GMT 2019

Powered by FUDForum. Page generated in 0.02081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top