Fórum

Installation and Activation of Maven artifacts for 6.2.1

Philip Teagle, modificado 9 Anos atrás.

Installation and Activation of Maven artifacts for 6.2.1

New Member Postagens: 19 Data de Entrada: 28/07/10 Postagens Recentes
I am using the Vaadin Portlet archetype with Maven and eclipse Luna to create and build a Liferay Vaadin portlet. I have downloaded and installed Liferay 6.2.1 maven artifacts according to instructions, but 6.0 Facets keep showing up in my project. When I try to deploy and run on a LR 6.2 Tomcat instance it fails. Any suggestions on what might be the issue?
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Installation and Activation of Maven artifacts for 6.2.1

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Do you have your versions set correctly in the pom file?

By 6.0 facets, I'm assuming you're talking about Eclipse facets, right?

I've been using 6.2 maven artifacts and everything seems to be working fine, although I would say that their maven setup instructions are something to be desired. I mean, most of us just want a step by step guide (put this in .m2/settings.xml, put this in your pom.xml file after creating archetype, ...). Instead they have a big long page dedicated to maven setup that ends up making things a lot harder than what they need to be, imho.

Oh, I guess I should mention this... When creating vaadin standalone portlets, I generate a project using the liferay portlet archetype. I then open the pom.xml and paste in stuff from a Vaadin project pom (that handles the vaadin theme, widgetsets, etc.). Seemed to be the easiest way to get all of the pieces working together.

Here's the relevant stanza from my pom:

	<build>
		<finalname>${project.artifactId}-portlet-${project.version}</finalname>
		<plugins>
			<plugin>
				<groupid>com.liferay.maven.plugins</groupid>
				<artifactid>liferay-maven-plugin</artifactid>
				<version>${liferay.maven.plugin.version}</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>build-css</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<apibasedir>${basedir}/../vaadin7-control-panel-portlet-service</apibasedir>
				</configuration>
			</plugin>
			<!-- As we are doing "inplace" GWT compilation, ensure the widgetset -->
			<!-- directory is cleaned properly -->
			<plugin>
				<artifactid>maven-clean-plugin</artifactid>
				<version>2.4.1</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>src/main/webapp/VAADIN/widgetsets</directory>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupid>org.apache.maven.plugins</groupid>
				<artifactid>maven-war-plugin</artifactid>
				<version>2.2</version>
				<configuration>
					<failonmissingwebxml>false</failonmissingwebxml>
				</configuration>
			</plugin>
			<plugin>
				<groupid>com.vaadin</groupid>
				<artifactid>vaadin-maven-plugin</artifactid>
				<version>${vaadin.plugin.version}</version>
				<configuration>
					<extrajvmargs>-Xmx2048M -Xss1024k</extrajvmargs>
					<!-- <runTarget>mobilemail</runTarget> -->
					
					<!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This way compatible with Vaadin eclipse plugin. -->
					<webappdirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappdirectory>
					<hostedwebapp>${basedir}/src/main/webapp/VAADIN/widgetsets</hostedwebapp>
					
					<!-- Most Vaadin apps don't need this stuff, guide that to target -->
					<persistentunitcachedir>${project.build.directory}</persistentunitcachedir>
					<deploy>${project.build.directory}/gwt-deploy</deploy>
					
					<!-- Compile report is not typically needed either, saves hunreds of mb disk -->
					<compilereport>false</compilereport>
					<noserver>true</noserver>
					
					<!-- Remove draftCompile when project is ready -->
					<draftcompile>false</draftcompile>
					
					<style>OBF</style>
					<strict>true</strict>
					<!-- <runTarget>http://localhost:8080/</runTarget>  -->
				</configuration>
				<executions>
					<execution>
						<configuration>
							<!-- if you don't specify any modules, the plugin will find them -->
							<!-- <modules> <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module> 
								</modules> -->
						</configuration>
						<goals>
							<goal>clean</goal>
							<goal>resources</goal>
							<goal>update-theme</goal>
							<goal>update-widgetset</goal>
							<goal>compile-theme</goal>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginmanagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
				<plugin>
					<groupid>org.eclipse.m2e</groupid>
					<artifactid>lifecycle-mapping</artifactid>
					<version>1.0.0</version>
					<configuration>
						<lifecyclemappingmetadata>
							<pluginexecutions>
								<pluginexecution>
									<pluginexecutionfilter>
										<groupid>com.vaadin</groupid>
										<artifactid>
											vaadin-maven-plugin
										</artifactid>
										<versionrange>
											[7.2.6,)
										</versionrange>
										<goals>
											<goal>resources</goal>
											<goal>update-widgetset</goal>
											<goal>compile</goal>
											<goal>update-theme</goal>
											<goal>compile-theme</goal>
										</goals>
									</pluginexecutionfilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginexecution>
							</pluginexecutions>
						</lifecyclemappingmetadata>
					</configuration>
				</plugin>
				<plugin>
					<artifactid>maven-eclipse-plugin</artifactid>
					<configuration>
						<wtpversion>2.0</wtpversion>
						<additionalprojectnatures>
							<projectnature>com.vaadin.integration.eclipse.widgetsetNature</projectnature>
						</additionalprojectnatures>
						<additionalbuildcommands>
							<buildcommand>com.vaadin.integration.eclipse.widgetsetBuilder</buildcommand>
							<buildcommand>com.vaadin.integration.eclipse.addonStylesBuilder</buildcommand>
						</additionalbuildcommands>
					</configuration>
				</plugin>
			</plugins>
		</pluginmanagement>
	</build>