Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2546

Add a liferay profile to each portlet pom.xml descriptor in order to declare a dependency on the liferay-faces-bridge-ext artifact

Details

    Description

      The liferay-faces-bridge-ext dependency needs to be added automatically to portlet demos when the liferay profile is specified on the Maven command line. Currently this is done by the following profile in the parent-most pom.xml descriptor:

      <profile>
      	<id>liferay-portlet-war-redeploy</id>
      	<activation>
      		<file>
      			<exists>target/liferay-portlet-war-redeploy-activation.tmp</exists>
      		</file>
      	</activation>
      	<dependencies>
      		<dependency>
      			<groupId>com.liferay.faces.bridge</groupId>
      			<artifactId>liferay-faces-bridge-ext</artifactId>
      			<version>${liferay.faces.bridge.ext.version}</version>
      		</dependency>
      	</dependencies>
      	...
      </profile>
      

      However, this technique does not work if, at the command line, you type:

      cd demos
      mvn clean
      deploy.sh
      

      This is because the target/liferay-portlet-war-redeploy-activation.tmp gets deleted when the mvn clean command is executed.

      In order to fix this, the aforementioned dependency must be removed from the liferay-portlet-war-redeploy profile and the following profile should be added to each portlet (demos and tck) pom.xml descriptor:

      <profiles>
      	<profile>
      		<id>liferay</id>
      		<dependencies>
      			<dependency>
      				<groupId>com.liferay.faces.bridge</groupId>
      				<artifactId>liferay-faces-bridge-ext</artifactId>
      				<version>${liferay.faces.bridge.ext.version}</version>
      			</dependency>
      		</dependencies>
      	</profile>
      </profiles>
      

      Attachments

        Activity

          People

            kyle.stiemann Kyle Stiemann (Inactive)
            neil.griffin Neil Griffin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                portal-1.0.0
                portal-2.0.0
                portal-3.0.0
                bridge-impl-2.0.0
                bridge-impl-3.0.0
                bridge-impl-4.0.0
                bridge-impl-5.0.0