<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Gradle build fails when using com.liferay.ext.plugin</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117658421" />
  <subtitle>Gradle build fails when using com.liferay.ext.plugin</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117658421</id>
  <updated>2026-04-04T07:21:16Z</updated>
  <dc:date>2026-04-04T07:21:16Z</dc:date>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119156355" />
    <author>
      <name>Lan Zhang</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119156355</id>
    <updated>2020-05-14T17:00:27Z</updated>
    <published>2020-05-14T17:00:27Z</published>
    <summary type="html">Hi Asier,I am having the same problem. Did you solve your issue? If so, can you post your solution?Thank you!!</summary>
    <dc:creator>Lan Zhang</dc:creator>
    <dc:date>2020-05-14T17:00:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117683251" />
    <author>
      <name>Asier Del Pozo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117683251</id>
    <updated>2019-11-06T22:44:52Z</updated>
    <published>2019-11-06T22:44:52Z</published>
    <summary type="html">It is in the first entry of this thread, that&amp;#39;s the actual build.gradle file. </summary>
    <dc:creator>Asier Del Pozo</dc:creator>
    <dc:date>2019-11-06T22:44:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117682102" />
    <author>
      <name>Greg Amerson</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117682102</id>
    <updated>2019-11-06T22:25:22Z</updated>
    <published>2019-11-06T22:25:22Z</published>
    <summary type="html">How are you adding the dependencies to the build file?  can you post an example of what you are trying that doesn&amp;#39;t work? </summary>
    <dc:creator>Greg Amerson</dc:creator>
    <dc:date>2019-11-06T22:25:22Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117683180" />
    <author>
      <name>Asier Del Pozo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117683180</id>
    <updated>2019-11-06T22:17:55Z</updated>
    <published>2019-11-06T22:17:55Z</published>
    <summary type="html">Thanks for your inputs! We all agree that using the ext is something to avoid. But it still is a tool that is available in 7.2, and the point of this post is that the ext building doesn&amp;#39;t work. &lt;br /&gt;This is how I can reproduce it with Liferay Developer Studio 3.6.2:1) Create a  Liferay Module Project &lt;br /&gt;2) Use a war-core-ext template&lt;br /&gt;3) Add UserLocalServiceImpl from the Liferay code4) Add dependencies to the build file.5) Build it.&lt;br /&gt;The dependencies in the build file are ignored.</summary>
    <dc:creator>Asier Del Pozo</dc:creator>
    <dc:date>2019-11-06T22:17:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117681255" />
    <author>
      <name>Greg Amerson</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117681255</id>
    <updated>2019-11-06T17:17:19Z</updated>
    <published>2019-11-06T17:17:19Z</published>
    <summary type="html">I like Dave&amp;#39;s idea of UserLocalServiceWrapper.  Much more upgrade friendly approach.  If you ever plan to upgrade liferay, do yourself a favor and use UserLocalServiceWrapper instead of ext-plugin.</summary>
    <dc:creator>Greg Amerson</dc:creator>
    <dc:date>2019-11-06T17:17:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117678253" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117678253</id>
    <updated>2019-11-06T10:28:37Z</updated>
    <published>2019-11-06T10:28:37Z</published>
    <summary type="html">&amp;#34;The deal is that we need to allow duplicated email addresses.&amp;#34;&lt;br /&gt;&lt;br /&gt;That&amp;#39;s fine, but there&amp;#39;s no reason to abuse or change Liferay for this...&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve done similar things by storing the real email address(es) separately from Liferay&amp;#39;s table and then use fake but unique values in Liferay&amp;#39;s store.  You can then use a user local service wrapper to resolve the storage and lookup issues and index post processors to update the indexing.&lt;br /&gt;&lt;br /&gt;Would I really implement this requirement over using an EXT plugin? Absolutely. EXTs really should be avoided that strongly.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-11-06T10:28:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117674403" />
    <author>
      <name>Asier Del Pozo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117674403</id>
    <updated>2019-11-05T21:40:06Z</updated>
    <published>2019-11-05T21:40:06Z</published>
    <summary type="html">To be clear... I am not modifying anything (yet). Just copied the UserLocalServiceImpl to the newly created ext plugin (using the LDS), added the dependencies to the build.gradle, tried to build, would not work.</summary>
    <dc:creator>Asier Del Pozo</dc:creator>
    <dc:date>2019-11-05T21:40:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117674259" />
    <author>
      <name>Asier Del Pozo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117674259</id>
    <updated>2019-11-05T19:17:49Z</updated>
    <published>2019-11-05T19:17:49Z</published>
    <summary type="html">Olaf,&lt;br /&gt;I totally agree that ext is something to be avoided. The deal is that we need to allow duplicated email addresses. Using a Wrapper for this makes it necessary to actually replicate almost everything from the original service in the wrapper, because there is no validation implementation that we can override safely due to a design decision. So more than a wrapper, we would have a wrapper that is actually a copy of the wrapped class.&lt;br /&gt;&lt;br /&gt;In any case, the issue is that the ext doesn&amp;#39;t even compile. It looks like the issue is that the dependencies that I am adding to build.gradle are ignored. I am not using the liferay-workspace, but just adding a Liferay Module Project from a war-core-ext template using the Liferay Developer Studio, and gradle build doesn&amp;#39;t work. Any ideas why?&lt;br /&gt;&lt;br /&gt;Best,&lt;br /&gt;Asier</summary>
    <dc:creator>Asier Del Pozo</dc:creator>
    <dc:date>2019-11-05T19:17:49Z</dc:date>
  </entry>
  <entry>
    <title>RE: Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117663750" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117663750</id>
    <updated>2019-11-05T07:23:52Z</updated>
    <published>2019-11-05T07:23:52Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="quote-title"&gt;Asier Del Pozo:&lt;/div&gt;&lt;blockquote&gt;&lt;br&gt;&lt;span style="font-size: 18px;"&gt;When running "gradlew deploy", the build will fail due to not finding the classes in javax.mail. Same dependencies added to a regular OSGI module, it works.&amp;nbsp;&lt;/span&gt;&lt;br&gt;What's wrong?&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Pardon my ignorance: I believe that the approach to &lt;em&gt;use an ext&lt;/em&gt; is wrong. (this is a safe assumption in more than 95% of ext plugins I've seen, thus it's my suggestion number 1)&lt;br&gt;Apparently you want to introduce some mail processing into UserLocalService. &lt;br&gt;Mail processing shouldn't be done synchronously anyway, in order to not slow down day-to-day operations. And UserLocalService additions shouldn't be done in an ext, but rather in a ServiceWrapper. &lt;br&gt;Unless I see a hint that points into the other direction, my suggestion is to implement a ServiceWrapper that drops a message on the MessageBus. Then implement the receiving end that asynchronously handles the required mail.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2019-11-05T07:23:52Z</dc:date>
  </entry>
  <entry>
    <title>Gradle build fails when using com.liferay.ext.plugin</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117658420" />
    <author>
      <name>Asier Del Pozo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117658420</id>
    <updated>2019-11-04T15:15:54Z</updated>
    <published>2019-11-04T15:15:54Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I created an ext plugin using Liferay Developer Studio 3.6.2 (not using blade or liferay-workspace). It created everything apparently fine, including the build.gradle file. &lt;br&gt;&lt;span style="font-size: 18px;"&gt;I add to the project&amp;nbsp; UserLocalServiceImpl from Liferay's 7.2 portal code, in the extImpl section. Nothing new.&lt;/span&gt;&lt;br&gt;If I add&amp;nbsp;the dependencies for &lt;span style="font-size: 18px;"&gt;UserLocalServiceImpl , this is what build.gradle looks like&lt;/span&gt;:&lt;pre&gt;&lt;code&gt;buildscript {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;dependencies {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;classpath group: "com.liferay", name: "com.liferay.gradle.plugins", version: "4.0.23"
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;repositories {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;maven {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;url "https://repository-cdn.liferay.com/nexus/content/groups/public"
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
}
apply plugin: "com.liferay.ext.plugin"
apply plugin: "eclipse"
eclipse {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;classpath {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;plusConfigurations += [configurations.portal]
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
}
repositories {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;maven {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;url "https://repository-cdn.liferay.com/nexus/content/groups/public"
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
}
dependencies {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;compileOnly group: 'javax.mail', name: 'mail', version: '1.4'
}&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;span style="font-size: 18px;"&gt; When running "gradlew deploy", the build will fail due to not finding the classes in javax.mail. Same dependencies added to a regular OSGI module, it works.&amp;nbsp;&lt;/span&gt;&lt;br&gt;What's wrong?&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Asier Del Pozo</dc:creator>
    <dc:date>2019-11-04T15:15:54Z</dc:date>
  </entry>
</feed>
