Error when when generating Doxygen documentation with the Doxygen maven plugin - maven

I am trying to use the Maven Doxygen Plugin. I added that in the pom.xml of my project:
<reporting>
<plugins>
<plugin>
<groupId>net.sf.doodleproject</groupId>
<artifactId>doxygen-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</reporting>
<pluginRepositories>
<pluginRepository>
<id>doodleproject-repo</id>
<name>DoodleProject Maven 2 Repository</name>
<url>http://doodleproject.sourceforge.net/maven2/release</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
And I launch the command:
mvn -X net.sf.doodleproject:doxygen-maven-plugin:report
And I have this error:
[ERROR] Failed to execute goal net.sf.doodleproject:doxygen-maven-plugin:2.2:report (default-cli) on project project: An error has occurred in Doxygen report generation.
Failed to generate Doxygen documentation. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal net.sf.doodleproject:doxygen-maven-plugin:2.2:report (default-cli) on project amc: An error has occurred in Doxygen report generation.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Doxygen report generation.
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:83)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
Caused by: org.apache.maven.reporting.MavenReportException: Failed to generate Doxygen documentation.
at net.sf.doodleproject.mavenite.doxygen.DoxygenReport.executeReport(DoxygenReport.java:299)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:131)
Doxygen is working well when I use it on my project without the maven plugin.
There is something else to do to use the plugin?
Thanks for your help,

I tried with another plugin: com.soebes.maven.plugins.dmg and it's working.
My pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.soebes.maven.plugins.dmg</groupId>
<artifactId>doxygen-maven-plugin</artifactId>
<configuration>
<projectName>${project.artifactId}</projectName>
<projectNumber>${project.version}</projectNumber>
<optimizeOutputJava>true</optimizeOutputJava>
<extractAll>true</extractAll>
<extractStatic>true</extractStatic>
<recursive>true</recursive>
<exclude>.git</exclude>
<recursive>true</recursive>
<umlLook>true</umlLook>
<haveGraph>true</haveGraph>
<generateLatex>false</generateLatex>
<generateHtml>true</generateHtml>
<outputDirectory>${basedir}/doxygen_doc</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>doodleproject-repo</id>
<name>DoodleProject Maven 2 Repository</name>
<url>http://doodleproject.sourceforge.net/maven2/release</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>

Try this plugin. Worked great for me:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>

Related

Problems setting up dokka in Maven

