facebook

Fail to create Maven Project with custom archtype

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #308628 Reply

    Ed Thompson
    Member

    Since upgrading to 8.5 (and several variations thereof) when my team tries to create a Maven project using a custom archtype, the rults are:

    File->New->Other->Maven Project
    1st screen: leave defaults
    2nd screen: select one of three custom archtypes that used to work fine
    3rd screen: add an ArtifactId and select Finish

    Failed to create project.
    java.lang.NullPointerException

    Anyone know what changed?

    tried it with Version: 8.5
    Build id: 8.5-20100319

    
    !ENTRY org.maven.ide.eclipse 4 0 2010-05-25 12:55:03.471
    !MESSAGE Failed to create project.
    !STACK 0
    java.lang.NullPointerException
        at org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:90)
        at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:540)
        at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:463)
        at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279)
        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    
    #308640 Reply

    Hi Edward Thompson,

    I could not able to replicate the issue.
    1) I tried creating Java Maven Project using default values when Project name is given.
    2) Tried creating project with a different Artifact Id other than project name.

    Can you send a screen shot of the when you are getting the error. Also, can you try the below steps:

    3) Are the check boxes in Maven preference page checked adjacent to “Download Repository index updates on startup”, “Download Artifacts Sources” and “Download Artifact Javadoc”. Maven preference page is available at “Windows–>Preference–>MyEclipse–>Maven4MyEclipse–>Maven” and select Maven. If not, can you check them and try creating a web project with Maven support? This may take few minutes to download Maven repository which depends on the Internet band width.

    Thanks,
    Chakri Vedula.

    #308646 Reply

    Ed Thompson
    Member

    I can’t see how to attach a file to the post.

    For #3, the first as already checked. I checked the other two, restarted MyEclipse, and tried again, same problem

    As a side note, running mvn archetype:generate from the commandline generates no errors, so its something the plugin doesn’t like…

    #308671 Reply

    Hi Edward Thompson,

    Sorry for the inconvenience. I have escalated this to our Dev team member, they will get back to you on this.

    Thanks,
    Chakri Vedula.

    #308870 Reply

    jdaggs
    Member

    FWIW, I am experiencing the same exact problem when trying to create a maven project with a custom archetype. Is there any update for this issue?

    #309277 Reply

    Brian Fernandes
    Moderator

    1) How are you specifying the custom archetype, I suppose you have added it using the “Add Archetype” dialog on page 2?

    2) Are you using an existing workspace which you used with a prior version of MyEclipse? If so – just to test, can you try this in a brand new workspace?

    3) Can you create a normal web project (and enable maven support on page 1 of the wizard) – Does project creation complete successfully? do you see any errors in the project?

    #318958 Reply

    Mulder8472
    Member

    I am running:
    Version: 8.6.1 Blue
    Build id: 8.6.1-Blue-20101117

    and I get the same error message. Has this been fixed, or at least been confirmed as a bug? is there a workaround or is my custom archetype flawed? Though, it works when use the command line: mvn archetype:generate -D…

    #318986 Reply

    Mulder8472
    Member

    FYI, I upgraded to
    MyEclipse Blue Edition

    Version: 9.1 Blue
    Build id: 9.1-Blue-20110701

    and still get the same error.

    #318990 Reply

    Mulder8472
    Member

    triple post… yeah/sorry

    found this:
    http://www.mygrid.org.uk/dev/wiki/display/developer/1.+Create+project+from+archetype

    scroll down to “Failed to create project”. Seems to be a bug with m2eclipse plugin 0.10.0 but has been fixed in 0.10.2. any chance maven4myeclipse is based on m2eclipse 0.10.0?

    #318991 Reply

    support-swapna
    Moderator

    Mulder8472 ,

    Sorry that you are seeing this issue.

    1) Are you adding the custom archetype using the ‘Add Archetype’ in dialog 2 ?

    2) Can you please let us know if you have checked on the suggestions by Support-Brain?

    I have also escalated this to a dev team member to investigate further. Sorry for the inconvenience caused.

    #318992 Reply

    Mulder8472
    Member

    thx for your help

    1) no, I am using a remote catalog. We use Archiva Maven Repository in our company whic also hosts the archetype catalog.

    2) yes

    #318993 Reply

    support-swapna
    Moderator

    Mulder8472 ,

    Thank you for the details.I could replicate the issue at my end. I will file a PR for the dev team to look into it.

    #318994 Reply

    Mulder8472
    Member

    great news, thank you! how can I be informed when a fix is available? do you sue JIRA or similar?

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Fail to create Maven Project with custom archtype

You must be logged in to post in the forum log in