Tomcat deployed war is not deploying on JBoss - spring-mvc

I am working on Spring MVC project.
It was locally deployed on Tomcat server(apache-tomcat-7.0.85) correctly without any issue.
But my supervisor asked me to deploy it on JBoss server, because our company is using JBoss server in production level.
So, I tried to deploy it on JBoss server locally, But it's not working well.
My url (http://localhost:8080/MCloudServices-1.0/test) is giving 404 error.
The problem is no any error in server log.
Is there any version error or Am I have to do some configuration changers when moving Tomcat to JBoss? I search this on google but couldn't find any solution.
I'm new to to Spring MVC, Hoping a solution for this.
Tomcat version I used --> apache-tomcat-7.0.85
JBoss versions I checked--> jboss-5.0.0.GA and jboss-6.1.0.Final
Spring version --> 4.1.9.RELEASE
Also I have attached here with pom.xml and server.log
server.log
=============================================================================== JBoss Bootstrap Environment JBOSS_HOME: C:\jboss-5.0.0.GA JAVA: C:\Program Files\Java\jdk1.8.0_144\bin\java JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 CLASSPATH: C:\jboss-5.0.0.GA\bin\run.jar =============================================================================== Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 10:02:21,850 INFO [ServerImpl] Starting JBoss (Microcontainer)... 10:02:21,850 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714) 10:02:21,850 INFO [ServerImpl] Bootstrap URL: null 10:02:21,850 INFO [ServerImpl] Home Dir: C:\jboss-5.0.0.GA 10:02:21,850 INFO [ServerImpl] Home URL: file:/C:/jboss-5.0.0.GA/ 10:02:21,850 INFO [ServerImpl] Library URL: file:/C:/jboss-5.0.0.GA/lib/ 10:02:21,850 INFO [ServerImpl] Patch URL: null 10:02:21,850 INFO [ServerImpl] Common Base URL: file:/C:/jboss-5.0.0.GA/common/ 10:02:21,850 INFO [ServerImpl] Common Library URL: file:/C:/jboss-5.0.0.GA/common/lib/ 10:02:21,850 INFO [ServerImpl] Server Name: default 10:02:21,850 INFO [ServerImpl] Server Base Dir: C:\jboss-5.0.0.GA\server 10:02:21,865 INFO [ServerImpl] Server Base URL: file:/C:/jboss-5.0.0.GA/server/ 10:02:21,865 INFO [ServerImpl] Server Config URL: file:/C:/jboss-5.0.0.GA/server/default/conf/ 10:02:21,865 INFO [ServerImpl] Server Home Dir: C:\jboss-5.0.0.GA\server\default 10:02:21,865 INFO [ServerImpl] Server Home URL: file:/C:/jboss-5.0.0.GA/server/default/ 10:02:21,865 INFO [ServerImpl] Server Data Dir: C:\jboss-5.0.0.GA\server\default\data 10:02:21,865 INFO [ServerImpl] Server Library URL: file:/C:/jboss-5.0.0.GA/server/default/lib/ 10:02:21,865 INFO [ServerImpl] Server Log Dir: C:\jboss-5.0.0.GA\server\default\log 10:02:21,865 INFO [ServerImpl] Server Native Dir: C:\jboss-5.0.0.GA\server\default\tmp\native 10:02:21,865 INFO [ServerImpl] Server Temp Dir: C:\jboss-5.0.0.GA\server\default\tmp 10:02:21,865 INFO [ServerImpl] Server Temp Deploy Dir: C:\jboss-5.0.0.GA\server\default\tmp\deploy 10:02:22,214 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/jboss-5.0.0.GA/server/default/conf/bootstrap.xml 10:02:22,487 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.IterableTimedVFSCache] 10:02:22,487 INFO [VFSCacheFactory] Using VFSCache [IterableTimedVFSCache{lifetime=1800, resolution=60}] 10:02:22,643 INFO [CopyMechanism] VFS temp dir: C:\jboss-5.0.0.GA\server\default\tmp 10:02:22,643 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled. 10:02:23,574 INFO [ServerInfo] Java version: 1.8.0_144,Oracle Corporation 10:02:23,574 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 25.144-b01,Oracle Corporation 10:02:23,574 INFO [ServerInfo] OS-System: Windows 10 10.0,amd64 10:02:23,590 INFO [JMXKernel] Legacy JMX core initialized 10:02:24,973 INFO [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository#61842590(root=C:\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey#143b82c3[domain=default,server=default,name=default]) 10:02:24,973 INFO [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository#61842590(root=C:\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey#143b82c3[domain=default,server=default,name=default]) 10:02:24,973 INFO [ProfileServiceImpl] Loaded profile: ProfileImpl#1619ca3d{key=org.jboss.profileservice.spi.ProfileKey#143b82c3[domain=default,server=default,name=default]} 10:02:29,452 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/ 10:02:33,786 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core 10:02:33,786 INFO [NativeServerConfig] 3.0.4.SP1 10:02:44,016 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector 10:05:46,163 INFO [MailService] Mail Service bound to java:/Mail 10:05:47,141 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this. 10:05:47,141 WARN [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent 10:05:47,251 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc. 10:05:47,251 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer 10:05:47,440 INFO [TransactionManagerService] Initializing recovery manager 10:05:47,520 INFO [TransactionManagerService] Recovery manager configured 10:05:47,521 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference 10:05:47,546 INFO [TransactionManagerService] Starting transaction recovery manager 10:05:47,952 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080 10:05:47,952 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009 10:05:47,952 INFO [StandardService] Starting service jboss.web 10:05:47,952 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.1.GA 10:05:47,968 INFO [Catalina] Server startup in 58 ms 10:05:47,984 INFO [TomcatDeployment] deploy, ctxPath=/web-console, vfsUrl=management/console-mgr.sar/web-console.war 10:05:48,958 INFO [TomcatDeployment] deploy, ctxPath=/jbossws, vfsUrl=jbossws.sar/jbossws-management.war 10:05:48,989 INFO [TomcatDeployment] deploy, ctxPath=/invoker, vfsUrl=http-invoker.sar/invoker.war 10:05:49,228 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml 10:05:49,321 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml 10:05:49,384 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml 10:05:49,531 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml 10:05:49,594 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml 10:05:49,672 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main 10:05:49,688 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created. 10:05:49,688 INFO [RAMJobStore] RAMJobStore initialized. 10:05:49,688 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 10:05:49,688 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2 10:05:49,688 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. 10:05:50,047 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS' 10:05:50,464 WARN [QuartzTimerServiceFactory] sql failed: CREATE TABLE QRTZ_JOB_DETAILS(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP)) 10:05:50,480 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main 10:05:50,480 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created. 10:05:50,480 INFO [JobStoreCMT] Using db table-based data access locking (synchronization). 10:05:50,480 INFO [JobStoreCMT] Removed 0 Volatile Trigger(s). 10:05:50,480 INFO [JobStoreCMT] Removed 0 Volatile Job(s). 10:05:50,480 INFO [JobStoreCMT] JobStoreCMT initialized. 10:05:50,480 INFO [StdSchedulerFactory] Quartz scheduler 'JBossEJB3QuartzScheduler' initialized from an externally provided properties instance. 10:05:50,495 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2 10:05:50,495 INFO [JobStoreCMT] Freed 0 triggers from 'acquired' / 'blocked' state. 10:05:50,495 INFO [JobStoreCMT] Recovering 0 jobs that were in-progress at the time of the last shut-down. 10:05:50,495 INFO [JobStoreCMT] Recovery complete. 10:05:50,495 INFO [JobStoreCMT] Removed 0 'complete' triggers. 10:05:50,495 INFO [JobStoreCMT] Removed 0 stale fired job entries. 10:05:50,495 INFO [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED started. 10:05:50,707 INFO [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started 10:05:50,754 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000 10:05:50,769 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover 10:05:50,769 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing 10:05:50,801 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds 10:05:50,801 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory#cbd98e3 started 10:05:50,801 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds 10:05:50,801 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory#2d3a34ff started 10:05:50,801 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000 10:05:50,801 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds 10:05:50,801 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory#21fff299 started 10:05:50,847 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA' 10:05:52,424 INFO [TomcatDeployment] deploy, ctxPath=/MCloudServices-1.0, vfsUrl=MCloudServices-1.0.war 10:05:52,492 WARN [config] Unable to process deployment descriptor for context '/MCloudServices-1.0' 10:05:52,795 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war 10:05:52,888 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war 10:05:52,942 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080 10:05:52,952 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009 10:05:52,983 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 3m:31s:118ms
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>MCloudServices</groupId>
<artifactId>MCloudServices</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<springframework.version>4.1.9.RELEASE</springframework.version>
<hibernate.version>4.3.6.Final</hibernate.version>
<mysql.connector.version>5.0.4</mysql.connector.version>
<joda-time.version>2.3</joda-time.version>
<testng.version>6.9.4</testng.version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springframework.version}</version>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- jsr303 validation -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.1.3.Final</version>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.version}</version>
</dependency>
<!-- Joda-Time -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
<!-- To map JodaTime with database type -->
<dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.core</artifactId>
<version>3.0.0.CR1</version>
</dependency>
<!-- Servlet+JSP+JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Testing dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${springframework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<!-- Json dependency -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
</project>

Try putting a jboss-web.xml under your WEB-INF folder:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
<jboss-web>
<context-root>yourWebappContextRoot</context-root>
</jboss-web>

Related

Unable to start server when I use Eureka and actuator

I am using Spring boot version 2.2.0.M4. When I am adding dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
while starting server it fails to start with below mentioned error
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.cloud.client.discovery.health.DiscoveryCompositeHealthIndicator.<init>(DiscoveryCompositeHealthIndicator.java:42)
The correct way of working with Spring Cloud projects versioning is using the dependencyManagement plugin and release trains versions rather than passing versions of separate artifacts manually.
You can get a correct pom generated automatically (with all the correct versions) at start.spring.io.
On the date that question was posted, a version of Spring Cloud supporting Spring Boot 2.2.x has not been released yet. The latest Spring Cloud release version available is Greenwich.SR2, that supports Spring Boot 2.1.6.RELEASE.
UPDATE: Spring Cloud Hoxton.M1 that supports Spring Boot 2.2.0.M4 was released on 3rd July 2019. You can now use it and also generate correct build files with this version from start.spring.io.
For the following dependency:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
The Following spring cloud version worked for me.
<properties>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR4</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Spring MVC with boot and NEO4j

I am building an application where Rest endpoints uses, boot bindings to send Neo4j Entitites to Neo4j Repo, and thats the pattern we repeated few times across jpa backed repositories. In current configuration;
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
</dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
JPA repositories and neo4j repositories works ok, until i add;
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Erros i am facing are;
APPLICATION FAILED TO START
Description:
Constructor in org.springframework.data.neo4j.repository.config.Neo4jOgmEntityInstantiatorConfigurationBean required a single bean, but 2 were found:
- mvcConversionService: defined by method 'mvcConversionService' in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]
- integrationConversionService: defined in null
:: Spring Boot :: (v2.1.0.M2)
:: Java 8
Updating project dependencies to
<spring.boot.version>2.1.0.RELEASE</spring.boot.version>
<spring.cloud.version>2.1.0.RC3</spring.cloud.version>
has fixed the issue as per #meistermeier suggestion.

