maven,jsf,tomcat,jsf-2,aspectj , Is it possible to make JSF FacesServlet work with AspectJ?


Is it possible to make JSF FacesServlet work with AspectJ?

Question:

Tag: maven,jsf,tomcat,jsf-2,aspectj

I'm trying to write sample application showing the intergration between JSF's FacesServlet running on tomcat and AspectJ. I've created two projects:

1) JSF project:

pom.xml:

<dependencies>
        <!-- JSF 2.0 dependencies -->
    <dependency>
        <groupId>com.pac</groupId>
        <artifactId>aspectj-lib</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
</dependencies>

<build>
    <finalName>JavaServerFaces</finalName>

    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <version>1.7</version>
            <configuration>
                <aspectLibraries>
                    <aspectLibrary>
                        <groupId>com.pac</groupId>
                        <artifactId>aspectj-lib</artifactId>
                    </aspectLibrary>
                </aspectLibraries>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.1</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
</build>

ManagedBean:

@ManagedBean
@SessionScoped
public class HelloBean implements Serializable {

    private static final long serialVersionUID = 1L;

    private String name;

    public String getName() {
        test();
        return name;
    }

    public void setName(String name) {
        test();
        this.name = name;
    }

    public int test(){
        System.out.println("Test is invoked");
        return 10;
    }

}

2) aspectj-lib which contains all aspects

pom.xml:

<dependencies>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.8.2</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.8.2</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>1.8.2</version>
        </dependency>
  </dependencies>

  <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
  </build>

TestAspect.aj:

public aspect TestAspect {
    pointcut t(): execution(public !static * *(..));

    int around() : t() {
        System.out.println("Test string");    
        int v = proceed();
        return v * 2;
    }
}

So, I expected the aspect should have come into play when test() was being called. But it didn't, all I saw in the console's output was:

Test is invoked
Test is invoked
Test is invoked
Test is invoked

Test string defined in the aspect was not being printed.

How can I integrate JSF and AspectJ? Is there a documentation?

Maybe I should add additional confiduration information in web.xml/faces-config.xml or create another config file to make it work?


Answer:

Documentation reference

The answer was quite simple. All we had to do was to replace compile-time weaving with load-time weaving. Load-time weaving means that we're going to weave our classes when JVM tries to load their. Replace is neccesary, beacause compile-time weaving and load-time weaving are not compatible with each other. So, assume we have two projects:

aspects-lib
    |---pom.xml
    |---src/main/aspect
             |---TestAspect.aj   -- aspect itself


JavaServerFaces
    |---pom.xml
    |---src/main/java
    |          |---TestBean.java    -- The bean which methods we want to intercept
    |---src/main/resources
    |          |---META-INF/aop.xml -- That file configures the load-time weaving
    |---src/main/webapp
               |
        webpages, omited

Let's consider the configuration now.

aop.xml (load-time weaving configuration):

<aspectj>
  <aspects>
    <aspect name="fully.qualified.ascpect.name"/>
  </aspects>

  <weaver options="-verbose">
    <include within="package.you.want.to.weave.*"/>
  </weaver>
</aspectj>

aspect-lib/pom.xml:

 <dependencies>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.8.2</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.8.2</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>1.8.2</version>
        </dependency>
  </dependencies>

  <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.7</version>
                <configuration>
                    <!-- IMPORTANT!!!!!! -->
                    <!-- DISABLING COMPILE TIME WEAVING -->
                    <outxml>true</outxml>
               <XterminateAfterCompilation>true</XterminateAfterCompilation>
                    <!-- DISABLING COMPILE TIME WEAVING -->
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
  </build>

JavaServerFaces/pom.xml:

    <dependency>
            <!-- aspect-lib dependency -->
    </dependency>

    <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>aspectj-maven-plugin</artifactId>
         <version>1.7</version>
         <configuration>
            <outxml>true</outxml>
            <XterminateAfterCompilation>true</XterminateAfterCompilation>
            <aspectLibraries>
                <aspectLibrary>
                    <!-- your aspect lib -->
                </aspectLibrary>
            </aspectLibraries>
         </configuration>

         <executions>
             <execution>
                 <goals>
                     <goal>compile</goal>
                 </goals>
             </execution>
         </executions>
    </plugin>

And one more thing: You should add the following option to the JVM in order to allow your servlet-container/app-server perfrom load-time weaving:

-javaagent:pathto/aspectjweaver.jar

The corresponding jar-file should be added to server's resources.


Related:


h:selectmanyListbox make “choose” option unselectable when at least one option is selected


jsf,jsf-2,selectmanylistbox
Is it possible to have in <h:selectManyListbox> a default option like "--choose--" which can be selected when no option is selected. When the some value is chosen, then it must be unselectable. <h:selectManyListbox value="#{bean.value}" class="form-control"> <f:selectItems value="#{bean.dropdownValues}" var="value" itemLabel="#{value}" itemValue="#{value}"/> </h:selectManyListbox> ...

How to display PDF in JSF, with content from ServletResponse


jsf,pdf,jsf-2,richfaces
In my application, I use jsf & richfaces, I want to display a generated pdf in web browser , I have generated this PDF in serverside and it is available in ServletResponse, but I am unable to display it in my web page. I have tried this question but, it...

how to manage multiple war application in tomcat server?


java,maven,tomcat,servlets
I use tomcat as web server,I want to deploy many same war file in tomcat server with different config. How to do this in the best way possible manner? So I want to run tomcat server per each war application, my means is tomcat1 handle the .war1 in webapp and...

Eclipse error using Maven filtering in persistence.xml


maven,jar,persistence,filtering
I have a Maven project with JPA using hibernate. I had to specify a jar file to load external classes in persistence.xml located in src/main/resources/META-INF <persistence unit name="PersistenceUnit" transaction-type="JTA" ... <jar-file>lib/${project.persistencejar}.jar</jar-file> using Maven filtering (the filename can change based on various Maven settings). I instruct then Maven to filter by...

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


java,maven
I am new to Java and this is my first time using Maven. I have tried to build a working pom.xml file by stitching together various things I've read and copy-and-pasting them to pom.xml. This is not working. I put my java files in this folder: src/main/java/com/ollio/nlp/ my main class...

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


maven,maven-release-plugin
Is it possible to exclude some artifacts during release:prepare or release:perform? We don't need all the artifacts put on nexus, only two main ones.

How to make dependency transitive in Gradle


maven,javamail,android-gradle,build.gradle,gmail-api
I have downloaded javax.mail-api-1.5.3.jar file copied into app/libs folder and then right click , add as library. Then following line appears under dependency compile files('libs/javax.mail-api-1.5.3.jar') I want to make this dependency transitive.Because I have mention javax.mail-api library dependencies in pom.xml file like follows. <dependencies> <dependency> <groupId>javax.mail</groupId> <artifactId>javax.mail-api</artifactId> <version>1.5.3</version> <scope>test</scope>...

Double dispatching in jsf


jsf,jsf-2
Is it possible in Mojarra-2.1. If I do dispatching to another view from the action method by clicking action buttons: <h:commandButton value="dispatch" action="#{myBean.action()}" /> The bean: @ManagedBean @RequestScoped public class MyBean{ public String action(){ //do some return "view"; } } my browser then recieve the content of the view view....

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


maven,hadoop,flink
I am trying to run a flink job using a file from HDFS. I have created a dataset as following - DataSource<Tuple2<LongWritable, Text>> visits = env.readHadoopFile(new TextInputFormat(), LongWritable.class,Text.class, Config.pathToVisits()); I am using flink's latest version - 0.9.0-milestone-1-hadoop1 (I have also tried with 0.9.0-milestone-1) whereas my Hadoop version is 2.6.0 But,...

Dyanamic web module 3.0 required java 1.6 or newer


java,maven,spring-mvc
In my project i got following error in Markers. I also set java 1.6 in project facets ,java compliler and buildpath but not solve this error. ...

maven-war-plugin include subdirectories


java,maven,maven-war-plugin
I'm having an issue where I need to include some folders in my Maven generated WAR using the maven-war-plugin but it is only including the files in the directory and not the sub-directories as well. This is how I have configured the war-plugin within the pom. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration>...

Parameters from f:param not submitted with AJAX request when form enctype is multipart/form-data


ajax,jsf,jsf-2,jsf-2.2,wildfly
I'm running Wildfly 8.2 and I'm using the JSF version bundled with it, 2.2.8-jbossorg-1. I have the following facelet: <h:form enctype="multipart/form-data"> <h:commandButton value="Submit"> <f:param name="myparam" value="true"/> <f:ajax execute="@this" render="@this"/> </h:commandButton> </h:form> When I press the submit button, several parameters are submitted, but not myparam. If I remove enctype="multipart/form-data" from the...

JSF link to external site without showing username and password in the URL


jsf,post,single-sign-on,commandlink
I was able to do a SSO(Single sign on) on click of external link from the code below. SSO works but username/password is seen on url. https://example.org/index.php?userLogin=user1&userPassword=pass123 <h:outputLink styleClass="ui-menuitem-link ui-corner-all" value="https://example.org/index.php"> <h:outputText value="Ext Tool" /> <h:outputText styleClass="ui-icon ui-icon-suitcase" style="float:left" rendered="#{userBean.in}" /> <f:param name="userLogin" value="#{userBean.user.eUser}" /> <f:param...

Trying to access Oracle's Maven repository


oracle,maven,repository
I'm attempting to access Oracle's repository. Oracle doesn't make it easy. However, I'm attempting to follow the documentation that Oracle provided. I've: Approved the licensing agreement on my system (in case there's some sort of cookie that needs to be set). Set both M2_HOME and MAVEN_HOME to /usr/share/apache-maven. Created an...

Missing artifact error while adding a depentency in pom


java,maven
Am trying to add a dependency sauce-connect-plugin in to pom.xml file <groupId>com.saucelabs.maven.plugin</groupId> <artifactId>sauce-connect-plugin</artifactId> <version>2.1.18</version> </dependency> But building the pom file am getting Missing artifact com.saucelabs:sauce-connect:jar:3.1.32 Also i mentioned the repository <repositories> <repository> <id>saucelabs-repository</id> <url>https://repository-saucelabs.forge.cloudbees.com/release</url>...

af:convertNumber element removes zero in the end of the value


jsf,numbers,converter,oracle-adf
My code: <af:inputText id="it1" label="Test"> <af:convertNumber groupingUsed="true" type="number" messageDetailConvertNumber="#,###,##" maxFractionDigits="2"/> </af:inputText> When I type 100,51 -- everything is fine, but if I would type 100,50, then '0' will be removed and entered value will be 100,5. How can I leave this '0' in the end? I need <af:convertNumber> element for...

Logging with log4j2 in Spring Boot app


java,spring,maven,logging,log4j2
I am trying to learn Spring Boot. But I completely mess up with a loggers dependencies. I have a simple pom: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!-- Logging --> <dependency>...

deploying ejb-module for ObjectDB fails: PersistenceProvider not found


java,maven,ejb,wildfly,objectdb
I have two almost identical projects (both created with maven, both very simple) where one deploys without any problems, the other gives me a PersistenceException: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'com.objectdb.jpa.Provider' not found And I just don't see what I am missing here. The working project is web application. I got it...

Liquibase 3.3.3 refusing to run “due to maven configuration”


maven,liquibase
Did something change in liquibase between version 2 and version 3? I have the following in my pom file... <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>3.3.3</version> <configuration> <changeLogFile>src/main/resources/liquibase/liquibase-changesets.xml</changeLogFile> <driver>${db.liquibase.driver}</driver> <username>${db.liquibase.username}</username>...

sonar maven analysis only picks .java file


maven,groovy,sonarqube,sonarqube-5.0
I am trying to run a sonar maven analysis on my multilanguage project which contains many languages like *.java, *.groovy, *.js etc. I have installed all the languages plugin in my sonar and configured my pom sonar.sources parameter as src/main,src/test but still it picks up only java files. In the...

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


maven,jsf,tomee
I'm using apache-tomee-jaxrs-1.7.1 and I'm trying to deploy with maven 3 getting this error: Unable to load servlet listener class: com.sun.faces.config.ConfigureListener: These are my dependencies in pom.xml: ... <dependencies> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp.jstl</groupId>...

Manually added faces message doesn't appear in tab of accordion panel


jsf,message
I'm adding a faces message in an action method as below: FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, "Mail invalide", "Vérifier le mail"); FacesContext.getCurrentInstance().addMessage("connection:mail", message); I'm expecting it to show up at the below position in the tree: <h:body> <p:layout fullPage="true"> <p:layoutUnit position="center" > <p:accordionPanel multiple="true" activeIndex="0"> <p:tab title="Se connecter" > <h:form...

How to click on a p:commandButton using javascript [duplicate]


javascript,jsf,callback,commandbutton
This question already has an answer here: How to select JSF components using jQuery? 2 answers There are many tag in my JSF page.I want to click a p:commandButton using javascript in one of the forms. But it doesn't work. When I debug it use chrome ,it prompt The...

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


maven,jenkins
I have a requirement to trigger Automation Suite in multiple phases and summarize test results in a single test summary report. I configured a Jenkins Multi Job to trigger my automation suite, which is divided in to multiple chunks say suite#1, suite#2, suite#3, suite#4 (each suite is a maven job)...

Maven: copy zipped resource subdirectories into target folder


java,maven,zip
I have a project with the following resources: resources - directory1 - directory2 I would like these to end up in the target folder as follows: target - resources - directory1 - directory2.zip I know how to use the maven-resources-plugin to copy the raw resources of directory1 and exclude the...

Refresh parent node from backing bean with primefaces tree


jsf,primefaces,tree
Currently I am working on a project that use primefaces 3.4.1 version which does not support drag and drop in tree component. So I am using a contextMenu instead of drag and drop. <p:tree id="treeHierarchy" value="#{hierarchyManagementBackingBean.root}" var="node" dynamic="true" selectionMode="single" cache="false" style="width:99%;" selection="#{hierarchyManagementBackingBean.selectedNode}"> <p:treeNode id="idtreenode"> <h:outputText value="#{node.name} (#{node.entityType})" /> </p:treeNode> </p:tree>...

Maven multi-project depths


maven
I was trying to build Maven pom in something similar to the following hierarchical form: root    +-- A-POM       +-- B-POM       +-- C-POM            +---D-POM I was hoping that this could take care of my changed module problem. That is, if C is changed, then A must be rebuilt, etc. But I...

Maven Nested Modules - Second Level Children


maven,directory-structure,multi-module
I read a lot about maven multi module projects and came to the conclusion that I want to use the following approach: root --pom.xml --parent --pom.xml --module-a --pom.xml --module-b --pom.xml see here But now I am a bit struggling on how to handle second/third/n level modules, e.g. module-a has also...

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


maven,sbt
I'm getting the following error when building my project: [warn] problem while downloading module descriptor: https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.5.6/paranamer-2.5.6.pom: invalid sha1: expected=534448ad3c4af760c8995370c1405b9dbf88609e computed=0d33f7748ec6c8928db74f9652a2cb7567fe4044 (116ms) [warn] module not found: com.thoughtworks.paranamer#paranamer;2.5.6 This is a transitive dependency, which I was able to download previously. I got this error when I wiped my ~/.ivy2/cache dir. Not really...

Refresh selection model of p:datatable on row deselection


jsf,primefaces,datatable,selection
I have a problem with the selection model of a Primefaces 5.0 datatable. This selection model does not process deselection properly: Selection of rows adds these roles as expected to the list of selected rows. But a deselection has no influence on this list; deselected rows remains in it. Only...

Grails 3.0 Searchable plugin


maven,grails
I've tried to use the searchable plugin in grails 3.0, but I am not sure wheather it is compatible or not. I've added compile "org.grails.plugins:searchable" to the dependencies. The build completes but yields a NotSearializableException: > Configuring > 1/1 projects > Resolving dependencies ':agent' > Resolving dependencies ': BUILD SUCCESSFUL...

How to use a local tomcat version with maven


java,maven,tomcat
This may have been asked before (if it is please link me), but when I search I'm finding a bunch of how to run maven on tomcat, how to hook up an IDE to do this (nearly all of them are ide / configuration questions), how to use maven plugin...

exec-maven-plugin error, even on working example


java,eclipse,maven
EDIT5 Updated / I'm using Maven 3.3.3. I just create new project and added compile and exec plugin, as examples on web. I tried to execute, but I got error [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project QNAProject: An exception occured while executing the Java class. com.jadex.qna.QNAProject.App ->...

Use alternative producers of EntityManager / EMF in integration tests


java,maven,jpa,integration-testing,cdi
I looking for way how to use CDI and alternative producers in integration tests. When i speak about producers, i mean EMF producer. Reason for different EMF producer is that i want to use testing in-memory database (different persistence unit). Is there easy way how to start CDI for integrations...

Compilation Error on maven


java,eclipse,maven,maven-plugin
Working on maven project. I m trying to build using maven but I m getting the following error! I m working on eclipse using JDK 8. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) I also tried the above solution, but still I m getting error! [INFO] Scanning for projects... [INFO] [INFO]...

