I am trying to deploy AEM with maven, so I follow this tutorial. When I run the command mvn clear package, I get the following error:
C:\workspace\myproject\app>mvn clean package
[INFO] Scanning for projects...
[WARNING] The POM for com.day.jcr.vault:maven-vault-plugin:jar:0.0.10 is missing
, no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.uum:app:1-SNAPSHOT (C:\workspace\myproject\app\pom.xml
) has 3 errors
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-
plugin:0.0.10 or one of its dependencies could not be resolved: Failure to find
com.day.jcr.vault:maven-vault-plugin:jar:0.0.10 in http://repo.maven.apache.org/
maven2 was cached in the local repository, resolution will not be reattempted un
til the update interval of central has elapsed or updates are forced -> [Help 2]
[ERROR] Unknown packaging: content-package # line 12, column 16
[ERROR] 'dependencies.dependency.groupId' for :core:jar is missing. # line 1
8, column 22
[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/PluginResoluti
onException
my myproject/app/pom.xml looks like this:
<?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>
<parent>
<groupId>com.uum</groupId>
<artifactId>parent</artifactId>
<relativePath>../parent/pom.xml</relativePath>
<version>1-SNAPSHOT</version>
</parent>
<artifactId>app</artifactId>
<packaging>content-package</packaging>
<name>Sample Application package</name>
<dependencies>
<dependency>
<groupId><!-- {groupId} --></groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<!-- add additional dependencies -->
</dependencies>
<build>
<resources>
<resource>
<directory>${basedir}/META-INF</directory>
<targetPath>../vault-work/META-INF</targetPath>
</resource>
<resource>
<directory>${basedir}/jcr_root</directory>
<excludes>
<exclude>**/.vlt</exclude>
<exclude>**/.vltignore</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/.classpath</exclude>
<exclude>**/.project</exclude>
<exclude>**/.DS_Store</exclude>
<exclude>**/target/**</exclude>
<exclude>libs/**</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>maven-vault-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>Sample</group>
<requiresRoot>true</requiresRoot>
<install>true</install>
<verbose>true</verbose>
<packageFile>${project.build.directory}/${project.artifactId}-${project.version}.zip</packageFile>
<version>${project.version}</version>
<properties>
<acHandling>overwrite</acHandling>
</properties>
<embeddeds>
<embedded>
<groupId><!-- {groupId} --></groupId>
<artifactId>core</artifactId>
<target><!-- {install path in the repository (e.g. /apps/myproject/install)} --></target>
</embedded>
</embeddeds>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>installPackages</id>
<activation>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>maven-vault-plugin</artifactId>
<executions>
<execution>
<id>install-package</id>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Any idea how to get the deployment with maven works?
It looks maven does not know where to find the maven-vault-plugin. You will need to add the Adobe repository to your maven POM, see http://repo.adobe.com/.
That will cause the Unresolveable build extension: Plugin com.day.jcr.vault:maven-vault-
plugin:0.0.10 error and the Unknown packaging: content-package # line 12, column 16 errors.
Also, you still have some variable placeholders (<groupId><!-- {groupId} --></groupId>) from the tutorial left in your code that will need replacing. See the error:
[ERROR] 'dependencies.dependency.groupId' for :core:jar is missing. # line 18, column 22
In the <embeddeds> section of the vault plugin configuration, you can specify maven dependencies that you wish to include. An example of this can be seen in this Managing packages with Maven page.
If you don't want to include any external dependencies in your package right now, you could probably remove the<embeddeds> section altogether.
be sure that you have started CQ/AEM before building project. A lot of errors familiar with vault and maven arise because it.
Related
I add jib into a pom.xml file as the followings:
<properties>
<docker.org>springcloudstream</docker.org>
<docker.version>${project.version}</docker.version>
</properties>
...
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<from>
<image>springcloud/openjdk</image>
</from>
<to>
<image>${docker.org}/${project.artifactId}:${docker.version}</image>
</to>
<container>
<useCurrentTimestamp>true</useCurrentTimestamp>
</container>
</configuration>
</plugin>
</plugins>
</build>
After running the following build command,
./mvnw package jib:dockerBuild
I get the following error.
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.1.0:dockerBuild (default-cli) on project usage-detail-sender-kafka: Unable to parse configuration of mojo com.google.cloud.tools:jib-maven-plugin:2.1.0:dockerBuild for parameter useCurrentTimestamp: Cannot find 'useCurrentTimestamp' in class com.google.cloud.tools.jib.maven.JibPluginConfiguration$ContainerParameters
The UseCurrentTimestamp is already in the configuration. After an online search, I only find one entry: https://github.com/GoogleContainerTools/jib/issues/413. I can't see a solution on the page.
What is missing?
The CHANGELOG indicates that useCurrentTimestamp was deprecated and removed in 2.0.0:
Removed deprecated <container><useCurrentTimestamp> configuration in favor of <container><creationTime> with USE_CURRENT_TIMESTAMP
It looks like you need to replace
<useCurrentTimestamp>true</useCurrentTimestamp>
with
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
I have an eclipse java/jar project that used to statically link to other jar files. I remade this project into a maven project (Listing 1) so I could remove these static jar files and let maven resolve them.
And I have another war web application that I also transformed another project MyWarProject that used to have a dependency on MyJarProject to maven. And added MyJarProject as a dependency (Listing 2).
This the upper section pom.xml for my jar project
<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>MyJarProject</groupId>
<artifactId>MyJarProject</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>......
This is the full listing pom.xml for the war project that depends on the jar file
<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>MyWarProject</groupId>
<artifactId>MyWarProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>MyJarProject</groupId>
<artifactId>MyJarProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>${artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
The first jar projects builds fine after a maven clean install. However the war project displays this error message. Those missing classes like ItemsDAO are supposed to be resolved from the jar project.
And no jar file is actually copied to the WEB-INF folder. Please help!
INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # MyWarProject ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) # MyWarProject ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 41 source files to C:\Users\iaddou\workspace1\MyWarProject\target\classes
[INFO] Some input files use or override a deprecated API.
[INFO] Recompile with -Xlint:deprecation for details.
[INFO] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\utility\MegaItemProcessCodeType.java uses unchecked or unsafe operations.
[INFO] Recompile with -Xlint:unchecked for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/utility/WebServicesLogger.java:[3,30] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\utility\WebServicesLogger.java:3: package com.rd.test.common does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/utility/WebServicesLogger.java:[15,32] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\utility\WebServicesLogger.java:15: package com.documentum.fc.client does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/utility/WebServicesLogger.java:[216,17] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\utility\WebServicesLogger.java:216: cannot find symbol
symbol : class IDfSession
location: class com.rd.test.MyWarProject.utility.WebServicesLogger
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemsImpl.java:[15,30] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemsImpl.java:15: package com.rd.test.common does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemsImpl.java:[16,30] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemsImpl.java:16: package com.rd.test.common does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemsImpl.java:[17,35] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemsImpl.java:17: package com.rd.test.common.data does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemsImpl.java:[42,13] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemsImpl.java:42: cannot find symbol
symbol : class ItemsDAO
location: class com.rd.test.MyWarProject.MegaItemsImpl
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemVersionHistoryImpl.java:[11,30] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemVersionHistoryImpl.java:11: package com.rd.test.common does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemVersionHistoryImpl.java:[12,30] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemVersionHistoryImpl.java:12: package com.rd.test.common does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemVersionHistoryImpl.java:[13,35] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemVersionHistoryImpl.java:13: package com.rd.test.common.data does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemVersionHistoryImpl.java:[40,17] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemVersionHistoryImpl.java:40: cannot find symbol
symbol : class VersionHistoryDAO
location: class com.rd.test.MyWarProject.MegaItemVersionHistoryImpl
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemDetailImpl.java:[12,30] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemDetailImpl.java:12: package com.rd.test.common does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemDetailImpl.java:[13,30] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemDetailImpl.java:13: package com.rd.test.common does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemDetailImpl.java:[14,35] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemDetailImpl.java:14: package com.rd.test.common.data does not exist
[ERROR] /C:/Users/iaddou/workspace1/MyWarProject/src/com/rd/test/MyWarProject/MegaItemDetailImpl.java:[39,17] C:\Users\iaddou\workspace1\MyWarProject\src\com\rd\test\MyWarProject\MegaItemDetailImpl.java:39: cannot find symbol
symbol : class ItemDAO
I am trying to make a single jar with all dependencies resolved so that I can run this jar from command prompt. I am using maven's assembly:single but whenever I am doing so, I get an issue
[ERROR] com.XXX.XXXX.XXX:XXX-XXX-XXX:jar:XXX
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] A (http://XXXXX/, releases=true, snapshots=true),
[ERROR] B (http://XXXX/, releases=true, snapshots=true),
[ERROR] C (https://repo.maven.apache.org/maven2/, releases=true, snapshots=true
),
[ERROR] D (https://XXXXX, releases=false, snapshots=true)
[ERROR] Path to dependency:
[ERROR] 1) com.test.Report:myjar:jar:0.0.1-SNAPSHOT
[ERROR] -> [Help 1]
[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/MojoExecutionE
xception
This is the pom I am working with
Now these jars are already resolved and are present in Maven Dependency folder. I can run the whole project from Eclipse but need to give this jar to client with all the jars included. Any help is appreciated. Thanks :)
One approach is to use the "jar-with-dependencies" configuration in your pom.xml. This will package all your dependencies in the jar.
For eg:
<build>
<plugins>
<!-- any other plugins -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
Another approach is to use the maven shade plugin.
For eg:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<!-- put your configurations here -->
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
</project>
The maven shade plugin will basically create two jars at the end. The first jar is the normal jar which contains just the compiled classes of your source code.
The second jar will also contain your compiled classes but it will also include the class files from all your dependencies. This is the jar that you should give to your client.
Ok. Probably no one would be looking at this answer but still I would like to have a note for my future self. This issue was different from what exception I was getting. To run any plugin make sure that <plugin> is inside <plugins> inside <build> (not under <pluginManagement>). Doing this ran the plugin and jar with dependencies was formed upon mvn install.
Can someone help me out with this problem ... i have spent too much time with this error but couldnt solve this ...
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.1:
deploy (default-cli) on project HelloMaven: Cannot invoke Tomcat manager: Connection to http:// localhost:8080 refused: Connection refused: connect -> [Help 1]
[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/ConnectException
Following is my pom.xml :
<modelVersion>4.0.0</modelVersion>
<groupId>com.abc.app</groupId>
<artifactId>HelloMaven</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>HelloMaven Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>HelloMaven</finalName>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<url>http://localhost:8080/manager/html</url>
<server>TomcatServer</server>
<path>/HelloMaven</path>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
First clarify which version of Tomcat you are running. It's essentially important because configuration is sligthly different. I will describe it for Tomcat 7.
Define a new user in your tomcat-user.xml and assign it the privilege "manager-script". This user should have no other manager-...-Roles.
Open your pom.xml and change the configuration of your tomcat7-plugin. Change the url to http:// localhost:8080/manager/text. Keep in mind that you use the text-console and not the html-console.
Goto your settings.xml and check, that there is a server-configuration with the corresponding id that you use in your tomcat7-plugin-configuration.
for example:
<server>
<id>TomcatServer</id>
<username>scriptuser</username>
<password>mypassword</password>
</server>
I have a flex project that I need to convert into a maven project. I am using m2e for Eclipse and at the bottom of this post is the POM.xml file that I have created.
My issue is that I cannot seem to run a mvn clean install on this POM. In Eclipse there is an error highlighting the first "plugin" line that says:
-Plugin execution not covered by lifecycle configuration:
org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:test-compile
(execution: default-test-compile, phase: test-compile)
and
-Plugin execution not covered by lifecycle configuration:
org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:compile-swf
(execution: default-compile-swf, phase: compile)
Beyond that, if I do run the mvn clean install I get a different error:
Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:
3.7.1:compile-swf (default-compile-swf) on project flex: Failure to find
com.adobe.flex.framework:framework:rb.swc:en_US:3.2.0.3958 in
nexusserver/nexus/content/groups/public was cached in the local repository,
resolution will not be reattempted until the update interval of nexus has
elapsed or updates are forced
I am looking at the nexus server and I see:
-com\adobe\flex\framework\framework\3.2.0.3958
Inside there are a bunch of zips and stuff, and the file: framework-3.2.0.3958.rb.swc
So I'm not sure what actually the problem is. I'm still a bit of a maven novice and I've never actually used flex before so I think I am just a little overwhelmed at the moment. Does anyone have any ideas how to fix at least one of the issues? Thank you for your time.
edit: Even worse, the file is located in my local repository so I have no idea why it isn't seeing it.
--
POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated from the following command: mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/public
-DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application
-DarchetypeVersion=3.7.1 -->
<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.company.ref</groupId>
<artifactId>flex</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>
<name>flex</name>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.7.1</version>
<extensions>true</extensions>
<configuration>
<locales>
<locale>en_US</locale>
</locales>
</configuration>
</plugin>
</plugins>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>test-compile</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.2.0.3958</version>
<type>pom</type>
</dependency>
</dependencies>
<profiles>
<profile><!--https://docs.sonatype.org/pages/viewpage.action?pageId=2949459 -->
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.maven.ide.eclipse</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>0.9.9-SNAPSHOT</version>
<configuration>
<mappingId>customizable</mappingId>
<configurators>
<configurator
id='org.maven.ide.eclipse.configuration.flex.configurator' />
</configurators>
<mojoExecutions>
<mojoExecution>org.apache.maven.plugins:maven-resources-plugin::</mojoExecution>
</mojoExecutions>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
This is the full error I get:
[INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[WARNING] Source file was not defined, flexmojos will guess one.
[WARNING] Not defined if locales should be merged or not
[WARNING] Unable to find license.jar on classpath. Check wiki for instructions about how to add it:
URL
Downloading: nexusURL/nexus/content/groups/public/com/adobe/flex/framework/framework/3.2.0.3958/framework-3.2.0.3958-en_US.rb.swc
[INFO] Unable to find resource 'com.adobe.flex.framework:framework:rb.swc:en_US:3.2.0.3958' in repository central (central)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex.framework -DartifactId=framework -Dversion=3.2.0.3958 -Dclassifier=en_US -Dpackaging=rb.swc -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex.framework -DartifactId=framework -Dversion=3.2.0.3958 -Dclassifier=en_US -Dpackaging=rb.swc -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
com.adobe.flex.framework:framework:rb.swc:3.2.0.3958
from the specified remote repositories: central
Update 3:This is my new 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.company.table</groupId>
<artifactId>flex</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>
<name>flex</name>
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>https://repository.sonatype.org/content/groups/flexgroup</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>flex-mojos-repository</id>
<url>https://repository.sonatype.org/content/groups/flexgroup</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.7.1</version>
<extensions>true</extensions>
</plugin>
</plugins>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.2.0.3958</version>
<type>pom</type>
</dependency>
</dependencies>