1 2 Previous Next 18 Replies Latest reply: Sep 7, 2007 11:16 AM by Scott Stark RSS

Cannot release javaee project

Scott Stark Master

I'm trying to run mvn release:prepare -DdryRun=true in a checkout of the https://svn.jboss.org/repos/jbossas/projects/javaee/trunk/ build dir, but its failing with an NPE. Looks to be some problem with the assembly descriptor. I see the same problem just trying to do an mvn install as well.

[INFO] Transforming 'JBoss JavaEE 5.0 Build'...
[INFO] Transforming 'JBoss EJB 3.0 API'...
[INFO] Updating jboss-transaction-api to 1.0.1
[INFO] Transforming 'JBoss JACC 1.1 API'...
[INFO] Transforming 'JBoss JavaEE Application Deployment 1.2 API'...
[INFO] Transforming 'JBoss Java API for XML Registries 1.0'...
[INFO] Transforming 'JBoss Streaming API for XML 1.0'...
[INFO] Transforming 'JBoss J2EE Connector Architecture 1.5 API'...
[INFO] Transforming 'JBoss JMS 1.1 API'...
[INFO] Transforming 'JBoss Persistence 3.0 API'...
[INFO] Transforming 'JBoss Java Servlet 2.5 API'...
[INFO] Transforming 'JBoss Transaction 1.0.1 API'...
[INFO] Transforming 'JBoss Java Authentication SPI for Containers 1.0-PR API'...
[INFO] Not generating release POMs
[INFO] Executing preparation goals - since this is simulation mode it is running against the original project, not the rewritten ones
[INFO] Executing goals 'clean verify'...
[INFO] Executing: mvn clean verify --no-plugin-updates -P local-properties
 [INFO] Scanning for projects...
 [INFO] Reactor build order:
 [INFO] JBoss JavaEE 5.0 Build
 [INFO] JBoss EJB 3.0 API
 [INFO] JBoss JACC 1.1 API
 [INFO] JBoss JavaEE Application Deployment 1.2 API
 [INFO] JBoss Java API for XML Registries 1.0
 [INFO] JBoss Streaming API for XML 1.0
 [INFO] JBoss J2EE Connector Architecture 1.5 API
 [INFO] JBoss JMS 1.1 API
 [INFO] JBoss Persistence 3.0 API
 [INFO] JBoss Java Servlet 2.5 API
 [INFO] JBoss Transaction 1.0.1 API
 [INFO] JBoss Java Authentication SPI for Containers 1.0-PR API
 WAGON_VERSION: 1.0-beta-2
 [INFO] ----------------------------------------------------------------------------
 [INFO] Building JBoss JavaEE 5.0 Build
 [INFO] task-segment: [clean, verify]
 [INFO] ----------------------------------------------------------------------------
 [INFO] [clean:clean]
 [INFO] Deleting directory /home/svn/JBossHead/projects/javaee/trunk/build/target
 [INFO] Deleting directory /home/svn/JBossHead/projects/javaee/trunk/build/target/classes
 [INFO] Deleting directory /home/svn/JBossHead/projects/javaee/trunk/build/target/test-classes
 [INFO] Deleting directory /home/svn/JBossHead/projects/javaee/trunk/build/target/site
 [INFO] artifact org.apache.maven.plugins:maven-site-plugin: checking for updates from jboss
 [INFO] [site:attach-descriptor]
 [INFO] [source:jar {execution: attach-sources}]
 [INFO] NOT adding java-sources to attached artifacts for packaging: 'pom'.
 [INFO] [source:jar {execution: default}]
 [INFO] NOT adding java-sources to attached artifacts for packaging: 'pom'.
 [INFO] [assembly:attached {execution: default}]
 [INFO] Reading assembly descriptor: /home/svn/JBossHead/projects/javaee/trunk/build/assembly/bin.xml
 [INFO] Reading assembly descriptor: /home/svn/JBossHead/projects/javaee/trunk/build/assembly/sources.xml
 [INFO] ------------------------------------------------------------------------
 [ERROR] FATAL ERROR
 [INFO] ------------------------------------------------------------------------
 [INFO] null
 [INFO] ------------------------------------------------------------------------
 [INFO] Trace
 java.lang.NullPointerException
 at org.apache.maven.plugin.assembly.archive.ManifestCreationFinalizer.getVirtualFiles(ManifestCreationFinalizer.java:99)
 at org.codehaus.plexus.archiver.AbstractArchiver.hasVirtualFiles(AbstractArchiver.java:546)
 at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:258)
 at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:242)
 at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:513)
 at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:103)
 at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:278)
 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 4 seconds
 [INFO] Finished at: Thu Sep 06 09:16:00 PDT 2007
 [INFO] Final Memory: 21M/292M
 [INFO] ------------------------------------------------------------------------




  • 1. Re: Cannot release javaee project
    Anil Saldhana Master

    Scott, I have seen this error often with maven (mainly in javaee project). It is because of the "directory" tag in the assembly descriptor files. Something to do with relative path etc.

    Let me see if I can run the Javaee project.

  • 2. Re: Cannot release javaee project
    Anil Saldhana Master

    I think this is due to assembly/bin.xml defining directories "target/classes" in the sub directories (jboss-ejb-api) etc, when they do not exist when the assembly plugin kicks in.

    I do not know if the maven goal of "attached" needs to be changed to something else?

  • 3. Re: Cannot release javaee project
    Anil Saldhana Master

    This should be fixed now.

    http://maven.apache.org/plugins/maven-assembly-plugin/plugin-info.html

    Look at the fine print with the "attached" goal asking the phase to be removed.

    Someday, if I have nothing else to do, will enroll in an university for a PhD in Maven.

  • 4. Re: Cannot release javaee project
    Scott Stark Master

    mvn install is at least now running.
    Thanks

  • 5. Re: Cannot release javaee project
    Scott Stark Master

    I'm past release:prepare, but release:perform fails with:

    [starksm@succubus build]$ mvn release:perform
    [INFO] Scanning for projects...
    [INFO] Reactor build order:
    [INFO] JBoss JavaEE 5.0 Build
    [INFO] JBoss Transaction 1.0.1 API
    [INFO] JBoss EJB 3.0 API
    [INFO] JBoss Java Servlet 2.5 API
    [INFO] JBoss JACC 1.1 API
    [INFO] JBoss JavaEE Application Deployment 1.2 API
    [INFO] JBoss Java API for XML Registries 1.0
    [INFO] JBoss Streaming API for XML 1.0
    [INFO] JBoss J2EE Connector Architecture 1.5 API
    [INFO] JBoss JMS 1.1 API
    [INFO] JBoss Persistence 3.0 API
    [INFO] JBoss Java Authentication SPI for Containers 1.0-PR API
    [INFO] Searching repository for plugin with prefix: 'release'.
    WAGON_VERSION: 1.0-beta-2
    [INFO] ----------------------------------------------------------------------------
    [INFO] Building JBoss JavaEE 5.0 Build
    [INFO] task-segment: [release:perform] (aggregator-style)
    [INFO] ----------------------------------------------------------------------------
    [INFO] [release:perform]
    [INFO] Checking out the project to perform the release ...
    [INFO] Executing: svn --non-interactive checkout https://svn.jboss.org/repos/jbossas/projects/javaee/tags/5.0.0.Beta1 checkout
    [INFO] Working directory: /home/svn/JBossHead/projects/javaee/trunk/build/target
    [INFO] Executing goals 'deploy'...
    [INFO] Executing: mvn deploy --no-plugin-updates -P local-properties -DperformRelease=true
     [INFO] Scanning for projects...
     [INFO] ------------------------------------------------------------------------
     [ERROR] FATAL ERROR
     [INFO] ------------------------------------------------------------------------
     [INFO] Error building POM (may not be this project's POM).
    
    
     Project ID: unknown
    
     Reason: Could not find the model file '/home/svn/JBossHead/projects/javaee/trunk/build/target/jboss-ejb-api/pom.xml'. for project unknown
    
    
     [INFO] ------------------------------------------------------------------------
     [INFO] Trace
     org.apache.maven.reactor.MavenExecutionException: Could not find the model file '/home/svn/JBossHead/projects/javaee/trunk/build/target/jboss-ejb-api/pom.xml'. for project unknown
     at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290)
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
     at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
     at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
     at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
     Caused by: org.apache.maven.project.ProjectBuildingException: Could not find the model file '/home/svn/JBossHead/projects/javaee/trunk/build/target/jboss-ejb-api/pom.xml'. for project unknown
     at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1383)
     at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:477)
     at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
     at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:553)
     at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:467) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:527) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364)
     ... 11 more
     Caused by: java.io.FileNotFoundException: /home/svn/JBossHead/projects/javaee/trunk/build/target/jboss-ejb-api/pom.xml (No such file or directory)
     at java.io.FileInputStream.open(Native Method)
     at java.io.FileInputStream.<init>(FileInputStream.java:106)
     at java.io.FileReader.<init>(FileReader.java:55)
     at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1378)
     ... 17 more
     [INFO] ------------------------------------------------------------------------
     [INFO] Total time: < 1 second
     [INFO] Finished at: Thu Sep 06 13:11:13 PDT 2007
     [INFO] Final Memory: 2M/74M
     [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Maven execution failed, exit code: '1'
    
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9 seconds
    [INFO] Finished at: Thu Sep 06 13:11:13 PDT 2007
    [INFO] Final Memory: 15M/293M
    [INFO] ------------------------------------------------------------------------
    


    seems like the bin.xml relative paths are not being resolved correctly.


  • 6. Re: Cannot release javaee project
    Anil Saldhana Master

    We have been just doing:

    mvn deploy
    


    Does that work for you?

    It should upload either the snapshots or the versioned releases to the repos.

  • 7. Re: Cannot release javaee project
    Anil Saldhana Master

    Also Scott, when you upload the archives, maven may not like

    JBoss-5.0.0.Beta3


    It needs
    JBoss-5.0.0-Beta3


    Dash instead of a period.

  • 8. Re: Cannot release javaee project
    Scott Stark Master

    The problem is that the contents of the tagged release are invalid.
    The https://svn.jboss.org/repos/jbossas/projects/javaee/tags/5.0.0.Beta1/ contents are for just the build directory.

    I guess I'll manually tag and release the artifacts from the mvn assembly:attached output.

    Paul, you need to go through and validate what the release settings are supposed to be to get this to work.

  • 9. Re: Cannot release javaee project
    Paul Gier Master

     

    "anil.saldhana@jboss.com" wrote:
    Also Scott, when you upload the archives, maven may not like
    JBoss-5.0.0.Beta3


    It needs
    JBoss-5.0.0-Beta3


    Dash instead of a period.


    I don't think maven will have a problem with the period. The dash is the recommended convention, but maven seems to handle the period fine when dealing with release versions. It's just the snapshots that require a dash.

  • 10. Re: Cannot release javaee project
    Scott Stark Master

    deploy uploaded stuff to the snapshot repository, but there is no assembly contents under https://snapshots.jboss.org/maven2/org/jboss/javaee/jboss-javaee/5.0.1-SNAPSHOT/. Only the poms are there.

    The deploy target also does not create a tag, so the issue is why the release steps from http://wiki.jboss.org/wiki/Wiki.jsp?page=MavenReleaseProcess are not working here.

  • 11. Re: Cannot release javaee project
    Paul Gier Master

     

    "scott.stark@jboss.org" wrote:
    I'm past release:prepare, but release:perform fails with:

    
    
     Reason: Could not find the model file '/home/svn/JBossHead/projects/javaee/trunk/build/target/jboss-ejb-api/pom.xml'. for project unknown
    
    
     [INFO] ------------------------------------------------------------------------
     [INFO] Trace
     org.apache.maven.reactor.MavenExecutionException: Could not find the model file '/home/svn/JBossHead/projects/javaee/trunk/build/target/jboss-ejb-api/pom.xml'. for project unknown
     at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
     at
    


    seems like the bin.xml relative paths are not being resolved correctly.


    I'll have to look into this a bit more, but I think it is because of the current structure of having the parent pom in the build subdirectory. We might need to separate the parent from the aggregator, similar to how microcontainer is set up.


  • 12. Re: Cannot release javaee project
    Scott Stark Master

     

    "pgier" wrote:

    I'll have to look into this a bit more, but I think it is because of the current structure of having the parent pom in the build subdirectory. We might need to separate the parent from the aggregator, similar to how microcontainer is set up.

    That could explain why the release:prepare only created a tag with the build contents.


  • 13. Re: Cannot release javaee project
    Paul Gier Master

     

    "scott.stark@jboss.org" wrote:
    deploy uploaded stuff to the snapshot repository, but there is no assembly contents under https://snapshots.jboss.org/maven2/org/jboss/javaee/jboss-javaee/5.0.1-SNAPSHOT/. Only the poms are there.

    The deploy target also does not create a tag, so the issue is why the release steps from http://wiki.jboss.org/wiki/Wiki.jsp?page=MavenReleaseProcess are not working here.


    For now I think you will have to just create the tag manually, update the poms and then run mvn deploy from the tag. With simpler projects, the release plugin works ok, but there seem to be problems with some multi-module project structures.



  • 14. Re: Cannot release javaee project
    Scott Stark Master

    I'm doing it manually for now.

1 2 Previous Next