Menu
  • HOME
  • TAGS

Include ftl file in ext plugin

Tag: maven,liferay,liferay-6

I have ext-plugin and I would like to override this file: portal-impl\src\com\liferay\portlet\dynamicdatamapping\dependencies\ddm\documentlibrary.ftl. After maven build, this file isn't include in my porta-impl-ext.jar.

In my portal-impl-ext's pom.xml I have this code:

<build>
    <plugins>
        <plugin>
            <groupId>com.liferay.maven.plugins</groupId>
            <artifactId>liferay-maven-plugin</artifactId>
            <version>${liferay.maven.plugin.version}</version>
            <configuration>
                <apiBaseDir>${basedir}/../my-ext-service</apiBaseDir>
                <implBaseDir>${basedir}</implBaseDir>
                <sqlDir>${basedir}/../my-ext/src/main/webapp/WEB-INF/sql</sqlDir>
                <webappBaseDir>${basedir}/../my-ext-web</webappBaseDir>
            </configuration>
        </plugin>
    </plugins>
</build>

In my portal-ext's pom.xml I have this:

<build>
    <plugins>
        <plugin>
            <groupId>com.liferay.maven.plugins</groupId>
            <artifactId>liferay-maven-plugin</artifactId>
            <version>${liferay.maven.plugin.version}</version>
            <configuration>
                <autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir>
                <appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir>
                <appServerLibGlobalDir>${liferay.app.server.lib.global.dir}</appServerLibGlobalDir>
                <appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir>
                <liferayVersion>${liferay.version}</liferayVersion>
                <pluginName>my-ext</pluginName>
                <pluginType>ext</pluginType>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5</version>
            <configuration>
                <encoding>UTF-8</encoding>
                <source>1.6</source>
                <target>1.6</target>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.5</version>
            <configuration>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
    </plugins>
</build>

I tried to change include section, but it didn't work. It is possible to include this file?

Thanks in advance for any help!

Best How To :

The solution is moving file from source folder to resource folder.

Trying to access Oracle's Maven repository

oracle,maven,repository

From your settings.xml I can see that you use Artifactory. Why won't you define Oracle's repository as a remote in Artifactory? That will make the access much easier. Here's a simple guide on how to do so. And, of course, here's the official user guide on it. I am with...

Maven Nested Modules - Second Level Children

maven,directory-structure,multi-module

Yeah, be there some time ago. To be honest, after trying things, I believe it's really matter of taste. For me it's much more clear to stick with root's pom.xml as a parent and not doing dedicated module for it. It's also the actual default of Maven, since <relativePath> for...

How to create zip file with maven: Java Client + JRE

java,maven,zip,client

Take a look at Apache Maven Assembly Plugin. For datailed instructions, see here and here....

how to manage multiple war application in tomcat server?

java,maven,tomcat,servlets

Use same tomcat server, but copy and rename your web application to something different. For eg, original application name app, copy and rename as following. webapp -> app1 app2 app3 Running tomcat server per each war application need to maintain many server. This is a bad idea....

Different ways to override java version especified in parent pom

java,maven,pom.xml

Properties are just properties, which do not mean much unless you use them somewhere. The important thing is that you set the version in the maven-compiler-pluginconfiguration: <properties> <jdk.version>1.6</jdk.version> </properties> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>${jdk.version}</source>...

spring.xml not packaged in executable jar

java,spring,maven,executable-jar

If you're using maven, you can put your XML files in src/main/resources. By default, all files placed in the resources folder will be included in the jar file and will be accessible by your application.

How do you create a custom project type (from my plugin) without opening Eclipse?

java,eclipse,maven,eclipse-plugin

Here are my findings :- I went through the advice of Amos M. Carpenter and searched for the source code of the plugin that I have written. After that, I did a debug (Plugin Debug) and searched for the methods that are called when we create a project from the...

Maven local artifactory file edit

java,maven,artifactory

First, do not upload maven-metadata files. They are generated by Artifactory for you. Second, since Artifactory usually manages uneditable binary files, there is no edit functionality in Artifactory. I am with JFrog, the company behind Bintray and [artifactory], see my profile for details and links....

Maven multi-project depths

maven

the reactor project (the root of the multimodule project) must have pom packaging. So your nested structure is invalid since A is not of type pom and I'm pretty sure you won't get it to work this way. Second point is that Maven is a modularized build system and uses...

