Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven + AndroidAnnotations generated but not reachable classes
    primarykey
    data
    text
    <p>Alright.</p> <p>I'm attempting to create a project which is perfectly build able by using maven, and maven only.</p> <p>Currently I'm facing this issue of classes being generated, and working fine, as long as there is no reference in actual java code.</p> <p>Meaning, that if I create an example as in the <a href="https://github.com/excilys/androidannotations/blob/develop/examples/maveneclipse/src/main/java/com/googlecode/androidannotations/maveneclipse/HelloAndroidActivity.java" rel="nofollow noreferrer" title="documentation AA">documentation</a> it works.</p> <p>As soon as I do something like </p> <blockquote> <p>Intent i = new Intent(SettingsActivity_);</p> </blockquote> <p>then the build fails with</p> <blockquote> <p>Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project InterestingFind: Compilation failure cannot find symbol</p> </blockquote> <pre><code>cannot find symbol symbol: variable DerpActivity_ location: class be.company.android.DisplayMapActivity </code></pre> <p>The files however, do get generated, as you can see in the image attached, but when the project is looked at in en Eclipse view, they are solely seen as normal folders, and not as 'source folder'.</p> <p>This might explain why they are not picked up, but gives me a bit of a headache. I cloned an android archetype, the release build.</p> <p>Please, be of assistance if you in some way think you can aid me with this problem!<img src="https://i.stack.imgur.com/2tG81.png" alt="Project structure"></p> <blockquote> <p> http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0</p> </blockquote> <pre><code>&lt;parent&gt; &lt;groupId&gt;be.idamediafoundry&lt;/groupId&gt; &lt;artifactId&gt;InterestingFind-parent&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;/parent&gt; &lt;groupId&gt;be.idamediafoundry&lt;/groupId&gt; &lt;artifactId&gt;InterestingFind&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;packaging&gt;apk&lt;/packaging&gt; &lt;name&gt;InterestingFind - Application&lt;/name&gt; &lt;properties&gt; &lt;androidannotations.version&gt;3.0-SNAPSHOT&lt;/androidannotations.version&gt; &lt;/properties&gt; &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;snapshots-repository&lt;/id&gt; &lt;name&gt;Sonatype oss snapshot repo&lt;/name&gt; &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots&lt;/url&gt; &lt;/repository&gt; &lt;/repositories&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.android&lt;/groupId&gt; &lt;artifactId&gt;android&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;de.akquinet.android.androlog&lt;/groupId&gt; &lt;artifactId&gt;androlog&lt;/artifactId&gt; &lt;/dependency&gt; &lt;!-- JSON --&gt; &lt;dependency&gt; &lt;groupId&gt; org.codehaus.jackson&lt;/groupId&gt; &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt; &lt;version&gt;1.9.5&lt;/version&gt; &lt;/dependency&gt; &lt;!-- AndroidAnnotations --&gt; &lt;dependency&gt; &lt;groupId&gt;org.androidannotations&lt;/groupId&gt; &lt;artifactId&gt;androidannotations&lt;/artifactId&gt; &lt;version&gt;${androidannotations.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.androidannotations&lt;/groupId&gt; &lt;artifactId&gt;androidannotations-api&lt;/artifactId&gt; &lt;version&gt;${androidannotations.version}&lt;/version&gt; &lt;/dependency&gt; &lt;!-- Needed for androidannotations --&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.android&lt;/groupId&gt; &lt;artifactId&gt;spring-android-rest-template&lt;/artifactId&gt; &lt;version&gt;${spring-android-version}&lt;/version&gt; &lt;/dependency&gt; &lt;!-- Google Play Services : Should be compiled and added to local repo --&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.android.gms&lt;/groupId&gt; &lt;artifactId&gt;google-play-services&lt;/artifactId&gt; &lt;version&gt;5&lt;/version&gt; &lt;type&gt;apklib&lt;/type&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;version&gt;3.5.1&lt;/version&gt; &lt;inherited&gt;true&lt;/inherited&gt; &lt;extensions&gt;true&lt;/extensions&gt; &lt;configuration&gt; &lt;androidManifestFile&gt;${project.basedir}/AndroidManifest.xml&lt;/androidManifestFile&gt; &lt;assetsDirectory&gt;${project.basedir}/assets&lt;/assetsDirectory&gt; &lt;resourceDirectory&gt;${project.basedir}/res&lt;/resourceDirectory&gt; &lt;nativeLibrariesDirectory&gt;${project.basedir}/src/main/native&lt;/nativeLibrariesDirectory&gt; &lt;sdk&gt; &lt;platform&gt;15&lt;/platform&gt; &lt;/sdk&gt; &lt;undeployBeforeDeploy&gt;true&lt;/undeployBeforeDeploy&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;versions-maven-plugin&lt;/artifactId&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;version&gt;2.0&lt;/version&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt; &lt;version&gt;2.9&lt;/version&gt; &lt;configuration&gt; &lt;additionalProjectnatures&gt; &lt;projectnature&gt;com.android.ide.eclipse.adt.AndroidNature&lt;/projectnature&gt; &lt;projectnature&gt;org.eclipse.jdt.core.javanature&lt;/projectnature&gt; &lt;/additionalProjectnatures&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;profiles&gt; &lt;profile&gt; &lt;id&gt;release&lt;/id&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.pyx4me&lt;/groupId&gt; &lt;artifactId&gt;proguard-maven-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;process-classes-with-proguard&lt;/id&gt; &lt;phase&gt;process-classes&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;proguard&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;proguardVersion&gt;4.4&lt;/proguardVersion&gt; &lt;maxMemory&gt;256m&lt;/maxMemory&gt; &lt;injar&gt;classes&lt;/injar&gt; &lt;libs&gt; &lt;lib&gt;${rt.jar.path}&lt;/lib&gt; &lt;lib&gt;${jsse.jar.path}&lt;/lib&gt; &lt;/libs&gt; &lt;obfuscate&gt;true&lt;/obfuscate&gt; &lt;addMavenDescriptor&gt;false&lt;/addMavenDescriptor&gt; &lt;proguardInclude&gt;${project.basedir}/proguard.conf&lt;/proguardInclude&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;net.sf.proguard&lt;/groupId&gt; &lt;artifactId&gt;proguard&lt;/artifactId&gt; &lt;version&gt;4.4&lt;/version&gt; &lt;scope&gt;runtime&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-jarsigner-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;sign-application-apk&lt;/id&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;sign&lt;/goal&gt; &lt;goal&gt;verify&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;zipalign-application-apk&lt;/id&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;zipalign&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;release&gt;true&lt;/release&gt; &lt;zipalign&gt; &lt;verbose&gt;true&lt;/verbose&gt; &lt;inputApk&gt;${project.build.directory}/${project.artifactId}-${project.version}.apk&lt;/inputApk&gt; &lt;outputApk&gt;${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk&lt;/outputApk&gt; &lt;/zipalign&gt; &lt;sign&gt; &lt;debug&gt;false&lt;/debug&gt; &lt;/sign&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;artifacts&gt; &lt;artifact&gt; &lt;file&gt;${project.build.directory}/proguard_map.txt&lt;/file&gt; &lt;type&gt;map&lt;/type&gt; &lt;classifier&gt;release&lt;/classifier&gt; &lt;/artifact&gt; &lt;/artifacts&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;attach-signed-aligned&lt;/id&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;attach-artifact&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;add-source&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;sources&gt; &lt;source&gt;${project.basedir}/target/generated-sources/annotations&lt;/source&gt; &lt;/sources&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; &lt;/profiles&gt; </code></pre> <p></p> <p>Parent Pom : </p> <blockquote> <p> http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0</p> </blockquote> <pre><code>&lt;groupId&gt;be.idamediafoundry&lt;/groupId&gt; &lt;artifactId&gt;InterestingFind-parent&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;packaging&gt;pom&lt;/packaging&gt; &lt;name&gt;InterestingFind - Parent&lt;/name&gt; &lt;modules&gt; &lt;module&gt;InterestingFind&lt;/module&gt; &lt;module&gt;InterestingFind-it&lt;/module&gt; &lt;/modules&gt; &lt;properties&gt; &lt;platform.version&gt;4.1.1.4&lt;/platform.version&gt; &lt;android-plugin&gt;3.5.1&lt;/android-plugin&gt; &lt;spring-android-version&gt;1.0.1.RELEASE&lt;/spring-android-version&gt; &lt;sign.keystore&gt;${project.basedir}/my-release-key.keystore&lt;/sign.keystore&gt; &lt;sign.alias&gt; &lt;/sign.alias&gt; &lt;sign.storepass&gt; &lt;/sign.storepass&gt; &lt;sing.keypass&gt; &lt;/sing.keypass&gt; &lt;/properties&gt; &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;codehaus-snapshots&lt;/id&gt; &lt;url&gt;http://snapshots.repository.codehaus.org&lt;/url&gt; &lt;/repository&gt; &lt;/repositories&gt; &lt;dependencyManagement&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;version&gt;3.5.1&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.android&lt;/groupId&gt; &lt;artifactId&gt;android&lt;/artifactId&gt; &lt;version&gt;${platform.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.android&lt;/groupId&gt; &lt;artifactId&gt;android-test&lt;/artifactId&gt; &lt;version&gt;${platform.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;!-- Androlog is a logging and reporting library for Android --&gt; &lt;dependency&gt; &lt;groupId&gt;de.akquinet.android.androlog&lt;/groupId&gt; &lt;artifactId&gt;androlog&lt;/artifactId&gt; &lt;version&gt;1.0.5&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;4.10&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/dependencyManagement&gt; &lt;build&gt; &lt;pluginManagement&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;version&gt;3.5.1&lt;/version&gt; &lt;inherited&gt;true&lt;/inherited&gt; &lt;configuration&gt; &lt;androidManifestFile&gt;${project.basedir}/AndroidManifest.xml&lt;/androidManifestFile&gt; &lt;assetsDirectory&gt;${project.basedir}/assets&lt;/assetsDirectory&gt; &lt;resourceDirectory&gt;${project.basedir}/res&lt;/resourceDirectory&gt; &lt;nativeLibrariesDirectory&gt;${project.basedir}/src/main/native&lt;/nativeLibrariesDirectory&gt; &lt;sdk&gt; &lt;platform&gt;15&lt;/platform&gt; &lt;/sdk&gt; &lt;undeployBeforeDeploy&gt;true&lt;/undeployBeforeDeploy&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;3.0&lt;/version&gt; &lt;configuration&gt; &lt;source&gt;1.6&lt;/source&gt; &lt;target&gt;1.6&lt;/target&gt; &lt;/configuration&gt; &lt;extensions&gt;true&lt;/extensions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-enforcer-plugin&lt;/artifactId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt; &lt;version&gt;2.1&lt;/version&gt; &lt;configuration&gt; &lt;autoVersionSubmodules&gt;true&lt;/autoVersionSubmodules&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-jarsigner-plugin&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;inherited&gt;true&lt;/inherited&gt; &lt;configuration&gt; &lt;removeExistingSignatures&gt;true&lt;/removeExistingSignatures&gt; &lt;archiveDirectory /&gt; &lt;archive&gt;${project.build.directory}/${project.build.finalName}.${project.packaging}&lt;/archive&gt; &lt;verbose&gt;true&lt;/verbose&gt; &lt;certs&gt;true&lt;/certs&gt; &lt;keystore&gt;${sign.keystore}&lt;/keystore&gt; &lt;alias&gt;${sign.alias}&lt;/alias&gt; &lt;storepass&gt;${sign.storepass}&lt;/storepass&gt; &lt;keypass&gt;${sign.keypass}&lt;/keypass&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;com.pyx4me&lt;/groupId&gt; &lt;artifactId&gt;proguard-maven-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.4&lt;/version&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;net.sf.proguard&lt;/groupId&gt; &lt;artifactId&gt;proguard&lt;/artifactId&gt; &lt;version&gt;4.4&lt;/version&gt; &lt;scope&gt;runtime&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;configuration&gt; &lt;proguardVersion&gt;4.4&lt;/proguardVersion&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/pluginManagement&gt; &lt;/build&gt; &lt;profiles&gt; &lt;profile&gt; &lt;id&gt;release&lt;/id&gt; &lt;activation&gt; &lt;property&gt; &lt;name&gt;performRelease&lt;/name&gt; &lt;value&gt;true&lt;/value&gt; &lt;/property&gt; &lt;/activation&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;version&gt;${android-plugin}&lt;/version&gt; &lt;configuration&gt; &lt;release&gt;true&lt;/release&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-enforcer-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;enforce-signing-properties&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;enforce&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;rules&gt; &lt;requireProperty&gt; &lt;property&gt;sign.keystore&lt;/property&gt; &lt;message&gt;The 'sign.keystore' property is missing. It must contain the path to the keystore used to sign the application. &lt;/message&gt; &lt;/requireProperty&gt; &lt;requireFilesExist&gt; &lt;files&gt; &lt;file&gt;${sign.keystore}&lt;/file&gt; &lt;/files&gt; &lt;message&gt;The 'sign.keystore' property does not point to a file. It must contain the path to the keystore used to sign the application. &lt;/message&gt; &lt;/requireFilesExist&gt; &lt;requireProperty&gt; &lt;property&gt;sign.alias&lt;/property&gt; &lt;message&gt;The 'sign.alias' property is missing. It must contain the key alias used to sign the application. &lt;/message&gt; &lt;/requireProperty&gt; &lt;requireProperty&gt; &lt;property&gt;sign.storepass&lt;/property&gt; &lt;message&gt;The 'sign.storepass' property is missing. It must contain the password of the keystore used to sign the application. &lt;/message&gt; &lt;/requireProperty&gt; &lt;requireProperty&gt; &lt;property&gt;sign.keypass&lt;/property&gt; &lt;message&gt;The 'sign.keypass' property is missing. It must contain the password of the key used to sign the application. &lt;/message&gt; &lt;/requireProperty&gt; &lt;/rules&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; &lt;profile&gt; &lt;id&gt;linux&lt;/id&gt; &lt;activation&gt; &lt;os&gt; &lt;family&gt;unix&lt;/family&gt; &lt;/os&gt; &lt;/activation&gt; &lt;properties&gt; &lt;rt.jar.path&gt;${java.home}/jre/lib/rt.jar&lt;/rt.jar.path&gt; &lt;jsse.jar.path&gt;${java.home}/jre/lib/jsse.jar&lt;/jsse.jar.path&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;!-- mac profile has to be after unix since running on mac will trigger both --&gt; &lt;profile&gt; &lt;id&gt;mac&lt;/id&gt; &lt;activation&gt; &lt;os&gt; &lt;family&gt;mac&lt;/family&gt; &lt;/os&gt; &lt;/activation&gt; &lt;properties&gt; &lt;!-- absolute path --&gt; &lt;!--&lt;rt.jar.path&gt;/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar&lt;/rt.jar.path&gt; --&gt; &lt;!-- or with JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/ --&gt; &lt;rt.jar.path&gt;${java.home}/../Classes/classes.jar&lt;/rt.jar.path&gt; &lt;jsse.jar.path&gt;${java.home}/../Classes/jsse.jar&lt;/jsse.jar.path&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;profile&gt; &lt;id&gt;windows&lt;/id&gt; &lt;activation&gt; &lt;os&gt; &lt;family&gt;windows&lt;/family&gt; &lt;/os&gt; &lt;/activation&gt; &lt;properties&gt; &lt;rt.jar.path&gt;${java.home}/jre/lib/rt.jar&lt;/rt.jar.path&gt; &lt;jsse.jar.path&gt;${java.home}/jre/lib/jsse.jar&lt;/jsse.jar.path&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;/profiles&gt; </code></pre> <p></p> <p><strong><em>Edit : updated pom.</em></strong> <strong><em>Edit : uploaded <a href="http://pastebin.com/SBwEx5kq" rel="nofollow noreferrer">Log file</a></em></strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload