Unable to Compile maven project - eclipse

I am using a maven project (v3.1.1) which I use for selenium automation. I have already hosted my project in Jenkins(in localhost) and trying to compile the project from the Jenkins itself.
com.eh.base
com.eh.pageobjects
com.eh.tests
[I am not using the structure like src\main\resource]
The maven plugin in Jenkins will achieve the compile process. I tried using maven plugin 2.2.1 as well as 3.1.1 with compile goal, it didn't work. In order to replicate this within the eclipse level. I tried to compile the maven project from the command prompt using the commands mvn clean, mvn compile.
BUILD RESULTS:
D:\Shaw\Shaw\Projects\Branch\MyProject>mvn compile
[INFO] Scanning for projects...
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # MyProject ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Shaw\Shaw\Projects\Branch\MyProject\src\main\resources
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # MyProject ---
[INFO] No sources to compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.352s
[INFO] Finished at: Thu Feb 13 01:36:23 IST 2014
[INFO] Final Memory: 10M/108M
[INFO] ------------------------------------------------------------------------
From this, I hoping that it will compile and generate the class files in the /target/classes. But this has not done so. Since I am using the custom package for my project, I think I should try maven archetype. Please advice.
Please let me know if I missed anything.
POM file:
<?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>
<artifactId>MyProject</artifactId>
<groupId>com.eh</groupId>
<version>1.0</version>
<packaging>jar</packaging>
<name>MyProject</name>
<description>A sample Maven project that demonstrates how to integrate Sauce OnDemand with WebDriver tests that run using JUnit
</description>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-xml</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-xml.jar</systemPath>
</dependency>
<dependency>
<groupId>BaseLibrary</groupId>
<artifactId>BaseLibrary</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/BaseLibrary.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-examples</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-examples.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-greplog</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-greplog.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-jdbc</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-jdbc.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-nblr</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-nblr.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-nbp</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-nbp.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-swing</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-swing.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-wadl</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-wadl.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-xmldog</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-xmldog.jar</systemPath>
</dependency>
<dependency>
<groupId>TestNGFileGenerator</groupId>
<artifactId>TestNGFileGenerator</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/TestNGFileGenerator.jar</systemPath>
</dependency>
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-core</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jlibs-core.jar</systemPath>
</dependency>
<dependency>
<groupId>SauceREST</groupId>
<artifactId>SauceREST</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/SauceREST.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.33.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.detro.ghostdriver</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.3</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.7.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
:
<property>
<name>org.uncommons.reportng.escape-output</name>
<value>false</value>
</property>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter</value>
</property>
</properties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.14</version>
<configuration>
<showSuccess>false</showSuccess>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<!-- put your configurations here -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>test</phase>
<configuration>
<tasks>
<zip destfile="${project.basedir}/target/surefire-reports/reports.zip"
basedir="${project.basedir}/target/surefire-reports/"
includes="**/*.html,**/*.xml,**/*.css"
/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>sauce-eh</id>
<name>sauce_quickstart</name>
<url>file://${project.basedir}/lib</url>
</repository>
<repository>
<id>java-net</id>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>saucelabs-repository</id>
<url>https://repository-saucelabs.forge.cloudbees.com/release</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>

I strongly recommend you to follow the default folder layout of Maven. That will make your life easier.
src/
├── main
│   ├── java
│ └── resources
└── test
├── java
└── resources

It is not recommended to tinker with the default folder structure of Maven projects. It seems that you have got rid of main/src and test altogether. I am not sure how, where or whether you are storing your test classes. Not having tests for your code can be costly in the long run.
Anyway, if you do decide to stick with your non-standard project structure, you will have to set the path to the source code as follows:
<project>
<build>
<sourceDirectory>src</sourceDirectory>
</build>
</project>
This will inform Maven that your source code is under src instead of src/main/java. If you also have resource files, such as XML or properties files, you will have to pass their locations to Maven as well using build/resources tag.

Related

Error while building Jar file in Intellij | Maven Plugins are missing?

