I tried making an izpack installer using maven. The problem that I'm facing is that in the build the 'install.xml' and the other resources are just being copied to the install.jar. The XML file is not parsed and hence the install.jar is not getting executed.
Please help in rectifying the issue.
pom.xml
`<groupId>org.codehaus.izpack</groupId>
<version>5.0.0</version>
<modelVersion>4.0.0</modelVersion>
<artifactId>izpack-dist-test-harness</artifactId>
<name>IzPack dist module</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-standalone-compiler</artifactId>
<version>4.3.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-utils</artifactId>
<version>5.0.0-beta5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.name}</finalName>
<resources>
<resource>
<directory>src/main/izpack</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>1.0-alpha-5</version>
<executions>
<execution>
<id>install</id>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
<configuration>
<izpackBasedir>${staging.dir}</izpackBasedir>
<descriptor>install.xml</descriptor>
<installerFile>${project.build.directory}/${project.build.finalName}-install.jar</installerFile>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-standalone-compiler</artifactId>
<version>4.3.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<id>copy-install-xml-parsed</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<overwrite>true</overwrite>
<outputDirectory>${staging.dir}</outputDirectory>
<delimiters>
<delimiter>#</delimiter>
</delimiters>
<resources>
<resource>
<directory>src/main/izpack/</directory>
<includes>
<include>install.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
</configuration>
</plugin>
</plugins>
</build>'
<properties>
<staging.dir>${basedir}/target/staging</staging.dir>
</properties>
</project>`
And the part of install.xml :
<?xml version='1.0' encoding='iso-8859-1' standalone='yes' ?>
<installation version='1.0'>
<info>
<!-- Info Params -->
</info>
<variables>
<variable name="RESOURCEROOT" value="src/main/izpack"></variable>
</variables>
<guiprefs resizable="no" width="500" height="500">
<modifier key="headingImageOnLeft" value="yes"/>
<modifier key="labelGap" value="2"/>
<modifier key="useHeadingPanel" value="yes"/>
<modifier key="headingBackgroundColor" value="0x00ffffff"/>
</guiprefs>
<locale>
<langpack iso3="eng"/>
<langpack iso3="fra"/>
<langpack iso3="spa"/>
</locale>
<resources>
<res id="HTMLLicencePanel.licence" src="License.txt"/>
<res id="InfoPanel.info" src="Readme.txt"/>
</resources>
<panels>
<panel classname="HelloPanel"/>
<panel classname="HTMLLicencePanel"/>
<panel classname="InfoPanel"/>
<panel classname="InstallPanel"/>
<panel classname="FinishPanel"/>
</panels>
<conditon type="java" id="installonwindows">
<java>
<class>com.izforge.izpack.util.OsVersion</class>
<field>IS_WINDOWS</field>
</java>
<returnvalue type="boolean">true</returnvalue>
</conditon>
<installerrequirements>
<installerrequiremnet conditon="installonwindows" message="This installer can install only on windows"/>
</installerrequirements>
<packs>
<pack name="Base" required="yes" preselected="yes">
<description>The Base Files</description>
<file src="Readme.txt" targetdir="$INSTALL_PATH" override="asktrue"/>
<file src="Licence.txt" targetdir="$INSTALL_PATH" override="asktrue"/>
</pack>
</packs>
Any Help would be highly appreciated! Thanks!
Related
I googled a lot but I didn't find a proper solution to my question. So maybe here.
There is a Spring Boot service that I would like to test through REST API in build time. So the service needs to be executed as a standalone service in the build phase before the integration tests are executed.
I can execute somehow it but not the ideal.
I did something similar that the this article
I have a maven project with this pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my.project.package</groupId>
<artifactId>my-project-name</artifactId>
<version>1.0.1</version>
<packaging>jar</packaging>
<name>my-project-name</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<parallel.tests>3</parallel.tests>
<serenity.maven.version>2.0.48</serenity.maven.version>
<cucumber.version>4.8.0</cucumber.version>
<serenity.version>2.1.2</serenity.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20190722</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.16-beta1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber4</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-rest-assured</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-spring</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/it/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/it/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<includes>
<include>**/*Runner.java</include>
</includes>
<parallel>classes</parallel>
<threadCount>${parallel.tests}</threadCount>
<forkCount>${parallel.tests}</forkCount>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.maven.version}</version>
<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
<version>${cucumber.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I made an entry point for the test execution:
#RunWith(CucumberWithSerenity.class)
#CucumberOptions(
features = "src/it/resources/features",
glue = "my.project.package.integrationtest",
plugin = {
"pretty"
},
tags = "(not #Ignore) or (not #Manual) or (not #ToBeImplemented)"
)
#ActiveProfiles("integration-test")
public class IntegrationTestRunner {}
I have a StepsBase class which starts the app:
#RunWith(SpringRunner.class)
#SpringBootTest(webEnvironment = RANDOM_PORT)
#ActiveProfiles("integration-test")
#ContextConfiguration(classes = Application.class)
public class StepsBase {
public static final String HOST = "http://localhost:";
#LocalServerPort
private int serverPort;
public String getBaseUrl() {
return HOST + serverPort;
}
}
And all my steps classes extends the StepsBase class like this
public class SimpleSteps extends StepsBase {
#Given("this is a sample step")
.
.
.
}
If I execute the service build with maven clean verify, then I get the following log for the integration tests:
The main problem with this solution is the first scenario execute the Spring Boot service before instantiating the step class, which is counting into the execution time, and the test cases are not compromised if the service is not starting. Bytheway the Serenity before every scenario checks that the service is running or not.
Do you have an idea of how to make that the service is started before Serenity startup?
Or before the first step execution?
If everything is in the same project (or maven module) you can use the Spring Boot Maven plugin (https://docs.spring.io/spring-boot/docs/current/maven-plugin/usage.html). A sample configuration is shown below:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.4.RELEASE</version>
<configuration>
<classifier>exec</classifier>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
```
I can run the project as an application in IntelliJ IDEA by using main method. But when I'm trying to run it using terminal for benchmark, a class not found exception occurs.
public class MyBenchmark {
#Benchmark
public static void sdfIterativeReader() throws ClassNotFoundException, FileNotFoundException {
File sdfFile = new File("molecule.sdf");
IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance();
IteratingSDFReader reader = new IteratingSDFReader(new FileInputStream(sdfFile),builder);
while (reader.hasNext()) {
IAtomContainer molecule = (IAtomContainer) reader.next();
IMolecularFormula formula = MolecularFormulaManipulator.getMolecularFormula(molecule);
String molecularFromula = MolecularFormulaManipulator.getString(formula);
System.out.println(molecularFromula);
}
}
}
I used the command: mvn clean install then project is building successfully. When I run the command:
java -jar target/benchmarks.jar
it gives the following error:
Here, I have attached my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.chemid</groupId>
<artifactId>chemid-benchmark</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>JMH benchmark sample: Java</name>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.openjdk.jmh/jmh-generator-annprocess -->
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${jmh.version}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>cdk</groupId>
<artifactId>cdk</artifactId>
<version>1.5.13</version>
<scope>system</scope>
<systemPath>${cdk.lib}/cdk-1.5.13 .jar</systemPath>
</dependency>
<dependency>
<groupId>net.sourceforge.streamsupport</groupId>
<artifactId>streamsupport</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>org.openscience.cdk</groupId>
<artifactId>cdk-io</artifactId>
<version>1.5.13</version>
</dependency>
<dependency>
<groupId>org.openscience.cdk</groupId>
<artifactId>cdk</artifactId>
<version>1.5.13</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.openscience.cdk</groupId>
<artifactId>cdk-core</artifactId>
<version>1.5.13</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<jmh.version>1.6.3</jmh.version>
<javac.target>1.8</javac.target>
<uberjar.name>benchmarks</uberjar.name>
<cdk.lib>${basedir}/libs</cdk.lib>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<compilerVersion>${javac.target}</compilerVersion>
<source>${javac.target}</source>
<target>${javac.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${uberjar.name}</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.openjdk.jmh.Main</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<!--
Shading signed JARs will fail without this.
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
-->
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Add to file MANIFEST.MF this line:
Class-Path: lib/cdk-1.5.13.jar
Or run you benchmark thought class with main method:
java -cp path/to/cdk/lib/cdk-1.5.13.jar:. com.your.main.ClassName
For more info read answers from this discussion.
And also this answer to understand system scope of Maven dependency that you've chose for cdk-1.5.13.jar.
It's kinda the same question as this one, but the answer didn't work for me. Also I don't know how he got the output of jboss-cli in his stacktrace, that would help a lot for debugging.
Anyway I'm trying to deploy a security realm in Wildfly 10 through Maven. It works fine when doing it through the console (with the commented lines in the code below) but not with Maven Wildfly plugin.
<configuration>
<!--add security domain-->
<before-deployment>
<commands>
<!--<command>./subsystem=security/security-domain=walbangSecureRealm:add(cache-type="default")</command>-->
<!--<command>cd ./subsystem=security/security-domain=walbangSecureRealm</command>-->
<!--<command>./authentication=classic:add(login-modules=[{code="Database",flag="required",module-options={dsJndiName="java:/walbangDbDS",principalsQuery="select password from usercredential uc where uc.username = ?",rolesQuery="select role, 'Roles' from users u where u.username = ?",unauthenticatedIdentity="guest"}}])</command>-->
<command>/subsystem=security/security-domain=walbangSecureRealm:add(cache-type=default)</command>
<command>/subsystem=security/security-domain=walbangSecureRealm/authentication=classic:add(login-modules=[{"code"=>"Database","flag"=>"required","module-options"=>[("dsJndiName"=>"java:/walbangDbDS"),("principalsQuery"=>"select password from usercredential uc where uc.username = ?"),("rolesQuery"=>"select role, 'Roles' from users u where u.username = ?"),("unauthenticatedIdentity"=>"guest")]}])</command>
<command>reload</command>
</commands>
</before-deployment>
</configuration>
The error in the stacktrace is :
12:18:54,236 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "walbang-0.0.1-SNAPSHOT.war")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.deployment.unit.\"walbang-0.0.1-SNAPSHOT.war\".component.ManageMatchServiceImpl.CREATE is missing [jboss.security.security-domain.walbangSecureRealm]",...
Here is more info of what I have in Maven:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>true</failOnMissingWebXml>
</configuration>
</plugin>
<!--wildfly plugin-->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha8</version>
<executions>
<!-- Deploy the JDBC driver -->
<execution>
<id>deploy-driver</id>
<phase>package</phase>
<configuration>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<name>mysql-connector</name>
</configuration>
<goals>
<goal>deploy-artifact</goal>
</goals>
</execution>
<!-- Add a data source -->
<execution>
<id>add-datasource</id>
<phase>package</phase>
<configuration>
<address>subsystem=datasources,data-source=java:/walbangDbDS</address>
<resources>
<resource>
<enableResource>true</enableResource>
<properties>
<connection-url>jdbc:mysql://localhost:3306/forumcs</connection-url>
<jndi-name>java:/walbangDbDS</jndi-name>
<enabled>true</enabled>
<enable>true</enable>
<user-name>root</user-name>
<password>123456</password>
<driver-name>mysql-connector</driver-name>
<use-ccm>false</use-ccm>
</properties>
</resource>
</resources>
</configuration>
<goals>
<goal>add-resource</goal>
</goals>
</execution>
<!-- Deploy the application on install -->
<execution>
<id>deploy</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<!--add security domain-->
<before-deployment>
<commands>
<!--<command>./subsystem=security/security-domain=walbangSecureRealm:add(cache-type="default")</command>-->
<!--<command>cd ./subsystem=security/security-domain=walbangSecureRealm</command>-->
<!--<command>./authentication=classic:add(login-modules=[{code="Database",flag="required",module-options={dsJndiName="java:/walbangDbDS",principalsQuery="select password from usercredential uc where uc.username = ?",rolesQuery="select role, 'Roles' from users u where u.username = ?",unauthenticatedIdentity="guest"}}])</command>-->
<command>/subsystem=security/security-domain=walbangSecureRealm:add(cache-type=default)</command>
<command>/subsystem=security/security-domain=walbangSecureRealm/authentication=classic:add(login-modules=[{"code"=>"Database","flag"=>"required","module-options"=>[("dsJndiName"=>"java:/walbangDbDS"),("principalsQuery"=>"select password from usercredential uc where uc.username = ?"),("rolesQuery"=>"select role, 'Roles' from users u where u.username = ?"),("unauthenticatedIdentity"=>"guest")]}])</command>
<command>reload</command>
</commands>
</before-deployment>
</configuration>
</plugin>
</plugins>
I've got wired problem with my Flex application, exactly menu (based on mx.controls.Menu and flexlib.controls.ScrollableMenu).
When I build my application by FlashBuilder menu works. See screenshot:
But when I build it by maven using flexmojos-sonatype-plugin the menu is broken (it's not rendered properly according to labelField property and it doesn't catch any events like mouse click). See screenshot:
My .actionScriptProperties file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="ats.mxml" projectUUID="802474ea-5e3c-4d2c-bdaa-8c263c0828f4" version="6">
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="false" copyDependentFiles="true" flexSDK="Flex 3.3" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderLocation="D:/flex" outputFolderPath="bin-debug" rootURL="http://localhost:8080/flex/" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath />
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation/3.3.0.4852/automation-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_agent/3.3.0.4852/automation_agent-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_dmv/3.3.0.4852/automation_dmv-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_flashflexkit/3.3.0.4852/automation_flashflexkit-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_agent/3.3.0.4852/automation_agent-3.3.0.4852-en_US.rb.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation/3.3.0.4852/automation-3.3.0.4852-en_US.rb.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flexunit/flexunit/0.90/flexunit-0.90.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/as3corelib/0.92.1/as3corelib-0.92.1.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/google/code/flexlib/flexlib/2.6-M3/flexlib-2.6-M3.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="4" path="">
<modifiedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" useDefaultLinkType="true"/>
</modifiedEntries>
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
</libraryPath>
<sourceAttachmentPath>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/>
</sourceAttachmentPath>
</compiler>
<applications>
<application path="myApp.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
</actionScriptProperties>
My effective POM file:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.application.myApp</groupId>
<artifactId>myApp</artifactId>
<version>trunk-SNAPSHOT</version>
<packaging>swf</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.code.flexlib</groupId>
<artifactId>flexlib</artifactId>
<version>2.6-M3</version>
<type>swc</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.code.flexlib</groupId>
<artifactId>flexlib</artifactId>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.3.0.4852</version>
<type>pom</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>playerglobal</artifactId>
<groupId>com.adobe.flex.framework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>3.3.0.4852</version>
<type>swc</type>
<classifier>10</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flexunit</groupId>
<artifactId>flexunit</artifactId>
<version>0.90</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>as3corelib</artifactId>
<version>0.92.1</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>datavisualization</artifactId>
<version>3.3.0.4852</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
<version>1.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>sources</goal>
</goals>
<configuration>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<compilerWarnings>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
<execution>
<id>swf-optimization</id>
<goals>
<goal>optimize-swf</goal>
</goals>
<configuration>
<attachOriginalArtifact>false</attachOriginalArtifact>
<reduce>false</reduce>
<reduceMergeABC>false</reduceMergeABC>
<reduceMergeCF>false</reduceMergeCF>
<reduceSortCPool>false</reduceSortCPool>
<strip>false</strip>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<compilerWarnings>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>license</artifactId>
<version>3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-flex3-compatibility-layer</artifactId>
<version>4.0-RC2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>3.3.0.4852</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>adt</artifactId>
<version>3.3.0.4852</version>
<scope>compile</scope>
</dependency>
</dependencies>
<configuration>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<compilerWarnings>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
<configuration>
<allowTimestampedSnapshots>true</allowTimestampedSnapshots>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default-compile-swf</id>
<phase>compile</phase>
<goals>
<goal>compile-swf</goal>
</goals>
<configuration>
<sourceFile>myApp.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>sources</goal>
</goals>
<configuration>
<sourceFile>myApp.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
<execution>
<id>swf-optimization</id>
<goals>
<goal>optimize-swf</goal>
</goals>
<configuration>
<attachOriginalArtifact>false</attachOriginalArtifact>
<reduce>false</reduce>
<reduceMergeABC>false</reduceMergeABC>
<reduceMergeCF>false</reduceMergeCF>
<reduceSortCPool>false</reduceSortCPool>
<strip>false</strip>
<sourceFile>myApp.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>license</artifactId>
<version>3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-flex3-compatibility-layer</artifactId>
<version>4.0-RC2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>3.3.0.4852</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>adt</artifactId>
<version>3.3.0.4852</version>
<scope>compile</scope>
</dependency>
</dependencies>
<configuration>
<sourceFile>ats.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I found using MonsterDebugger that in runtime Menu object's and it's MenuItemRenderers are created.
I'm using Flex SDK 3.3, FlashBuilder 4, Maven 3.0.5, flexmojos-maven-plugin 4.0-RC2. Do you know what is the difference between building my application by FlashBuilder and Maven? Thanks for any reply.
Purely building your project by means of flash builder won't offer you the agile development which comes with building your projects using a FlashBuilder/Maven integration. As a standalone development environment, flash builder tends to lack in the version and dependency management arena. As you see your project get grow and reach new releases, that is where you'll find using Maven with flash builder worthwhile compared to using the Apache Ant task-runner. Anything that can help manage cleanly manage dependencies, support modular and easily managed updates is definitely worthwhile. If you haven't already, you might want to checkout the adobe resource on flex/maven.
http://www.adobe.com/devnet/flex/articles/flex-maven-flexmojos-pt1.html
I'm testing my first Spring project. I'm trying to call a webservice. I'm following the tutorial as listed here: http://spring.io/guides/gs/consuming-web-service/
When I try to build my project, I get following error:
2014-09-08 15:10:38.924 INFO 4736 --- [ main] b.i.einvoice.webserviceTest.TestMain : Starting TestMain on W7-010545 with PID 4736 (C:\Users\staelko\git\einvoice-portlets\einvoice\target\classes started by staelko in C:\Users\staelko\git\einvoice-portlets\einvoice)
2014-09-08 15:10:38.978 INFO 4736 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#12d56b37: startup date [Mon Sep 08 15:10:38 CEST 2014]; root of context hierarchy
Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.web.context.support.ServletContextAwareProcessor: method <init>()V not found
What is causing this?
My POM:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>be.icredit</groupId>
<artifactId>einvoice</artifactId>
<packaging>war</packaging>
<name>einvoice Portlet</name>
<version>0.0.1-SNAPSHOT</version>
<properties>
<liferay.maven.plugin.version>6.2.10.6</liferay.maven.plugin.version>
<liferay.version>6.2.1</liferay.version>
<spring.suite.version>3.2.10.RELEASE</spring.suite.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.liferay.maven.plugins</groupId>
<artifactId>liferay-maven-plugin</artifactId>
<version>${liferay.maven.plugin.version}</version>
<executions>
</executions>
<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>
<pluginType>portlet</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>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.9.0</version>
<executions>
<execution>
<id>BatchDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.BatchDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>BatchDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>CustomerAccountDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.CustomerAccountDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>CustomerAccountDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>CustomerDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.CustomerDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>CustomerDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>DocumentDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.DocumentDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>DocumentDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>DocumentTemplateDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.DocumentTemplateDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>DocumentTemplateDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>EmailStatusDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.EmailStatusDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>EmailStatusDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>EmailTemplateDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.EmailTemplateDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>EmailTemplateDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>FileService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.FileService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>FileService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
<execution>
<id>SenderDaoService-generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>be.icredit.einvoice.proxy.SenderDaoService</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<fileset>
<!-- Defaults to schemaDirectory -->
<directory>${basedir}/src/main/resources/wsdl/</directory>
<!-- Defaults to schemaIncludes -->
<includes>
<include>SenderDaoService.wsdl</include>
</includes>
</fileset>
</schema>
</schemas>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>${liferay.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>util-bridges</artifactId>
<version>${liferay.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>util-taglib</artifactId>
<version>${liferay.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>util-java</artifactId>
<version>${liferay.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.suite.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.suite.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.suite.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.suite.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc-portlet</artifactId>
<version>${spring.suite.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>1.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>2.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project>
Full stack trace below:
:: Spring Boot :: (v1.1.6.RELEASE)
2014-09-08 15:26:06.200 INFO 2964 --- [ main] b.i.einvoice.webserviceTest.TestMain : Starting TestMain on W7-010545 with PID 2964 (C:\Users\staelko\git\einvoice-portlets\einvoice\target\classes started by staelko in C:\Users\staelko\git\einvoice-portlets\einvoice)
2014-09-08 15:26:06.273 INFO 2964 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#326b9c84: startup date [Mon Sep 08 15:26:06 CEST 2014]; root of context hierarchy
Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.web.context.support.ServletContextAwareProcessor: method <init>()V not found
at org.springframework.boot.context.embedded.WebApplicationContextServletContextAwareProcessor.<init>(WebApplicationContextServletContextAwareProcessor.java:40)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.postProcessBeanFactory(EmbeddedWebApplicationContext.java:100)
at org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext.postProcessBeanFactory(AnnotationConfigEmbeddedWebApplicationContext.java:180)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:458)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
at be.icredit.einvoice.webserviceTest.TestMain.main(TestMain.java:13)
2014-09-08 15:26:06.307 INFO 2964 --- [ Thread-1] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#326b9c84: startup date [Mon Sep 08 15:26:06 CEST 2014]; root of context hierarchy
2014-09-08 15:26:06.319 WARN 2964 --- [ Thread-1] ationConfigEmbeddedWebApplicationContext : Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#326b9c84: startup date [Mon Sep 08 15:26:06 CEST 2014]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:347)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.doClose(EmbeddedWebApplicationContext.java:141)
at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)
2014-09-08 15:26:06.320 WARN 2964 --- [ Thread-1] ationConfigEmbeddedWebApplicationContext : Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#326b9c84: startup date [Mon Sep 08 15:26:06 CEST 2014]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.doClose(EmbeddedWebApplicationContext.java:141)
at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)
2014-09-08 15:26:06.321 INFO 2964 --- [ Thread-1] o.s.b.f.s.DefaultListableBeanFactory : Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#331c89c: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,customerDaoConfiguration]; root of factory hierarchy
On this line in my main class crashes the app:
ApplicationContext ctx = SpringApplication.run(CustomerDaoConfiguration.class, args);
And my CustomerDaoConfiguration is listed as below:
#Configuration
public class CustomerDaoConfiguration {
#Bean
public Jaxb2Marshaller marshaller() {
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
marshaller.setContextPath("be.icredit.einvoice.proxy.CustomerDaoService");
return marshaller;
}
#Bean
public CustomerClient weatherClient(Jaxb2Marshaller marshaller) {
CustomerClient client = new CustomerClient();
client.setDefaultUri("http://ws08-icreditlc.iconos.be:18080/icredit-service-data/CustomerDaoService");
client.setMarshaller(marshaller);
client.setUnmarshaller(marshaller);
return client;
}
}
Are you using an IDE? I had the exact same problem when I was using IntelliJ, but when I ran it from terminal by
mvn spring-boot:run
It would run fine. To make it work in IntelliJ I had to go to "project structure"->"Modules"-> "Dependencies" and move the resources around or by manually moving them in .iml file.
From Spring documentation:
IntelliJ IDEA orders the classpath differently depending on how you run your application. Running your application in the IDE via its main method will result in a different ordering to when you run your application using Maven or Gradle or from its pacakaged jar. This can cause Spring Boot to fail to find the templates on the classpath. If you’re affected by this problem you can reorder the classpath in the IDE to place the module’s classes and resources first. Alternatively, you can configure the template prefix to search every templates directory on the classpath: classpath*:/templates/.
I got this problem because I included another spring framework with an older version. To check if you have the same problem, run the following command to generate a dependency tree:
mvn dependency:tree
Then search through the output to check if you have included another spring framework with an older version(typically 2.xx or 3.xx).