I am trying to convert flex 4.6 project into maven Following is my pom.xml
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>4.6.0.23201</version>
<type>pom</type>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>wrapper</goal>
</goals>
<configuration>
<parameters>
<swf>${build.finalName}</swf>
<width>100%</width>
<height>100%</height>
</parameters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>4.6.0.23201</version>
<type>pom</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>flexmojos</id>
<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
</repository>
</repositories>
Error I am getting is as follows:
[ERROR] The project com.adobe:gDash-main-maven:1.0-SNAPSHOT (C:\\pom.xml) has 1 error [ERROR] Unresolveable build extension: Plugin com.adobe.flex.compiler:batik- all-flex:4.6.0.23201 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.adobe.flex.compiler:batik-all-flex:jar :4.6.0.23201, com.adobe.flex:compiler:pom:4.6.0.23201: Could not find artifact com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 in central (http://repo.ma ven.apache.org/maven2) -> [Help 2] org.apache.maven.plugin.PluginResolutionException: Plugin com.adobe.flex.compile r:batik-all-flex:4.6.0.23201 or one of its dependencies could not be resolved: T he following artifacts could not be resolved: com.adobe.flex.compiler:batik-all- flex:jar:4.6.0.23201, com.adobe.flex:compiler:pom:4.6.0.23201: Could not find ar tifact com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 in central (http://repo.maven.apache.org/maven2)
I was also facing the same problem. Add this to your pom.xml
file (after <repositories>...</repositories>
for instance):
<pluginRepositories>
<pluginRepository>
<id>flex-mojos-plugin-repository</id>
<url>http://repository.sonatype.org/content/groups/flexgroup</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Solved it for me :)
Some IDEs will generate a POM file already containing this plugin repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With