Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick start archetype not creating default.properties file #5

Closed
rgladwell opened this issue Feb 9, 2011 · 10 comments
Closed

Quick start archetype not creating default.properties file #5

rgladwell opened this issue Feb 9, 2011 · 10 comments

Comments

@rgladwell
Copy link
Contributor

To reproduce follow these steps:

  1. Install m2eclipse plugin
    a. Install m2eclipse-android-integration
    b. Install ADT
  2. In Eclipse select File -> New -> Project...
  3. Select Maven -> Maven Project and click "Next"
  4. Click "Next" again
  5. Click "Add Archetype..."
  6. In Archetype Group Id enter "de.akquinet.android.archetypes"
  7. In Archetype Artifact Id" enter "android-quickstart"
  8. In Archetype Version enter "1.0.5-SNAPSHOT"
  9. Click "OK"
    1. Click Next
    2. In "Group Id" enter "com.example"
    3. In "Artifact Id" enter "test-app"
    4. Click Finish

Expected result: New Android project should be created in Eclipse with expected default.proprties

Actual result: no default.properties file created, causes build issues with ADT/m2eclipse-android-integration

@rgladwell
Copy link
Contributor Author

Example contents of ADT-generated default.properties file:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=android-7

@cescoffier
Copy link
Contributor

Hi,

Right, this file is Eclipse specific no? I will definitely create them, but I need to know several details first:

  • Where do we need it (all projects, test projects too) ?
  • Can I make the assumption that the target value is always 'android-VERSION' ?

Thanks,

Clement

@rgladwell
Copy link
Contributor Author

The default.properties is defined here:

http://developer.android.com/guide/developing/eclipse-adt.html#CreatingAProject

Looks as though it's needed for all projects. As for the format assumption, I cannot confirm: as per usual, Google have not specified the syntax for this file. I believe you just need the line "target=android-PLATFORM" but without digging deep into the ADT source code I can't confirm.

@cescoffier
Copy link
Contributor

Hi,

I've updated the quickstart archetype with the default.properties file. Could you check?

@rgladwell
Copy link
Contributor Author

Having trouble getting m2eclipse to detect the SNAPSHOT plugin. I do the following:

  1. Run mvn install on latest pull from android-archetypes
  2. In Eclipse select File -> New -> Project...
  3. Select Maven -> Maven Project and click "Next"
  4. Click "Next" again
  5. Select "Default Local" catlog
  6. Check "Include snapshot archetypes" checkbox.
  7. Click "Add Archetype..."
  8. In Archetype Group Id enter "de.akquinet.android.archetypes"
  9. In Archetype Artifact Id" enter "android-quickstart"
  10. In Archetype Version enter "1.5.0-SNAPSHOT"
  11. Click "OK"

Get "Can't resolve Archetype de.akquinet.android.archetypes:android-quickstart:1.5.0-SNAPSHOT org.eclipse.core.runtime.CoreException: Could not resolve artifact" error message.

@cescoffier
Copy link
Contributor

Hi,

should be 1.0.5-SNAPSHOT no ?
You also need to 'crawl' you local repository: mvn archetype:crawl
This command build the archetype-catalog for you local maven repository

@rgladwell
Copy link
Contributor Author

Just verified, works with m2eclipse-android-integration after you run a Maven -> Update Project Configuration. It would be nice to modify m2eclipse-android-integration so it detects an Android project has been created and auto-self-configures.

Thanks for that, please let me know when you release.

@cescoffier
Copy link
Contributor

Great, I've also added the file to the with-test and release archetypes. I should be released today.

@cescoffier
Copy link
Contributor

Released and is now in central (1.0.5)

@rgladwell
Copy link
Contributor Author

Fantastic, thanks for that.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants