gwt-maven-plugin failing on gwt-app - java

I am having problems with getting the gwt-maven-plugin working as the docs have stated.
using GWT 2.8.2
using InteliJ 2018
Start with a sample project generated from the 2.8.2 webAppCreator with the templates maven,sample, readme.
That basic project has packaging set to war
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.gwtproject.tutorial</groupId>
<artifactId>TodoList</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>org.gwtproject.tutorial.TodoList</name>
The gwt-maven-plugin is set to 1.0-rc-8
<!-- GWT Maven Plugin-->
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0-rc-8</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<moduleName>org.gwtproject.tutorial.TodoList</moduleName>
<moduleShortName>TodoList</moduleShortName>
<failOnError>true</failOnError>
<!-- GWT compiler 2.8 requires 1.8, hence define sourceLevel here if you use
a different source language for java compilation -->
<sourceLevel>1.8</sourceLevel>
<!-- Compiler configuration -->
<compilerArgs>
<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->
<arg>-compileReport</arg>
<arg>-XcompilerMetrics</arg>
</compilerArgs>
<!-- DevMode configuration -->
<warDir>${project.build.directory}/${project.build.finalName}</warDir>
<classpathScope>compile+runtime</classpathScope>
<!-- URL(s) that should be opened by DevMode (gwt:devmode). -->
<startupUrls>
<startupUrl>TodoList.html</startupUrl>
</startupUrls>
</configuration>
</plugin>
At this point I can run in DEV mode. Once I change the packaging to gwt-app ( per the plugin's docs https://tbroyer.github.io/gwt-maven-plugin/usage.html) it fails.
[ERROR] Unknown packaging: gwt-app # line 9, column 14
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.gwtproject.tutorial:TodoList:1.0-SNAPSHOT (D:\ToDoList\pom.xml) has 1 error
[ERROR] Unknown packaging: gwt-app # line 9, column 14
[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]
Any idea as to the issue?
thanks

You're probably missing the <extensions>true</extensions> in the plugin.
Be aware that a gwt-app is only client code, with no server-side at all. I'd suggest using https://github.com/tbroyer/gwt-maven-archetypes instead of the webAppCreator as a starting point. The modular-webapp archetype is functionally identical to the sample project generated by the webAppCreator, but in a more Maven-oriented setup.

Related

How do I solve an index out of bounds exception using Maven to compile TeaVM?

I'm trying to figure out in the most rudimentary way possible how to use TeaVM to compile a wasm file from a .java file. My .java code is fairly simple and compiles successfully to Javascript if I use the maven .pom file provided on the TeaVM Getting Started page:
package org.teavm;
public class Scorer {
public static void main(String[] args) {
Double score = testScore();
//log(score);
}
//#JSBody(params = { "value" }, script = "console.log('Value is: ' + value)")
//public static native void log(double value);
public static double testScore(){
Double score = 8.0085;
return score;
}
}
My problem comes when I want to do the same thing, but compile it to .wasm instead of .js. (This is why the JSO stuff is commented out from the .java code). My .pom file is as follows:
<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>org.teavm</groupId>
<artifactId>teavm-maven-webapp</artifactId>
<version>0.6.1 </version>
<packaging>war</packaging>
<properties>
<java.version>1.8</java.version>
<teavm.version>0.6.1</teavm.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Emulator of Java class library for TeaVM -->
<dependency>
<groupId>org.teavm</groupId>
<artifactId>teavm-classlib</artifactId>
<version>${teavm.version}</version>
<scope>provided</scope>
</dependency>
<!-- JavaScriptObjects (JSO) - a JavaScript binding for TeaVM -->
<dependency>
<groupId>org.teavm</groupId>
<artifactId>teavm-jso-apis</artifactId>
<version>${teavm.version}</version>
<scope>provided</scope>
</dependency>
<!-- Servlet 3.1 specification -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Configure Java compiler to use Java 8 syntax -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<!-- Configure WAR plugin to include JavaScript !AND WASM! files generated by TeaVM -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>${project.build.directory}/generated/js</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated/wasm</directory>
</resource>
</webResources>
</configuration>
</plugin>
<!-- Configure TeaVM -->
<plugin>
<groupId>org.teavm</groupId>
<artifactId>teavm-maven-plugin</artifactId>
<version>${teavm.version}</version>
<executions>
<execution>
<id>web-client</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<!-- Directory where TeaVM should put generated files. This configuration conforms to the settings
of the WAR plugin -->
<targetDirectory>${project.build.directory}/generated/js/teavm</targetDirectory>
<!-- Main class, containing static void main(String[]) -->
<mainClass>org.teavm.Scorer</mainClass>
<!-- Whether TeaVM should produce minified JavaScript. Can reduce JavaScript file size more than
two times -->
<minifying>false</minifying>
<!-- Whether TeaVM should produce debug information for its built-in debugger -->
<debugInformationGenerated>true</debugInformationGenerated>
<!-- Whether TeaVM should produce source maps file -->
<sourceMapsGenerated>true</sourceMapsGenerated>
<!-- Whether TeaVM should also put source files into output directory,
for compatibility with source maps -->
<sourceFilesCopied>true</sourceFilesCopied>
<!-- Optimization level. Valid values are: SIMPLE, ADVANCED, FULL -->
<optimizationLevel>FULL</optimizationLevel>
<!-- <targetType>WEBASSEMBLY</targetType> -->
</configuration>
</execution>
<execution>
<id>wasm-client</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<!-- Directory where TeaVM should put generated files. This configuration conforms to the settings
of the WAR plugin -->
<targetDirectory>${project.build.directory}/generated/wasm/teavm-wasm</targetDirectory>
<!-- Main class, containing static void main(String[]) -->
<mainClass>org.teavm.Scorer</mainClass>
<!-- Whether TeaVM should produce debug information for its built-in debugger -->
<debugInformationGenerated>true</debugInformationGenerated>
<targetType>WEBASSEMBLY</targetType>
<!-- Optimization level. Valid values are: SIMPLE, ADVANCED, FULL -->
<optimizationLevel>FULL</optimizationLevel>
<minHeapSize>1</minHeapSize>
<maxHeapSize>16</maxHeapSize>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This is basically a combination of the "Getting Started" .pom file and the .pom file from the benchmark sample located here: https://github.com/konsoletyper/teavm/blob/master/samples/benchmark/pom.xml
I added the second execution block to the teavm plugin configuration section. Everything else in the benchmark .pom looks like it isn't related to .wasm file generation.
When I try to build (using mvn clean package, same as I used for the js-only version of this), I get the following error:
[INFO] Running TeaVM
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.876 s
[INFO] Finished at: 2022-02-24T18:43:21-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.teavm:teavm-maven-plugin:0.6.1:compile (wasm-client) on project teavm-maven-webapp: Unexpected error occurred: Array index out of range: 0 -> [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/MojoExecutionException
Does anyone know what might be causing this? I checked the apache wiki page url in the error log and it doesn't really help. I've never used either TeaVM or Maven before and this has me kind of stumped.

Java Web Application Failed to run as maven project

I am new to java . I am using apache netbeans 12.2 version to create new project and the java version is 17 . I followed the step to create java web application with maven but when I build it and try to run it I am getting following errors in the console window.
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project JavaProject: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
I checked in pom.xml file the required dependency already there , But why it not able to run?.
Here is the Pom.xml code .
<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.mycompany</groupId>
<artifactId>JavaProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>JavaProject-1.0-SNAPSHOT</name>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<failOnMissingWebXml>false</failOnMissingWebXml>
<jakartaee>8.0</jakartaee>
</properties>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${jakartaee}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<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>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${jakartaee}</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Here is the entire console with error message.
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project JavaProject: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
-----------------------------------------------------
realm = plugin>org.apache.maven.plugins:maven-war-plugin:2.3
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/mohammadhossan/.m2/repository/org/apache/maven/plugins/maven-war-plugin/2.3/maven-war-plugin-2.3.jar
urls[1] = file:/Users/mohammadhossan/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar
urls[2] = file:/Users/mohammadhossan/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar
urls[3] = file:/Users/mohammadhossan/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
urls[4] = file:/Users/mohammadhossan/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
urls[5] = file:/Users/mohammadhossan/.m2/repository/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.jar
urls[6] = file:/Users/mohammadhossan/.m2/repository/org/codehaus/plexus/plexus-io/2.0.5/plexus-io-2.0.5.jar
urls[7] = file:/Users/mohammadhossan/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
urls[8] = file:/Users/mohammadhossan/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.15/plexus-interpolation-1.15.jar
urls[9] = file:/Users/mohammadhossan/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
urls[10] = file:/Users/mohammadhossan/.m2/repository/com/thoughtworks/xstream/xstream/1.4.3/xstream-1.4.3.jar
urls[11] = file:/Users/mohammadhossan/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
urls[12] = file:/Users/mohammadhossan/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
urls[13] = file:/Users/mohammadhossan/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.8/plexus-utils-3.0.8.jar
urls[14] = file:/Users/mohammadhossan/.m2/repository/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
: ExceptionInInitializerError: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module #73bb1337
-> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Your version of Java is incompatible with your version of NetBeans because NetBeans 12.2 does not support the use of JDK 17. From the NetBeans 12.2 Release notes Downloading Apache NetBeans 12.2:
Apache NetBeans 12.2 runs on JDK LTS releases 8 and 11, as well as on
JDK 15, i.e., the current JDK release at the time of this NetBeans
release.
In general, when changing your version of NetBeans and/or Java, make sure that the versions are compatible. This is always documented in the NetBeans release notes.
You have two options to resolve this:
Upgrade to NetBeans 12.6 which supports Java 17.
Stay on NetBeans 12.2, but downgrade to Java 15 or lower. That is, make JDK 15 (or lower) your default platform for NetBeans 12.2.
Of course you may also have other issues with your project, but there is no point in worrying about those until you have fixed this problem.

Maven Proguard plugin - "proguard.Proguard not found on classpath" error

I am trying to obfuscate a jar-with-dependencies (although the same problem affects if I set as inFile the regular single jar).
I am using Java 8, but I have to use newer versions of Proguard and Proguard Maven Plugin, due to coverage of some jar dependencies that are from a higher version (otherwise I get an "Unsupported major-minor version" problem).
When executing "mvn clean install" the step is executed but I get a "proguard jar not found in pluginArtifacts error". See log below.
I have seen in Proguard Maven Plugin code that now you need (from 7.0.0) both proguard-base and proguard-core from com.guardsquare instead of the outdated previous version in net.sf.proguard - this one is not prepared for later jars.
Apparently the proguard jar is not found where I am specifying it - how should I include this dependency?
I am using this in my pom:
<build>
<plugins>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals><goal>proguard</goal></goals>
<configuration>
<injar>${project.build.finalName}-jar-with-dependencies.jar</injar>
<outjar>${project.build.finalName}-small.jar</outjar>
<proguardVersion>7.1.0</proguardVersion>
<options>
<option>-allowaccessmodification</option>
<option>-dontoptimize</option>
<option>-dontshrink</option>
<option>-dontnote</option>
<option>-dontwarn</option> <!-- added option to ignore com.sun missing classes -->
<option>-keepattributes Signature</option>
</options>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
</libs>
<dependencies>
<dependency>
<groupId>com.guardsquare</groupId>
<artifactId>proguard-base</artifactId>
<version>7.1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.guardsquare</groupId>
<artifactId>proguard-core</artifactId>
<version>7.1.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.4.0</version>
</plugin>
<plugins>
<pluginManagement>
</build>
Running it with -X debug flag:
[... proguard execution command which ends in:]
-printseeds, 'C:\workspace\xxx\target\proguard_seed.txt', -verbose, -allowaccessmodification, -dontoptimize, -dontshrink, -dontnote, -dontwarn, -keepattributes Signature]
...
[DEBUG] pluginArtifact: C:\User\myuser\.m2\repository\org\eclipse\sisu\org.eclipse.sisu.inject\0.0.0.M5\org.eclipse.sisu.inject-0.0.0.M5.jar
[DEBUG] pluginArtifact: C:\User\myuser\.m2\repository\org\codehaus\plexus\plexus-component-annotations\1.5.5\plexus-component-annotations-1.5.5.jar
[DEBUG] pluginArtifact: C:\User\myuser\.m2\repository\org\codehaus\plexus\plexus-classworlds\2.4\plexus-classworlds-2.4.jar
[INFO] proguard jar not found in pluginArtifacts
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.302 s
[INFO] Finished at: 2021-08-17T18:26:45
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.3.1:proguard (default) on project xxx: Obfuscation failed ProGuard (proguard.ProGuard) not found in classpath -> [Help 1]
The jar-with-dependencies is generated with Maven Assembly plugin.
I am using Java 1.8.
I was actually using proguard.Proguard instead of proguard.ProGuard. Typo took a day out of me.
However, there is some extra trickyness associated, in case it helps anyone: proguard-maven-plugin would not let me define newer versions of proguard dependencies except for the default one. E.g. 2.4.0 would only allow me to use 7.1.0-beta3 which is the default. It didn't recognize the libraries I would set in the dependencies section inside the plugin (for example, for 7.1.1).

Maven project with JAXB2 plugin does not work without maven clean

My Maven project with the JAXB2 plugin works without errors if I run
mvn clean install
but it always fails if I skip the clean and run
mvn install
In this case the generated classes are not generated again which is correct:
[INFO] No changes detected in schema or binding files - skipping JAXB generation.
But then I get an compilation error that the generated classes and packages can not be found when the rest of the static Java sources in this Maven project are compiled:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project [...]: Compilation failure: Compilation failure:
[ERROR] [...] package [...] does not exist
[ERROR] [... ]cannot find symbol
Here is the relevant part of my pom.xml (the rest is only dependencies):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>xjc-core</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/xsd/core</source>
</sources>
<packageName>com.example.core</packageName>
<clearOutputDir>false</clearOutputDir>
</configuration>
</execution>
<!-- ... and more <execution> -->
</executions>
Am I correct that the only solution is to separate the static sources and generated sources into different Maven modules? Or is there any other way?
There is a bug in jaxb2-maven-plugin v2.2 https://github.com/mojohaus/jaxb2-maven-plugin/issues/35.
This bug has been fixed in v2.3

Maven : Migrating Android project from Ant to Maven

I started an Android project, and by default it is built with ANT, I am trying to upgrade it to Maven so I can get rid of compile time problems I am having with Android SDK, and ease of library import and management. The problems I have encountered are :
1) How to modify build.xml to instruct it to use maven.
2) Maven complaining folder structure is wrong.
Here is my build.xml :
<?xml version="1.0" encoding="UTF-8"?>
<project name="myapp" default="help">
<property file="local.properties"/>
<property file="ant.properties"/>
<property environment="env"/>
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME"/>
</condition>
// and more
So I presume I have to modify the ant.properties attribute, how can I suggest to use Maven??
Here is the POM.xml I have pasted in the Parent directory of the project, but when I try to run mvn compile, I get the following error :
Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:4.0.0-rc.2:generate-sources (default-generate-sources) on project gs-maven-android:
[ERROR]
[ERROR] Found files or folders in non-standard locations in the project!
[ERROR] ....This might be a side-effect of a migration to Android Maven Plugin 4+.
[ERROR] ....Please observe the warnings for specific files and folders above.
[ERROR] ....Ideally you should restructure your project.
[ERROR] ....Alternatively add explicit configuration overrides for files or folders.
[ERROR] ....Finally you could set failOnNonStandardStructure to false, potentially resulting in other failures.
[ERROR] -> [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/MojoExecutionException
And finally, here is the POM.xml :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hello</groupId>
<artifactId>MyAPP</artifactId>
<version>1.0</version>
<packaging>apk</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>4.0.0-rc.2</version>
<configuration>
<sdk>
<platform>20</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
So what am I doing wrong here? Any help would be nice. I am using Intellij Idea on Ubuntu Linux. Thanks.
Please update to a full release version and then update the error message in the post. The latest release is 4.3.0.
The warning is about the source code and other sources being located in non-standard folders. You should use the standard structure. The full version will show error message with details where everything should be.

Categories

Resources