Getting error "org.apache.flex.compiler:mxmlc:jar" when trying to compile with FlexMojos 7.0.1 and Apache Flex 4.14

I'm migrating an application I had working with Adobe Flex 4.6 and FlexMojos 4 to Apache Flex 4.14 and FlexMojos 7. When I try to execute "mvn build" I'm getting this error:
[ERROR] Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:7.0.1 or one of its dependencies could not be resolved:
The following artifacts could not be resolved:
org.apache.flex.compiler:mxmlc:jar:4.12.1.20140427,
org.apache.flex.compiler:digest:jar:4.12.1.20140427,
org.apache.flex.compiler:optimizer:jar:4.12.1.20140427,
org.apache.flex.compiler:asdoc:jar:4.12.1.20140427,
org.apache.flex.compiler:swcdepends:jar:4.12.1.20140427,
org.apache.flex:compiler:pom:4.12.1.20140427: Failure to find
org.apache.flex.compiler:mxmlc:jar:4.12.1.20140427 in
http://repository.sonatype.org/content/groups/flexgroup/ was cached in the local repository, resolution will not be reattempted until the update interval of flex-mojos-repository has elapsed or updates are forced -> [Help 2]
[ERROR] Unknown packaging: swf # line 5, column 13
This is 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cognifit.cognifitSocialFlex</groupId>
<artifactId>FlexCognifit</artifactId>
<packaging>swf</packaging>
<name>cognifitSocialFlex</name>
<version>11.0.2.10</version>
<properties>
<flex.version>4.14.1.20150325</flex.version>
<flashplayer.version>11.1</flashplayer.version>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<directory>${project.basedir}/target/${project.version}</directory>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>7.0.1</version>
<extensions>true</extensions>
<configuration>
<sourceFile>CpcSocialFlex.mxml</sourceFile>
<swfVersion>13</swfVersion>
<targetPlayer>11.1.0</targetPlayer>
<localesCompiled>
<locale>ar_MA</locale>
<locale>de_AT</locale>
<locale>de_CH</locale>
<locale>de_DE</locale>
<locale>el_GR</locale>
<locale>en_US</locale>
<locale>en_ZA</locale>
<locale>es_ES</locale>
<locale>es_MX</locale>
<locale>fr_FR</locale>
<locale>he_IL</locale>
<locale>it_IT</locale>
<locale>ja_JP</locale>
<locale>ko_KR</locale>
<locale>nl_NL</locale>
<locale>pt_BR</locale>
<locale>pt_PT</locale>
<locale>ru_RU</locale>
<locale>sr_RS</locale>
<locale>tr_TR</locale>
<locale>zh_CN</locale>
<locale>zh_HK</locale>
</localesCompiled>
<dependencies>
<dependency>
<groupId>org.apache.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.flex</groupId>
<artifactId>framework</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flash.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flashplayer.version}</version>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework.themes</groupId>
<artifactId>halo</artifactId>
<type>swc</type>
<scope>theme</scope>
<version>${flex.version}</version>
</dependency>
</dependencies>
</project>
I'm using Maven 3.2.5 and Java 1.6.0_14:
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T12:29:23-05:00)
Maven home: /usr/local/maven
Java version: 1.6.0_14, vendor: Sun Microsystems Inc.
Java home: /usr/java/jdk1.6.0_14/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.21.7-2.fc8xen", arch: "i386", family: "unix"
These are the steps I have followed:
I downloaded the Apache Flex SDK with the Installer:
Apache Flex SDK 4.14.1
AIR 18.0
Flash Player 18
I have used the Mavenizer to create a Maven version of this SDK:
Then I have deployed the mavenized version in my /root/.m2/repository/ folder and executed mvn compile with the pom.xml.
By the way in the meanwhile the mavenizer has evolved quite a bit ... making usage of maven extensions by ".mvn/extensions.xml" files. This should automatically download, convert and install the Flex/Flash/Air resources you reference. So to upgrade to the next Flex/Flash/Air version, just reference a new version and the plugin will take care of the rest (As long as the version actually exists). See more details here: https://cwiki.apache.org/confluence/display/FLEX/Preparing+FDKs+for+Maven+builds (Pay some special attention to the chapter: Prepare the FDK resources using the flex-sdk-converter-maven-extension)