sonar maven analysis only picks .java file

maven,groovy,sonarqube,sonarqube-5.0

Since it was a multi module project, I had to include the properties sonar.sources and sonar.tests in all the module's pom.xml file. <properties> <sonar.sources>src/main</sonar.sources> <sonar.tests>src/test</sonar.tests> </properties> ...

How to configure user bundles so that they can be autostarted with higher priority - hence earlier than others?

java,maven,osgi,equinox

You were right. Start level in OSGi is defined by the @2 you put in your config.ini file. The default (by default) is a start level of 4. It seems that your problem is more related to a directory path problem to access the bundle rather than the load order...

How to access jenkins parent job build id in a MultiJob?

maven,jenkins

I'm using this method to pass the build ID from a parent multi-job into the children jobs: In the parent job, add a "Execute Shell" build step that saves the ${BUILD_ID} into a file, like this: cat > build.properties << _EOF_ PARENT_BUILD_ID=${BUILD_ID} _EOF_ For the "MultiJob Phase" -> "Phase Jobs",...

Cannot import correctly maven properties with PropertiesFactoryBean and PropertyPlaceholderConfigurer in spring

spring,maven,datasource,placeholder,jrebel

This can happen if you're using resource filtering with JRebel, as the application looks up the bean's xml in its unfiltered form from the project working directory (as per rebel.xml). To resolve this, you'll need to update rebel.xml for that module, adding exclude for that particular XML file - see...

Compilation Error on maven

java,eclipse,maven,maven-plugin

Check with that below dependency is it present or not ?? <dependency> <groupId>javax.ws.rs</groupId> <artifactId>javax.ws.rs-api</artifactId> <version>2.0-m01</version> </dependency> ...

How to make dependency transitive in Gradle

maven,javamail,android-gradle,build.gradle,gmail-api

The javax.mail-api-1.5.3 can also be downloaded from existing repositories (probably jCenter or mavenCentral) described in your build file. If you aren't tied to using your downloaded version in /libs, you might do this in your build file: dependency { compile 'javax.mail:javax.mail-api:1.5.3' } The default behavior in this case is to...

Missing artifact error while adding a depentency in pom

java,maven

You have used mismatched versions: sauce-connect-plugin presents in: http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect-plugin/ which have only versions of 1.0.11, 1.0.12, 1.0.13 and 1.0.14. But you have tried to download 2.1.18 What you mentioned with the URL http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect/3.1.32/ will not represent for sauce-connect-plugin. It will represent for only sauce-connect So you should try with following...

IntelliJ - use imported modules as dependencies like maven projects in Eclipse

eclipse,scala,maven,intellij-idea,sbt

It should work out of box for dependencies, which are imported to the project as modules, no additional settings needed. At least for Java. Just do not run a Maven goal, that would use dependencies from the repository. ...

How to create service builder for liferay plugin project with maven

liferay,liferay-ide,liferay-service-builder

Frankly speaking Liferay-Maven combination is not so fully supported by Liferay IDE in eclipse. Originally Liferay IDE has been created for only ANT support but since maven support has been introduced there are many things missing. This issue which you have raised is same for following options as well. JSF...

How can I change the zIndex attribute of aui-datepicker in Liferay Portlet 6.2

datepicker,liferay,z-index,liferay-aui,alloy-ui

You need to change the zIndex on the DatePicker's internal Popover: new Y.DatePicker({ // ... popover: { zIndex: 1 } }); See the example page and API docs for more details....

Eclipse error using Maven filtering in persistence.xml

maven,jar,persistence,filtering

I have solved it this way: in persistence.xml substitute the whole <jar-file> tag, i.e. <persistence-unit name="PersistenceUnit" transaction-type="JTA"> ... <!-- here is where the jar file is supposed to go --> ${importjarfile} ... </persistence-unit> Then include in pom.xml the property <properties> <!-- jar of persistence --> <importjarfile><![CDATA[<jar-file>lib/${project.persistencejar}.jar</jar-file>]]></importjarfile> </properties> or alternatively in...

Liquibase 3.3.3 refusing to run “due to maven configuration”

maven,liquibase

Check here: CORE-2360 It looks like <skip> is set to true by default in 3.3.3 version. Just use 3.3.4 and it should be OK.

Unable to download com.thoughtworks.paranamer#paranamer;2.5.6 with sbt