I have added the following to my pom.xml, based on this page:
https://github.com/Kotlin/dokka#using-the-maven-plugin
pom.xml
<dependency>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>0.9.19-dev-15</version>
</dependency>
<pluginRepositories>
<pluginRepository>
<id>jcenter</id>
<name>JCenter</name>
<url>https://jcenter.bintray.com/</url>
</pluginRepository>
</pluginRepositories>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>0.9.19-dev-15</version>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>dokka</goal>
</goals>
</execution>
</executions>
<configuration>
<dokkaPlugins>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>kotlin-as-java-plugin</artifactId>
<version>0.9.19-dev-15</version>
</plugin>
</dokkaPlugins>
</configuration>
</plugin>
When I run the project, I get the following errors:
Dependency 'org.jetbrains.dokka:dokka-maven-plugin:0.9.19-dev-15' not found
Plugin 'org.jetbrains.dokka:dokka-maven-plugin:0.9.19-dev-15' not found
Can someone help out with this configuration? Thanks in advance.
For this version add the Kotlin Dev Maven repository to you project:
<repositories>
<repository>
<id>k-dev</id>
<name>K-dev</name>
<url>https://dl.bintray.com/kotlin/kotlin-dev/</url>
</repository>
</repositories>
You can see the URL of the repository for this library page on the Maven central:
Note: this artifact is located at Kotlin Dev repository (https://dl.bintray.com/kotlin/kotlin-dev/)

Can't find Maven artifact in Sonatype's repos

I see my published dependency here:
https://oss.sonatype.org/#nexus-search;quick~ores
it looks like this is the staging repo? Because when I search here:
https://search.maven.org/search?q=ores
I get no results:
My guess is that I publishing to staging not prod when I publish the artifact, anybody know how to publish to production using Sonatype?
In my pom.xml file I have:
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
and I have:
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
So perhaps I need to be using the production plugins instead of staging?
Seems tricky. When I set
<autoReleaseAfterClose>true</autoReleaseAfterClose>
I get this error:
[ERROR] Failed to execute goal
org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy
(injected-nexus-deploy) on project async.0.1: Execution
injected-nexus-deploy of goal
org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed:
403 - Forbidden -> [Help 1]

Dependencies work fine in maven but not in sbt

In my scala project I have a dependency that works fine in my maven project, but throws an error in my sbt project.
In this specific case the dependency in my build.sbt is:
"com.sksamuel.elastic4s" % "elastic4s-xpack-security_2.11" % "5.1.5"
while in my pom.xml:
[...]
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.11.8</scala.version>
<scala.compat.version>2.11</scala.compat.version>
<spark.version>2.1.0</spark.version>
</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>elasticsearch-releases</id>
<url>https://artifacts.elastic.co/maven</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</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>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.sksamuel.elastic4s</groupId>
<artifactId>elastic4s-xpack-security_${scala.compat.version}</artifactId>
<version>5.1.5</version>
</dependency>
[...]
and the error shown is:
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.elasticsearch.client#x-pack-transport;5.1.1: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.elasticsearch.client#x-pack-transport;5.1.1: not found
[error] Total time: 13 s, completed Mar 1, 2017 4:40:59 PM</pre><br/>See complete log in /Users/salvob/Library/Logs/IdeaIC2016.3/sbt.last.log
in fact the dependency doesn't exist.
But my question here is: Why in maven this issue doesn't show up? What does happen in maven that it doesn't in SBT ?
Add to build.sbt:
resolvers in ThisBuild += "elastic" at "https://artifacts.elastic.co/maven"
See Elastic documentation for gradle:
// Add the Elasticsearch Maven Repository
maven {
url "https://artifacts.elastic.co/maven"
}

maven does not change the snapshot jar file in local repository

We config jfrog artifactory successfully and create a pom.xml to build and deploy our basic jar files into it as snapshot. then we configure another project to get those jar files from repository and it did successfully too, then we try to change basic libraries and deploy it again as the same snapshot name, and it did correctly but when we want to get those libraries again, maven does not change the basic libraries in local repository, unless we change the version of the snapshot but we don't want to do it.
deploy pom.xml configuration file
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.2.2</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<deployProperties>
<gradle>awesome</gradle>
</deployProperties>
<artifactory>
<includeEnvVars>true</includeEnvVars>
<timeoutSec>60</timeoutSec>
<propertiesFile>publish.properties</propertiesFile>
</artifactory>
<publisher>
<contextUrl>{{ARTIFACTORY_CONTEXT_URL|"http://tls.local:9081/artifactory"}}</contextUrl>
<username>admin</username>
<password>AP5PqkrxgwKVMBeY6wxPYr66R3M</password>
<excludePatterns>*-tests.jar</excludePatterns>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
</publisher>
<buildInfo>
<buildName>plugin-demo</buildName>
<buildNumber>{{DRONE_BUILD_NUMBER|TRAVIS_BUILD_NUMBER|CI_BUILD_NUMBER|BUILD_NUMBER}}
</buildNumber>
<buildUrl>{{DRONE_BUILD_URL|CI_BUILD_URL|BUILD_URL}}</buildUrl>
</buildInfo>
<licenses>
<autoDiscover>true</autoDiscover>
<includePublishedArtifacts>false</includePublishedArtifacts>
<runChecks>true</runChecks>
<scopes>compile,runtime</scopes>
<violationRecipients>build#organisation.com</violationRecipients>
</licenses>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
third party pom.xml configuration file:
<repository>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://tls.local:9081/artifactory/libs-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
How can we achieve our goal?
first we must configure our jfrog repository's maven snapshot version behavior to unique and check handle releases and handle snapshot and then delete completely our local repository's snapshot

IntelliJ, Maven, Flexmojos - Failed to generate Flex compiler configuration file

I'm running a multi-project build in IntelliJ setup with Flexmojos.
All of the flex modules have a common parent pom file which is downloaded from Artifactory. This dependency seems to be resolved properly but when I hit "Reimport All Maven Projects", or do changes to any child pom file, I get an error
Flexmojos Project Import
**Failed to generate Flex compiler configuration file.**
The pipe has been ended
Flexmojos Project Import
**Failed to generate Flex compiler configuration file.**
exit code: 1
Globals (using maven 'defines' tag) defined in the parent pom are not visible in any child project and if I go into "Project Structure" there is
"Build configurations '[child artifactId]': additional compiler configuration file not found: [absolute path]"
, which is a symptom of the missing configuration files.
I think it is a settings (IntelliJ? Maven? Java?) issue because my colleague has the same code from SVN and does not have the same issue.
Any clues as to where to start looking?
EDIT:
Excerpt from idea.log
2013-08-13 16:35:34,213 [1978178] INFO - #org.jetbrains.idea.maven - Generating flex configs pathToBundledJar: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\plugins\flex\lib\flexmojos-flex-configs-generator-server.jar
2013-08-13 16:35:34,214 [1978179] INFO - #org.jetbrains.idea.maven - Generate Flex Configs Task:"c:\program files\java\jdk1.7.0_25\jre\bin\java" -Dfile.encoding=windows-1252 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\plugins\flex\lib\flexmojos-flex-configs-generator-server.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-api-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-connector-wagon-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-impl-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-spi-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-util-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aopalliance-1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\asm-3.3.1.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\cdi-api-1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\guava-11.0.2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\javax.inject-1.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\jsr250-api-1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\jsr305-1.3.9.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-aether-provider-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-artifact-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-compat-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-core-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-model-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-model-builder-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-plugin-api-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-repository-metadata-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-settings-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-settings-builder-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\org.eclipse.sisu.inject-0.0.0.M2a.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\org.eclipse.sisu.plexus-0.0.0.M2a.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-cipher-1.7.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-component-annotations-1.5.5.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-interpolation-1.16.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-sec-dispatcher-1.3.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-utils-3.0.10.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\sisu-guice-3.1.3-no_aop.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\slf4j-api-1.7.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\slf4j-simple-1.7.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\wagon-file-2.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\wagon-http-2.4-shaded.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\wagon-provider-api-2.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\boot\plexus-classworlds-2.4.2.jar" com.intellij.flex.maven.GeneratorServer "C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\conf\settings.xml" " " C:\Users\XXXXXXXX\.m2\repository f D:/XXXXXXXXXXX/trunk/.idea/flexmojos
2013-08-13 16:35:34,534 [1978499] ERROR - #org.jetbrains.idea.maven - The pipe has been ended
java.io.IOException: The pipe has been ended
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:318)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
at java.io.DataOutputStream.flush(DataOutputStream.java:123)
at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1816)
at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:716)
at com.intellij.javascript.flex.maven.Flexmojos4GenerateConfigTask.writeWorkspaceMap(Flexmojos4GenerateConfigTask.java:379)
at com.intellij.javascript.flex.maven.Flexmojos4GenerateConfigTask.runGeneratorServer(Flexmojos4GenerateConfigTask.java:198)
at com.intellij.javascript.flex.maven.Flexmojos4GenerateConfigTask.perform(Flexmojos4GenerateConfigTask.java:80)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:131)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$100(MavenProjectsProcessor.java:28)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107)
at org.jetbrains.idea.maven.utils.MavenUtil$9.run(MavenUtil.java:433)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:454)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:152)
2013-08-13 16:35:34,536 [1978501] ERROR - #org.jetbrains.idea.maven - IntelliJ IDEA 12.1.4 Build #IU-129.713
2013-08-13 16:35:34,536 [1978501] ERROR - #org.jetbrains.idea.maven - JDK: 1.7.0_25
2013-08-13 16:35:34,536 [1978501] ERROR - #org.jetbrains.idea.maven - VM: Java HotSpot(TM) 64-Bit Server VM
2013-08-13 16:35:34,536 [1978501] ERROR - #org.jetbrains.idea.maven - Vendor: Oracle Corporation
2013-08-13 16:35:34,536 [1978501] ERROR - #org.jetbrains.idea.maven - OS: Windows 7
2013-08-13 16:35:34,536 [1978501] ERROR - #org.jetbrains.idea.maven - Last Action: SaveAll
2013-08-13 16:35:34,537 [1978502] WARN - #org.jetbrains.idea.maven - Generating flex configs exited with exit code 1
2013-08-13 16:35:34,537 [1978502] INFO - #org.jetbrains.idea.maven - Generating flex configs out:
java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
at java.lang.Class.getMethod0(Class.java:2764)
at java.lang.Class.getMethod(Class.java:1653)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystemSession
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more
Exception in thread "main"
2013-08-13 16:35:35,036 [1979001] INFO - #org.jetbrains.idea.maven - Generating flex configs took 824 ms: 0 min 0sec
EDIT:
A typical child pom file has no build tag, it is supposed to inherit it from the base pom, they still have packaging 'swc' though.
Base pom has:
<flexmojos.version>4.2-beta</flexmojos.version>
<playerglobal.version>11.0</playerglobal.version>
<flexunit.version>4.1.0.8</flexunit.version>
<flex.sdk.version>4.5.1.21328</flex.sdk.version>
<flexpmd.version>1.2</flexpmd.version>
The full base 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.XXXXXX</groupId>
<artifactId>config</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Toolbox - Config</name>
<properties>
<build.debug>false</build.debug>
<swf.version>13</swf.version>
<flex.flashPlayer.command>C:\FlashPlayer.exe</flex.flashPlayer.command>
<flexmojos.version>4.2-beta</flexmojos.version>
<playerglobal.version>11.0</playerglobal.version>
<flexunit.version>4.1.0.8</flexunit.version>
<flex.sdk.version>4.5.1.21328</flex.sdk.version>
<flexpmd.version>1.2</flexpmd.version>
<path.source>src</path.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<scm>
<connection>scm:svn:XXXXXX</connection>
</scm>
<build>
<sourceDirectory>${path.source}</sourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flexmojos.version}</version>
<extensions>true</extensions>
<configuration>
<swfVersion>${swf.version}</swfVersion>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
</compilerWarnings>
<dumpConfigAttach>false</dumpConfigAttach>
<verboseStacktraces>${build.debug}</verboseStacktraces>
<debug>${build.debug}</debug>
<!--<coverage>${build.debug}</coverage>-->
<defines>
<property>
<name>CONFIG::debug</name>
<value>${build.debug}</value>
</property>
</defines>
<storepass>true</storepass>
</configuration>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.googlecode.apparat</groupId>
<artifactId>apparat-maven-plugin</artifactId>
<version>1.0-RC9</version>
<executions>
<execution>
<id>tdsi-package</id>
<goals>
<goal>tdsi</goal>
</goals>
</execution>
</executions>
<configuration>
<alchemyExpansion>false</alchemyExpansion>
<inlineExpansion>true</inlineExpansion>
<macroExpansion>true</macroExpansion>
</configuration>
</plugin>
<plugin>
<groupId>com.adobe.ac</groupId>
<artifactId>flex-pmd-maven-plugin</artifactId>
<version>${flexpmd.version}</version>
<configuration>
<ruleSet>../../pmd-ruleset.xml</ruleSet>
</configuration>
<executions>
<execution>
<phase>site</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.adobe.ac</groupId>
<artifactId>flex-pmd-cpd-maven-plugin</artifactId>
<version>${flexpmd.version}</version>
<configuration>
<minimumTokenCount>50</minimumTokenCount>
</configuration>
<executions>
<execution>
<phase>site</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.adobe.ac</groupId>
<artifactId>flex-pmd-metrics-maven-plugin</artifactId>
<version>${flexpmd.version}</version>
<executions>
<execution>
<phase>site</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>debug</id>
<properties>
<build.debug>true</build.debug>
</properties>
</profile>
</profiles>
<distributionManagement>
<snapshotRepository>
<id>snapshot</id>
<name>XXXXX</name>
<url>XXXXXX</url>
</snapshotRepository>
<repository>
<id>release</id>
<name>XXXXXX</name>
<url>XXXXXX</url>
</repository>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
<id>flex-mojos-plugin-repository</id>
<url>https://repository.sonatype.org/content/groups/flexgroup/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>XXXXX</id>
<url>XXXXXXX</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>flexpmd.opensource.adobe</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<name>FlexPMD repository on opensource.adobe.com</name>
<url>http://opensource.adobe.com/svn/opensource/flexpmd/maven-repository/release/</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>XXXXX</id>
<url>XXXXXX</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>flex-mojos-plugin-repository</id>
<url>https://repository.sonatype.org/content/groups/flexgroup/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</project>
It is bug due to "The switch in the core from Sonatype Aether to Eclipse Aether." since maven 3.1. Please watch&vote http://youtrack.jetbrains.com/issue/IDEA-112107.
I just hit the same problem. The java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession is the issue and generated when you configure Intellij to use Maven v3.1.0 which doesn't include this library. Roll back to using Maven 3.0.5 with your flexmojos project to get this working.
The issue is that the Flex Maven plug-in no longer generates the additional configuration file by default. I'm not sure if that is a Flex or a Maven thing. The easier solution I found is to tell the plug-in to generate the configuration file with the configurationReport flag:
mvn clean install -DconfigurationReport=true
This works with Maven 3.5.2.
I hope no one else in the world is still using Flex, and no one ever needs this information again. I should change my title to either Senior Code Janitor or Senior Software Necromancer.

Resources