I am getting below error while building Jar file. I am stuck with this issue from so long please advice.
Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile (default) on project Clinical_CDF: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile failed: Compilation failed
below is my pom.xml, I am trying to clone my git branch in intellij, after that trying to create a code but before that I am not even able to resolve dependencies . below is the content/xml code from 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.optum.csgbdptenant.clinical.cdf</groupId>
<artifactId>Clinical_CDF</artifactId>
<version>4.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
<java.version>1.8</java.version>
<scala.version>2.11.8</scala.version>
<scala.binary.version>2.11.8</scala.binary.version>
<spark.version>2.4.4.0-mapr-630</spark.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
<repository>
<id>mapr-releases</id>
<url>http://repository.mapr.com/maven/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>2.4.4.1-mapr-630</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.11</artifactId>
<version>2.4.4.1-mapr-630</version>
</dependency>
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-json_2.11</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.4</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.spark</groupId>-->
<!-- <artifactId>spark-hive_2.11</artifactId>-->
<!-- <version>2.4.4.0-mapr-630</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.7.0-mapr-1803-r1</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.scalatest</groupId>-->
<!--<artifactId>scalatest_2.11</artifactId>-->
<!--<version>3.0.1</version>-->
<!--<scope>test</scope>-->
<!--</dependency>-->
<dependency>
<groupId>org.scalactic</groupId>
<artifactId>scalactic_2.11</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.11</artifactId>
<version>3.0.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${scala.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.nscala-time/nscala-time -->
<dependency>
<groupId>com.github.nscala-time</groupId>
<artifactId>nscala-time_2.11</artifactId>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>com.mapr.db</groupId>
<artifactId>maprdb-spark</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.11</artifactId>
<version>2.1.0-mapr-1710</version>
<scope>provided</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.hbase</groupId>-->
<!--<artifactId>hbase</artifactId>-->
<!--<version>1.1.13.0-mapr-630</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-spark-20_2.10</artifactId>
<version>6.2.3</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.hive</groupId>-->
<!-- <artifactId>hive-hbase-handler</artifactId>-->
<!-- <version>2.3.6-mapr-1912</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.json4s</groupId>
<artifactId>json4s-native_2.11</artifactId>
<version>3.7.0-M2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.hortonworks/shc-core -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-spark</artifactId>
<version>1.1.8-mapr-1904</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.4.1-mapr-1408</version>
</dependency>
<dependency>
<groupId>com.optum.csgbdptenant.Common</groupId>
<artifactId>Common</artifactId>
<version>6.4</version>
<scope>system</scope>
<systemPath>${project.basedir}/jars/Common-6.4.jar</systemPath>
</dependency>
<dependency>
<groupId>PBEEncryption_Optum</groupId>
<artifactId>PBEEncryption_Optum</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${project.basedir}/jars/PBEEncryption_Optum.jar</systemPath>
</dependency>
<!-- <dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>2.0.0</version>
</dependency> -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>scripts/src/main/scala</sourceDirectory>
<resources>
<resource>
<directory>scripts/src/main/resources</directory>
</resource>
</resources>
<testSourceDirectory>scripts/src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>Acquire</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.5.6</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*TESTS*.*</include>
</includes>
</configuration>
<!--<configuration>-->
<!--<skipTests>false</skipTests>-->
<!--</configuration>-->
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<skipTests>false</skipTests>
<testFailureIgnore>false</testFailureIgnore>
<filereports>WDF TestSuite.txt</filereports>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
adding the log also
[INFO]
[INFO] ----------< com.optum.csgbdptenant.clinical.cdf:Clinical_CDF >----------
[INFO] Building Clinical_CDF 4.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # Clinical_CDF ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\sbhatt56\IdeaProjects\CASE_DETAIL_FACT\scripts\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # Clinical_CDF ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:4.5.6:compile (default) # Clinical_CDF ---
[WARNING] Expected all dependencies to require Scala version: 2.11.8
[WARNING] net.liftweb:lift-json_2.11:3.4.1 requires scala version: 2.11.12
[WARNING] Multiple versions of scala libraries detected!
[INFO] Using incremental compilation using Mixed compile order
[INFO] Compiler bridge file: C:\Users\sbhatt56\.sbt\1.0\zinc\org.scala-sbt\org.scala-sbt-compiler-bridge_2.11-1.5.8-bin_2.11.8__52.0-1.5.8_20211211T222914.jar
[INFO] compiling 14 Scala sources to C:\Users\sbhatt56\IdeaProjects\CASE_DETAIL_FACT\target\classes ...
[ERROR] C:/Users/sbhatt56/IdeaProjects/CASE_DETAIL_FACT/scripts/src/main/scala/member_policy.scala:5: expected class or object definition
[ERROR] one error found
Code testing
object RDDWithSession {
def main(args: Array[String]): Unit = {
//val sparkSession=SparkSession.builder()
val sparkSession = SparkSession.builder()
.appName("RRDSparkSession")
.config("hive.metastore.uris","thrift://apsrp07754.uhc.com:11848")
.enableHiveSupport()
.master("local")
.getOrCreate()
var recordcounts = ""
var notifymsg = ""
val updateddate = sparkSession.sql(s"select distinct update_dt from clinical.mbr_cse_pol_ref SORT by date(update_dt) DESC LIMIT 3")
notifymsg = s"Updated Records : $updateddate"
}
Thanks for the help !!

Issues with Hawtio after upgrading ActiveMQ Artemis

I upgraded an ActiveMQ Artemis 1.5 project to 2.17, and some things started breaking. Is there any recommended way to force the exclusion of the automatic loading of a file called index.html from? I don't want the Hawtio interface but the pom seems to include it automatically in my Tomcat's webapps directory. It is interrupting the load of my regular index page. Excluding for example artemis-console from the pom will still add another different index file this time from artemis-hawtio branding also called index.html.
This one will create it. There is several html files created and some other stuff.
<?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>artemis.playgroud.fake</groupId>
<artifactId>ArtemisPlayground</artifactId>
<packaging>war</packaging>
<name>Fake Webapp</name>
<description>Fake interproduct communication.</description>
<version>1.0-SNAPSHOT</version>
<properties>
<java.naming.factory.initial>org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory</java.naming.factory.initial>
<compiler.version>2.5.1</compiler.version>
<org.springframework.version>5.2.3.RELEASE</org.springframework.version>
<org.spring-security.version>5.2.3.RELEASE</org.spring-security.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${org.springframework.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>apache-artemis</artifactId>
<version>2.17.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-client</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-core-client</artifactId>
<!-- <version>1.5.6</version> -->
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-junit</artifactId>
<version>2.17.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.3.RELEASE</version>
</dependency>
</dependencies>
<build>
<finalName>fake-service</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<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.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<index>true</index>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Build-timestamp>${maven.build.timestamp}</Build-timestamp>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
The org.apache.activemq:apache-artemis dependency which you are using is a pom dependency type, i.e.:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>apache-artemis</artifactId>
<version>2.17.0</version>
<type>pom</type>
</dependency>
For your purposes (i.e. building a WAR) this means that Maven will scan all the modules in apache-artemis and include any which use <packaging>war</packaging>. In ActiveMQ Artemis version 2.17.0 this includes:
artemis-console
activemq-branding
artemis-plugin
You can see Maven's war plugin process these when you run mvn install on your example pom.xml, e.g.:
[INFO] --- maven-war-plugin:2.1:war (default-war) # ArtemisPlayground ---
[INFO] Packaging webapp
[INFO] Assembling webapp [ArtemisPlayground] in [/path/to/fake-service/target/fake-service]
[INFO] Processing war project
[INFO] Processing overlay [ id org.apache.activemq:artemis-console]
[INFO] Processing overlay [ id org.apache.activemq:activemq-branding]
[INFO] Processing overlay [ id org.apache.activemq:artemis-plugin]
[INFO] Webapp assembled in [285 msecs]
[INFO] Building war: /path/to/fake-service/target/fake-service.war
To be clear, none of these modules existed in ActiveMQ Artemis 1.5.0 which you were using previously. You can exclude these from your pom.xml, e.g.:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>apache-artemis</artifactId>
<version>2.17.0</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-console</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-branding</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-plugin</artifactId>
</exclusion>
</exclusions>
</dependency>
That said, I'm not sure you actually need to configure this specific dependency in the first place. If all you really need to do is embed the broker you can probably just use this:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-server</artifactId>
<version>2.17.0</version>
</dependency>

Running Mavenized ::Project Maven Studio Goal Post Error

I've got Maven installed. At command prompt mvn - version shows the right information. In Mule, the "Test Maven Configuration".
I try to Mavenize a project, or create a project with Maven from the start, or update project dependencies, I get the following Error on Console
The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.*****.mule:******-system-service:1.0.2-SNAPSHOT (C:\GIT\mainframe-system-service\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.2 or one of its dependencies could not be resolved: Failure to find org.mule.tools.maven:mule-app-maven-plugin:jar:1.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2]
[ERROR] Unknown packaging: mule # line 8, column 16
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
POM File
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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.mycompany.services</groupId>
<artifactId>sample-service</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>Mule sample-service Application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<mule.version>3.8.5</mule.version>
<mule.tools.version>1.2</mule.tools.version>
<munit.version>1.3.7</munit.version>
<mule.munit.support.version>3.8.6</mule.munit.support.version>
<com.ibm.wmq.version>7.5.0.2</com.ibm.wmq.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-app-maven-plugin</artifactId>
<version>${mule.tools.version}</version>
<extensions>true</extensions>
<configuration>
<copyToAppsDirectory>true</copyToAppsDirectory>
<inclusions>
<inclusion>
<groupId>org.mule.modules</groupId>
<artifactId>edi-module-x12</artifactId>
</inclusion>
<inclusion>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-anypoint-mq-ee</artifactId>
</inclusion>
<inclusion>
<groupId>com.mulesoft.munit.utils</groupId>
<artifactId>munit-synchronize-module</artifactId>
</inclusion>
<inclusion>
<groupId>org.mule.modules</groupId>
<artifactId>azure-storage-connector</artifactId>
</inclusion>
<inclusion>
<groupId>com.mulesoft.security</groupId>
<artifactId>mule-module-security-property-placeholder</artifactId>
</inclusion>
<inclusion>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-objectstore</artifactId>
</inclusion>
</inclusions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/app/</directory>
</resource>
<resource>
<directory>src/main/api/</directory>
</resource>
<resource>
<directory>mappings/</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mulesoft.munit.tools</groupId>
<artifactId>munit-maven-plugin</artifactId>
<version>${munit.version}</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<coverage>
<runCoverage>true</runCoverage>
<formats>
<format>html</format>
</formats>
</coverage>
</configuration>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>src/test/munit</directory>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
<!-- Mule Dependencies -->
<dependencies>
<!-- Xml configuration -->
<dependency>
<groupId>com.mycompany.ibm.db2</groupId>
<artifactId>db2jcc4</artifactId>
<version>10.0</version>
</dependency>
<dependency>
<groupId>com.mycompany.ibm.db2</groupId>
<artifactId>db2jcc_license_cisuz</artifactId>
<version>10.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.ibm/com.ibm.mq -->
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq</artifactId>
<version>${com.ibm.wmq.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.commonservices</artifactId>
<version>${com.ibm.wmq.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.headers</artifactId>
<version>${com.ibm.wmq.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.jmqi</artifactId>
<version>${com.ibm.wmq.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mqjms</artifactId>
<version>${com.ibm.wmq.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>connector</artifactId>
<version>${com.ibm.wmq.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>dhbcore</artifactId>
<version>${com.ibm.wmq.version}</version>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb</groupId>
<artifactId>mule-core-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Xml configuration -->
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-spring-config-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Transports -->
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-file</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-jdbc-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-jms-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-vm</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Modules -->
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-scripting</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- for testing -->
<dependency>
<groupId>org.mule.tests</groupId>
<artifactId>mule-tests-functional</artifactId>
<version>${mule.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-apikit</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>mule-munit-support</artifactId>
<version>${mule.munit.support.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>${munit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.2.jre8</version>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>edi-module-x12</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-anypoint-mq-ee</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-db</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-spring-config</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit.utils</groupId>
<artifactId>munit-synchronize-module</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-wmq-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.weave</groupId>
<artifactId>mule-plugin-weave</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-email</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>azure-storage-connector</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-json</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-validation</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.security</groupId>
<artifactId>mule-module-security-property-placeholder</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>03b2fd5d-0ae4-4388-b2a3-d760d568ff1c</groupId>
<artifactId>azure-auth-connector</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-schedulers</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-objectstore</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.mulesoft.anypoint</groupId>
<artifactId>mule-module-cors-gw</artifactId>
<version>3.8.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>Central</id>
<name>Central</name>
<url>http://repo1.maven.org/maven2/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<repository>
<id>Repository</id>
<name>Mycompany Repository</name>
<url>https://maven.anypoint.mulesoft.com/api/v1/organizations/03b2fd5d-0ae4-4388-b2a3-d760d568ff1c/maven</url>
</repository>
<repository>
<id>mule-ee-releases</id>
<name>MuleEE Releases Repository</name>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/releases-ee/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-release</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>http://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
I checked JDK is correctly set. I also checked with Maven, it's also correctly configured.
Regarding to Your new Maven friend – the Mule Maven Plugin 2.0 and Mule Plugin for Maven, we should configure the pluginRepositories as the following:-
<pluginRepositories>
<pluginRepository>
<id>mule-public</id>
<url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
</pluginRepository>
</pluginRepositories>
Note
We can browse it online by visiting
Index of /repositories/releases/org/mule/tools/maven/mule-app-maven-plugin

Maven not updating EAR with latest code in workspace after maven-install

I have a multi-module maven spring project with a main parent module(parent pom):
project
project-client
project-ear
project-filenet
project-jaxws
project-webservice
project-service-util
project-properties
When a maven clean install is performed the resulting EAR file does not have the updated version of project-jaxws, project-service-util and project-filenet module.
I have repeatedly tried recleaning it and installing it, restarting STS, restarting the machine but to no avail. Please explain why maven behaves this way and what to do to make maven build the EAR properly.
Parent 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>
<parent>
<groupId>com.abc.technology.maven</groupId>
<artifactId>global-parent</artifactId>
<version>24</version>
</parent>
<artifactId>project</artifactId>
<groupId>com.abc.technology</groupId>
<version>2.0.0.1-RC10-SNAPSHOT</version>
<packaging>pom</packaging>
<name>abc project Application</name>
<description>abc project web service and application</description>
<properties>
<!-- You will need to modify this property. It must point to the root of
your projects trunk/tags/branches structure. It is used by the Jenkins
Branch, Snapshot and Formal release builds to determine the correct locations
for publishing of tags and branches. It is also used in the Maven SCM section
below until the first Snapshot release at which point it will be token replaced
with the full value -->
<svn.root>${svn.base.url}/Technology/project</svn.root>
<!-- No requirement to statically analyse generated code -->
<sonar.skippedModules>project-ear</sonar.skippedModules>
<sonar.exclusions>com/ibm/**/*.java,org/**/*.java,**/EJS*.java,**com/abc/services/exceptions/*.java,**com/abc/services/common/commondatatypes/v1/*.java,**com/abc/services/framework/abcheader/v1/*.java,**com/abc/services/technology/documentdsm/v1/*.java,**com/abc/services/technology/enterprisedocumentservicecomponents/v1/*java,**com/abc/technology/project/contract/v1/*.java,**com/abc/technology/project/service/v1/*.java,**com/abc/technology/project/constants/*.java</sonar.exclusions>
<target.jdk>1.7</target.jdk>
</properties>
<scm>
<connection>scm:svn:${svn.root}/branches/project-2.0.0</connection>
<developerConnection>scm:svn:${svn.root}/branches/project-2.0.0</developerConnection>
<url>http://kau1p464.abc.com/svn/Technology/project/branches/project-2.0.0</url>
</scm>
<!-- Dependencies which are global to all modules -->
<dependencies>
<!-- Test dependencies, not present in application assembly -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- Only required to support STS / Eclipse compilation
Has "provided" scope in global-parent pom -->
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
</dependency>
</dependencies>
<modules>
<module>project-filenet</module>
<module>project-service-util</module>
<module>project-webservice</module>
<module>project-jaxws</module>
<module>project-client</module>
<module>project-ear</module>
<module>project-properties</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.abc.tech.framework</groupId>
<artifactId>service-invocation</artifactId>
<version>1.0.0.5</version>
</dependency>
<dependency>
<groupId>com.abc.technology.services</groupId>
<artifactId>manageform-client</artifactId>
<version>1.0.0.1</version>
</dependency>
<dependency>
<groupId>com.abc.tech.framework</groupId>
<artifactId>service-invocation-cxf</artifactId>
<version>1.0.0.6</version>
</dependency>
<dependency>
<groupId>com.abc.technology.framework</groupId>
<artifactId>webservicerouting</artifactId>
<version>1.0.0.0</version>
<exclusions>
<exclusion>
<artifactId>jaxws-rt</artifactId>
<groupId>com.sun.xml.ws</groupId>
</exclusion>
<exclusion>
<artifactId>istack-commons-runtime</artifactId>
<groupId>com.sun.istack</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
project-jaxws 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>
<parent>
<artifactId>project</artifactId>
<groupId>com.abc.technology</groupId>
<version>2.0.0.1-RC10-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>project-jaxws</artifactId>
<packaging>jar</packaging>
<name>abc project JAXWS Jar</name>
<description>Implements the technology layer for exposing the abc project service via JAXWS</description>
<dependencies>
<!-- business contract definition (Service interface and domain objects) -->
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>project-filenet</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- abc service invocation framework support -->
<dependency>
<groupId>com.abc.tech.framework</groupId>
<artifactId>service-invocation</artifactId>
</dependency>
<dependency>
<groupId>com.abc.tech.framework</groupId>
<artifactId>service-invocation-cxf</artifactId>
</dependency>
<!-- This dependency is provided at Runtime by a concrete implementation,
it is required to be referenced here to support compile time -->
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</dependency>
<!-- JSR 181 support
Only required to support STS / Eclipse compilation. Has "provided" scope
in global-parent pom -->
<dependency>
<groupId>javax.jws</groupId>
<artifactId>jsr181-api</artifactId>
</dependency>
<!-- JSR 250 support
Only required to support STS / Eclipse compilation. Has "provided" scope
in global-parent pom -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-common-utilities</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-tools-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
</dependency>
<!-- Logging support -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<!-- Support for AOP application of abc standard logging -->
<dependency>
<groupId>com.abc.tech.framework</groupId>
<artifactId>aspect-logging</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.filenet.p8</groupId>
<artifactId>jace</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>project-service-util</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<dependency>
<groupId>com.abc.technology.framework</groupId>
<artifactId>webservicerouting</artifactId>
</dependency>
<dependency>
<groupId>com.abc.technology.services</groupId>
<artifactId>manageform-client</artifactId>
<version>1.0.0.1</version>
</dependency>
<dependency>
<groupId>com.abc.technology.eal</groupId>
<artifactId>ealframework</artifactId>
<version>1.0.0.0-RC2-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<!-- This profile is active by default and will weave the logging aspects
into your byte code. The profile however may be disabled by running your
maven command line with the -P !weave-aspects switch, e.g. mvn clean install
-P !weave-aspects This is often useful when carrying out remote debugging
in the development environment as it removes the noise of the woven aspect
when tracing the execution path -->
<profiles>
<!-- <profile>
<id>weave-aspects</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>${aspectj.maven.plugin.version}</version>
</plugin>
</plugins>
</reporting>
</profile> -->
<profile>
<id>generate-service-classes</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.6.6</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.sourceDirectory}</sourceRoot>
<wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot>
<wsdlOptions>
<!-- <wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/ManageDocument/Technology-ManageDocument.wsdl</wsdl>
<bindingFiles>
<bindingFile>${basedir}/src/main/resources/jaxws/jaxws-binding.xml</bindingFile>
</bindingFiles>
<extraargs>
Argument generates the JAX-WS service endpoint implementation class
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
<extraarg>-wsdlLocation</extraarg>
<extraarg />
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/ManageDocument/service/v1=com.abc.technology.managedocument.service.v1</extraarg>
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/ManageDocument/contract/v1=com.abc.technology.managedocument.contract.v1</extraarg>
<extraarg>-nexclude</extraarg>
<extraarg>http://services.abc.com/framework/abcHeader/v2</extraarg>
</extraargs>
</wsdlOption> -->
<!-- <wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/RetrieveDocument/Technology-RetrieveDocument.wsdl</wsdl>
<bindingFiles>
<bindingFile>${basedir}/src/main/resources/jaxws/jaxws-binding.xml</bindingFile>
</bindingFiles>
<extraargs>
Argument generates the JAX-WS service endpoint implementation class
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
<extraarg>-wsdlLocation</extraarg>
<extraarg />
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/RetrieveDocument/service/v1=com.abc.technology.retrievedocument.service.v1</extraarg>
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/RetrieveDocument/contract/v1=com.abc.technology.retrievedocument.contract.v1</extraarg>
<extraarg>-nexclude</extraarg>
<extraarg>http://services.abc.com/framework/abcHeader/v2</extraarg>
</extraargs>
</wsdlOption> -->
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/RetrieveDocumentMetadata/Technology-RetrieveDocumentMetadata.wsdl</wsdl>
<bindingFiles>
<bindingFile>${basedir}/src/main/resources/jaxws/jaxws-binding.xml</bindingFile>
</bindingFiles>
<extraargs>
<!-- Argument generates the JAX-WS service endpoint implementation class -->
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
<extraarg>-wsdlLocation</extraarg>
<extraarg />
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/RetrieveDocumentMetadata/service/v1=com.abc.technology.retrievedocumentmetadata.service.v1</extraarg>
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/RetrieveDocumentMetadata/contract/v1=com.abc.technology.retrievedocumentmetadata.contract.v1</extraarg>
<extraarg>-nexclude</extraarg>
<extraarg>http://services.abc.com/framework/abcHeader/v2</extraarg>
</extraargs>
</wsdlOption>
<!-- <wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/SearchDocument/Technology-SearchDocument.wsdl</wsdl>
<bindingFiles>
<bindingFile>${basedir}/src/main/resources/jaxws/jaxws-binding.xml</bindingFile>
</bindingFiles>
<extraargs>
Argument generates the JAX-WS service endpoint implementation class
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
<extraarg>-wsdlLocation</extraarg>
<extraarg />
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/SearchDocument/service/v1=com.abc.technology.searchdocument.service.v1</extraarg>
<extraarg>-p</extraarg>
<extraarg>http://services.abc.com/Technology/SearchDocument/contract/v1=com.abc.technology.searchdocument.contract.v1</extraarg>
<extraarg>-nexclude</extraarg>
<extraarg>http://services.abc.com/framework/abcHeader/v2</extraarg>
</extraargs>
</wsdlOption> -->
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<sonar.exclusions>com/ibm/**/*.java,org/**/*.java,**/EJS*.java,**com/abc/services/exceptions/*.java,**com/abc/services/common/commondatatypes/v1/*.java,**com/abc/services/framework/abcheader/v1/*.java,**com/abc/services/technology/documentdsm/v1/*.java,**com/abc/services/technology/enterprisedocumentservicecomponents/v1/*java,**com/abc/technology/project/contract/v1/*.java,**com/abc/technology/project/service/v1/*.java</sonar.exclusions>
</properties>
</project>

Error in Eclipse Luna in m2e plugin when adding dependency to AspectJ

I'm trying to use AspectJ in my project. When I try to add the maven plugin aspectj-maven-plugin in my pom.xml, I get this error:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.7:compile (execution: default, phase: compile)
I already tried to install the AspectJ toolkit + AspectJ m2e connector, but then I get an error at every annotation, because the compile level seems to be not 1.5 or above.
My setup is: Eclipse Luna + Java EE7 + JDK8.
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>de.dickschmeck</groupId>
<artifactId>housekeepingbook-web</artifactId>
<version>0.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>Web Project</name>
<description>Web Project</description>
<properties>
<junit.version>4.11</junit.version>
<log4j.version>2.0.2</log4j.version>
<primefaces.version>4.0</primefaces.version>
</properties>
<dependencies>
<!-- Java EE 7 dependency -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- JSR-330 -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- JSF -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<!-- Primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.0</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.2.2.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.2.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.2.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<!-- log4j -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
</repository>
</repositories>
<build>
<plugins>
<!-- Avoid war plugin complaining missing web.xml -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.0.0.Final</version>
<configuration>
<hostname>${wildfly-hostname}</hostname>
<port>${wildfly-port}</port>
<username>${wildfly-username}</username>
<password>${wildfly-password}</password>
</configuration>
</plugin>
</plugins>
</build>
Thank you very much in advance for your answers!
That is more a problem or quirk of the m2e plugin and is nothing specific to aspectj - which is also the reason it works in #kriegaex 's IntelliJ IDEA.
Here's a relevant site of the Eclipse-Wiki explaining the cause: http://wiki.eclipse.org/M2E_plugin_execution_not_covered
This question is about the same problem and one possible solution appears to be to add a corresponding <pluginManagement>-tag as described in the highest voted answer.
Also keep in mind that this error only pertains to the build of your application in Eclipse. It has no bearing on the maven build and can be safely ignored if you only ever build your project via maven - the quick fixes suggested for the error by Eclipse should give the option to ignore the error.
I do not understand your problem exactly, but maybe it helps if I tell you that in order to get an AJDT (AspectJ Development Tools) version for Luna, currently you need to use a snapshot/developer version available from
http://download.eclipse.org/tools/ajdt/44/dev/update/
The POM as such seems to be okay, at least it works on an empty project in IntelliJ IDEA or from the Maven command line.