maven,sbt

Author of Paranamer here. I've no idea why this happened. Could be related to https://issues.sonatype.org/browse/OSSRH-16113 Paul ...

Maven error with Java 8

java,maven,java-8

Add plugin configuration for the compiler: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <verbose>true</verbose> <fork>true</fork> <source>1.8</source> <target>1.8</target> </configuration> </plugin> ...

Cons of a liferay cms while website development using Community Edition

content-management-system,liferay

I am not sure, if this question really belongs here, anyway here are few my points: you have to get the proper Liferay mindset to get things work insufficient developer documentation (they are trying to improve it) a lot of code in JSP files little (if any) support for TDD...

Importing an OSGI bundle into eclipse

java,eclipse,maven,dependency-management,osgi-bundle

You will need to also install bundles that export these packages into your target platform.

maven-war-plugin include subdirectories

java,maven,maven-war-plugin

You can force maven-war-plugin to add empty folders if you say explicitly by using the appropriate configuration parameter: <project> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <includeEmptyDirectories>true</includeEmptyDirectories> .. </configuration> </plugin> </plugins> </build> ... </project> ...

How to deploy public-project Maven artifacts to a different remote repository?

maven

To deploy the created artifacts into another maven repository you need to add or change the <distributionManagement> section of the pom. Or add one and replace the one in the parent. The result will be that the deploy goal will upload the artifacts to the new location. Furthermore I would...

Unable to load servlet listener class: com.sun.faces.config.ConfigureListener

maven,jsf,tomee

Simply get rid of the in the exception mentioned <listener> entry in webapp's web.xml. TomEE ships with MyFaces, not Mojarra. That Mojarra-specific <listener> entry in web.xml is usually auto-included by some IDEs trying to be smarter than they are and/or left behind in poor quality open source projects. Be careful...

maven activate by property value and version

maven,maven-3

I believe there is no such functionality with out-of-the-box Maven. Maven is usually really simple when looking into its internals. Profile activation based on property is basically about two strings equality, nothing more, no extra logic here. I can image a solution that introduces own, simple Maven plugin that does...

Dyanamic web module 3.0 required java 1.6 or newer

java,maven,spring-mvc

When I got this error setting java version in pom fixed my problem In pom.xml you can set java version you can do this by setting below properties <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> or by providing version in maven-compiler-plugin....

In liferay market place, I am unable to submit the project

liferay,liferay-6

A Google search for "liferay plugin package file name format" reveals this page: Marketplace basics - Development | Liferay And there you can find: WAR file names must conform to the following naming convention: context_name- plugin_type -A.B.C.D.war Where: context_name - Alpha-numeric (including - and _) short name of your app....

is it possible to filter artifacts in Maven-release-plugin?

maven,maven-release-plugin

I believe what you actually want to do is to release all modules (to handle proper versioning, dependencies, etc.) and only skip deploying some of them. If so, you can skip particular module for maven-deploy-plugin by its configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> or user property: <properties> <maven.deploy.skip>true</maven.deploy.skip>...

Maven: copy zipped resource subdirectories into target folder

java,maven,zip

Please read the following article : http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html This has the complete information for creating a zip artifact. ...

Flink error - org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4

maven,hadoop,flink

Have you tried the Hadoop-2 build of Flink? Have a look at the downloads page. There is a build called flink-0.9.0-milestone-1-bin-hadoop2.tgz that should work with Hadoop 2.

@RestController throws HTTP Status 406

java,spring,rest,maven

The issue is with the dependencies that you have in pom.xml file. In Spring 4.1.* version the pom.xml dependency for Jackson libraries should include these: <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.4.1.1</version> </dependency> You...

Eclipse Kepler is unable to set the Java jdk 1.8 when maven project is updated

java,maven,java-8,eclipse-kepler

With the help of Hogler's comment above I am able to reswolve this issue Just did this : https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler...

deploying ejb-module for ObjectDB fails: PersistenceProvider not found

java,maven,ejb,wildfly,objectdb

Wow just writing about it here on SO helped me find my error :) I just have to force maven to include all dependencies. This can be done by including the following plugin into the pom.xml: <plugins> ... <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> <configuration> <descriptorRefs>...

Logging with log4j2 in Spring Boot app

java,spring,maven,logging,log4j2