spring-boot integration testing using rest-assured


maven,spring-boot,h2
I have been struggling with the issue of starting the H2 db in my tests. This is how the tests are annotated - @SpringApplicationConfiguration(classes = ServiceApplication.class) @WebAppConfiguration @IntegrationTest("server.port:8084") @PropertySource("test:application.properties") public class testSerivce{ //test scenario } The in memory db H2 is used and this is how its setup in application...

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


java,eclipse,maven,eclipse-plugin
I have created a plugin for Eclipse. With the help of this plugin, I am creating a new type of project, let's say XTypeProject. The creation of this XTypeProject is similar to any other type of project you create in Eclipse. File -> New -> YourProjectType I just want to...

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


java,maven,java-8,eclipse-kepler
Installed java version is 1.8, while selecting this version in pom.xml and updating the maven project,it automatically jumps from 1.8 to 1.4, due to which I am unable to have Lambda expression specific code. I am using eclipse kepler. Any idea what is happening here ?...

spring.xml not packaged in executable jar


java,spring,maven,executable-jar
I created a simple java application using maven, spring and used log4j for logging. Following are the files. public class TestCrawler { public static final String SPRING_CONFIGURATION_FILE = "spring.xml"; private static final String INITIAL_URL = "http://yahoo.com/"; private static final String SPIDER_BEAN = "spider"; public static void main(String[] args) { System.out.println();...

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


maven
I am on a team making local changes to a public open-source code project with the following general structure: <parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>7</version> </parent> <groupId>edu.cmu.sphinx</groupId> <artifactId>sphinx4-parent</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>sphinx4-core</module>...

Maven local artifactory file edit


java,maven,artifactory
I have uploaded some of the jars to the my local artifactory... For a example.... Repository Browser +--org |-jboos |-json |json-java |-maven-metadata.xml This xml file Dependency Declaration shown as below <dependency> <groupId>org</groupId> <artifactId>json</artifactId> <version>json-java</version> <type>xml</type> </dependency> I need to change this xml file for a reason. Is there anyway to...

JSF facets not available in Eclipse


java,eclipse,jsf,facets
So I am watching a tutorial about how to configure JSF in eclipse. I understand that you click file -> new -> Dynamic Web Project. And then it gives you a few options. The Target Runtime will be (for me) Apache Tomcat version 8, and dynamic web module version will...

How can I load a resource bundle properties file within a composite component?


jsf,composite-component,resourcebundle,properties-file
My component library directory tree is setup as the following: resources mylib css mycomponent.css properties mycomponent.properties mycomponent.xhtml I'd like to load the properties file within mycomponent.xhtml to use for messages. What is the proper way of doing this? Is there an f:loadbundle type of solution?...

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


eclipse,scala,maven,intellij-idea,sbt
I've been asking myself this question for a couple of years but never really found the solution. I used to work with eclipse (on maven java projects). I could import a project -let's call it 'proj-A'- and if one of proj-A's dependencies was found in the workspace with the same...

@RestController throws HTTP Status 406


java,spring,rest,maven
I am working on a basic Hello World program using Spring and Restful webservices. But when I try to call my service I am getting below error message: HTTP Status 406 - description - The resource identified by this request is only capable of generating responses with characteristics not acceptable...

Switching branches in Git with external dependencies


git,maven,dependencies,git-branch
Has anyone had to deal with the issues of switching git branches in a project that has Maven (or any other external) dependencies? For example, suppose that in one branch I have a maven dependency, and in another I don't (or have a different version required). Would I have to...

Distinguish view from normal view in ViewHandler#createView()


jsf,custom-error-pages,viewhandler
I have defined error page in my web.xml for error 404 in this way: <error-page> <error-code>404</error-code> <location>/common/messages/pageNotFoundError.jsf</location> </error-page> Handling invalid page url works as intended - user is redirected to pageNotFoundError page. I have also defined custom view handler in faces-config.xml. The view handler overrides method createView(FacesContext context, String viewId)....

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


java,maven,zip,client
I want to package a java client together with a runtime into one Zip-file. How should I do this with maven? Java Client: package com.test.client; public class Client { public static void main(String[] args) { System.out.println("Hello world!"); } } This runs like: java -cp "client.jar" com.test.Client I want to deliver...

maven activate by property value and version


maven,maven-3
is there a way to activate a profile by property but instead of checking a specific value check for a version range. here is what i am trying to do <properties> <frontend-maven-plugin.version>0.0.16</frontend-maven-plugin.version> </properties> ... ... <profile> <id>new_version_of_frontend</id> <activation> <property> <name>maven.version</name> <value>3.1.0</value> </property> <properties>...