Alfresco Configuration to Eclipse or by Maven

I am trying to configure the development environment for Alfresco version 5.0.b.
i have tried as per the documentation for maven and also tried by my way in eclipse but i am facing an issue with both like
if i do it by maven from command prompt like
C:\maven_projects\project_1>mvn install
[INFO] Scanning for
projects... Downloading:
https ://repo.maven.apache.org/maven2/org/alfresco/maven/alfresco-sd
k-parent/2.0.0-beta-4/alfresco-sdk-parent-2.0.0-beta-4.pom [ERROR] The
build could not read 1 project -> [Help 1] [ERROR] [ERROR] The
project ipr.res.in:project_1:1.0-SNAPSHOT (C:\maven_projects\proje
ct_1\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could
not transfer artifact org.alfresco.
maven:alfresco-sdk-parent:pom:2.0.0-beta-4 from/to central
(https: //repo.maven.a pache.org/maven2): repo.maven.apache.org and
'parent.relativePath' points at wro ng local POM # line 12, column 13:
Unknown host repo.maven.apache.org -> [Help 2 ] [ERROR] [ERROR] To see
the full stack trace of the errors, re-run Maven with the -e swit ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] [ERROR] For more information about the errors and possible
solutions, please rea d the following articles: [ERROR] [Help 1]
http: //cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException [ERROR] [Help 2]
http: //cwiki.apache.org /confluence/display/MAVEN/UnresolvableMo
delException C:\maven_projects\project_1>
If i try in eclipse
i create one project as maven project in that i add the catalog file with maven central for the url (http: //repo1.maven.org/maven2/archetype-catalog.xml) but when i try to import the archetype (org.alfresco. ..) it is not giving me anything.
So kindly help me out for the issue to configure the AMP
My Project POM.XML
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.alfresco.tutorials</groupId>
<artifactId>quick-start-project</artifactId>
<version>1.0-SNAPSHOT</version>
<name>quick-start-project Repository AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the quick-start-project Repository AMP (Alfresco Module Package)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>2.0.0-beta-4</version>
</parent>
<!--
| SDK properties have sensible defaults in the SDK parent,
| but you can override the properties below to use another version.
| For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!--
| Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco
| NOTE: See http: //docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details
-->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<!-- Defines the Alfresco version to work against.
Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0) -->
<alfresco.version>5.0.a</alfresco.version>
<app.log.root.level>WARN</app.log.root.level>
<alfresco.data.location>alf_data_dev</alfresco.data.location>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your foundation WAR -->
<alfresco.client.war>alfresco</alfresco.client.war>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco or your corporate groupId -->
<alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId>
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
<alfresco.client.war.version>5.0.a</alfresco.client.war.version>
<!-- This controls which properties will be picked in src/test/properties for embedded run -->
<env>local</env>
</properties>
<!-- Here we realize the connection with the Alfresco selected platform
(e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco version/edition
(see http: //maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement. NOTE: It defaults
to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-platform-distribution</artifactId>
<version>${alfresco.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
</dependencies>
</project>
As the Maven error message explains, the Alfresco Maven SDK is not available in Maven central. It is only available from the Alfresco Artifacts Maven repository
You therefore need to add this snippet into your pom:
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
</repositories>
You can find out more from the Alfresco Maven SDK wiki page and the Alfresco Artifacts Maven Repository wiki page

Flex & Maven : How to upgrade playerglobal version in pom.xml

I'm currently developping an flex application, and i've used native cursor support to dynamically change cursor in particular conditions.
My application runs with Flex Sdk 4.1.0.16076, which use flash player 10.0 by default.
I have upgrade this version to 10.2 in project preferences, in order to use MouseCursorData class.
It works fine in eclipse but i'm using maven for dependencies and I have compilation error when doing a maven build, saying MouseCursorData Class can't be found.
It's pretty normal since i'm using player 10 in my dependencies. So I tried to update my pom.xml file for upgrading player to 10.2 :
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<configuration>
<targetPlayer>10.0</targetPlayer>
<compiledLocales>
<locale>en_US</locale>
<locale>fr_FR</locale>
</compiledLocales>
<warnings>
<noConstructor>false</noConstructor>
</warnings>
<sourceFile>Opale.mxml</sourceFile>
<generateHtmlWrapper>true</generateHtmlWrapper>
<contextRoot>opale-web</contextRoot>
<services>${basedir}/src/main/resources/services-config.xml</services>
<output>target/opale-ui.swf</output>
</configuration>
<version>${flexmojos.version}</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
First, I have changed the targetPlayer in flex mojo plugin from 10.0 to 10.2.
Then I obtain the compilation error :
[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:compile-swf (default-compile-swf) on project opale-ui: TargetPlayer and playerglobal dependency version doesn't match! Target player: 10.2, player global: 10.0 -> [Help 1]
So, i had a dependency to force playerglobal version :
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flex.sdk.version}</version>
<classifier>10.2.0</classifier>
<type>swc</type>
</dependency>
Then, i have the following error :
Downloading: http://repo.maven.apache.org/maven2/com/adobe/flex/framework/playerglobal/4.1.0.16076/playerglobal-4.1.0.16076-10.2.0.swc
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.698s
[INFO] Finished at: Wed Sep 12 12:29:57 CEST 2012
[INFO] Final Memory: 9M/124M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project opale-ui: Could not resolve dependencies for project com.igc.opale:opale-ui:swf:1.9-SNAPSHOT: Could not transfer artifact com.adobe.flex.framework:playerglobal:swc:10.2.0:4.1.0.16076 from/to jboss (http://repository.jboss.org/maven2/): Access denied to: http://repository.jboss.org/maven2/com/adobe/flex/framework/playerglobal/4.1.0.16076/playerglobal-4.1.0.16076-10.2.0.swc, ReasonPhrase:Forbidden. -> [Help 1]
I new to maven so maybe i'm doing this pretty badly.
You can configure this in plugins
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<headlessServer>true</headlessServer>
<verboseStacktraces>true</verboseStacktraces>
<swfVersion>11</swfVersion>
<targetPlayer>10.2</targetPlayer>
...
</configuration>
</plugin>
</plugins>
And dependency:
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>4.5.1.21328</version>
<classifier>10.2</classifier>
<type>swc</type>
</dependency>
If you search the sonatype repo you will find that the actual dependency you are looking for is:
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>4.1.0.16076</version>
<classifier>10</classifier>
<type>1.swc</type>
</dependency>
notice how the type is 1.swc, I believe this is to cater for a shortfall in earlier versions of the SDK.

Resources