You have multiple SLF4J bindings in your classpath. Logback classic, which is included by default in spring boot Log4j that you want to use. You need to have a single one in the classpath, by using maven dependency exclusion....

Use alternative producers of EntityManager / EMF in integration tests

java,maven,jpa,integration-testing,cdi

After some research i found that DeltaSpike already has module called 'Test-Control', which enable use CDI in tests. So i decided to extend current EMF producer to read name of persistence unit from property file which contains configuration. Different property files in src/main/resources and src/test/resources lets me use different persistence...

How manage styles in Vaadin portlet in Liferay

css3,liferay,vaadin,portlet

I found solution, wich is not perfect, but still enough for my purposes: 1.Do copy Valo Theme from vadin-themes-7.0.5..jar as explained on http://www.rapidpm.org/2014/05/25/vaadin-valo--the-new-theme-%28since-vers.html 2. Edit styles.css in valo root theme. 3. Add !important clause into .valo .v-textfield {..} class definition as written on http://www.liferay.com/community/forums/-/message_boards/message/15001322 for border-radius and height. It changes...

Switching branches in Git with external dependencies

git,maven,dependencies,git-branch

It actually depends on an IDE you're using. I haven't noticed any issue with this when using IntelliJ IDEA. It handles any pom.xml changes on the filesystem level very smoothly. However, some time ago, when I was using Eclipse, I believe I saw such a problem you're talking about. Then...

Grails 3.0 Searchable plugin

maven,grails

The page you took the instructions from contains the following disclaimer: This portal is for Grails 1.x and 2.x plugins. Grails 3 plugins are available in Bintray https://bintray.com/grails/plugins There currenly is no version of this plugin for grails 3.x...

How to use a local tomcat version with maven

java,maven,tomcat

I found a solution here: https://tomcat.apache.org/maven-plugin-trunk/executable-war-jar.html Ex you set the serverXml to point to your local tomcat installation. <project> ... <packaging>war or pom</packaging> ... <build> ... <plugins> ... <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.3-SNAPSHOT</version> <executions> <execution> <id>tomcat-run</id> <goals>...

Maven can not find the 'main' class for my Java app

java,maven

Class names are case-sensitive. Your class is called Main so the manifest should be: <manifest> <mainClass>com.ollio.nlp.Main</mainClass> </manifest> ...

Form submit portlet with Spring MVC

java,jsp,spring-mvc,liferay,portlet

Which version of Liferay you are using? if it is > 6.2 GA1 Then in your liferay-portlet.xml file, please add this attribute and recompile and test again. <requires-namespaced-parameters>false</requires-namespaced-parameters> Liferay adds namespace to the request parameters by default. You need to disable it. ...

spring-boot integration testing using rest-assured

maven,spring-boot,h2

Are you using Eclipse? I somehow noticed that src/main/resources/application.properties gets excluded from the Java Build Path, if you generate the project with the "eclipse:eclipse" maven goal. To workaround this you can either add a src/test/resources/application.properties or correct the Java Build Path. I don't know if this behavior is intended. I...

Maven hamcrest parent depedency failed to resolve

maven,maven-3,dependency-management

Correct. There is no such artifact of jar type which is default if you don't specify any. This one will work: <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-parent</artifactId> <version>1.3</version> <type>pom</type> </dependency> ...

Lifefay freemarker ADT: methods unavailable?

java,liferay,liferay-6,freemarker

Asset renderer renders asset entries of the given class (ei. JournalArticle or DLFileEntry in your case). Asset renderer itself is not instance of the given class (in Java sense). It is always instance of com.liferay.portlet.asset.model.AssetRenderer. To get instance of the related DLFileEntry, you must use DLFileEntryLocalService to find it. <#--...

Failed to execute goal on project. Unable to find POM in project

java,maven,jboss

You need to add redhat repo in your pom.xml or setting.xml. Install and Use the Maven Repository such as: <repositories> <repository> <id>jboss-enterprise-techpreview-group</id> <name>JBoss Enterprise Technology Preview Maven Repository Group</name> <url>http://maven.repository.redhat.com/techpreview/all/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots>...

exec-maven-plugin error, even on working example

java,eclipse,maven

The error log which you posted says the following: java.lang.ClassNotFoundException com.jadex.qna.QNAProject.App So it clear what the root source of the error is. You are trying to execute the main() method of a class whose class file Maven cannot find. As this SO article discusses, you can try explicitly compiling first,...