Uploaded image for project: 'Archiva'
  1. Archiva
  2. MRM-1194

Archiva doesn't cope with versions in a pom.xml that are properties

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: None
    • Labels:
      None

      Description

      I upgraded to Archiva 1.2.1 this morning, and after several failed starts got it going. Now there are some exceptions in the logs like the one below. It looks like Archiva parses the pom.xml and inserts the values for the versions. However, in this case the versions are properties that
      don't seem to be resolved.

      The pom snippet is

      <plugin>
        <groupId>org.codehaus.mojo</groupId> 
        <artifactId>build-helper-maven-plugin</artifactId> 
        <version>${org.codehaus.mojo--build-helper-maven-plugin.version}</version> 
        <inherited>true</inherited> 
        <executions>
          <execution>
            <id>add-source</id> 
            <phase>generate-sources</phase> 
            <goals>
              <goal>add-source</goal> 
            </goals>
            <configuration>
              <sources>
                <source>${basedir}/java-gen</source> 
                <source>${basedir}/java-src</source> 
                <source>${basedir}/java-test</source> 
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
       <properties>
          <org.codehaus.mojo--build-helper-maven-plugin.version>1.0</org.codehaus.mojo--build-helper-maven-plugin.version> 
          <maven-assembly-plugin.version>2.2-beta-1</maven-assembly-plugin.version> 
        </properties>
      

      The stack trace is

       2009-05-29 09:51:19,114 [pool-1-thread-1] ERROR org.apache.maven.archiva.consumers.database.ProjectModelToDatabaseConsumer - Unable to process model /home/devadmin/data/maven/mavenRepository/internal_snapshots/company/ProjectName/1.2.5-SNAPSHOT/ProjectName-1.2.5-20090209.204900-1.pom due to : javax.jdo.JDOFatalUserException : Attempt to store value "${org.codehaus.mojo--build-helper-maven-plugin.version}" in column "VERSION" that has maximum length of 50. Please correct your data!
       javax.jdo.JDOFatalUserException: Attempt to store value "${org.codehaus.mojo--build-helper-maven-plugin.version}" in column "VERSION" that has maximum length of 50. Please correct your data!
              at org.jpox.store.rdbms.mapping.CharRDBMSMapping.setString(CharRDBMSMapping.java:214)
              at org.jpox.store.mapping.SingleFieldMapping.setString(SingleFieldMapping.java:203)
              at org.jpox.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:122)
              at org.jpox.state.StateManagerImpl.providedStringField(StateManagerImpl.java:2757)
              at org.apache.maven.archiva.model.ArtifactReference.jdoProvideField(ArtifactReference.java)
              at org.apache.maven.archiva.model.ArtifactReference.jdoProvideFields(ArtifactReference.java)
              at org.jpox.state.StateManagerImpl.provideFields(StateManagerImpl.java:3115)
              at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:252)
              at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2519)
              at org.jpox.store.StoreManager.insert(StoreManager.java:938)
              at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3667)
              at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3646)
              at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1206)
              at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1259)
              at org.jpox.store.rdbms.scostore.FKListStore.validateElementForWriting(FKListStore.java:1231)
              at org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKListStore.java:772)
              at org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:387)
              at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:209)
              at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:464)
              at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2519)
              at org.jpox.store.StoreManager.insert(StoreManager.java:938)
              at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3667)
              at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3646)
              at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1206)
              at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1277)
              at org.apache.maven.archiva.database.jdo.JdoAccess.saveObject(JdoAccess.java:189)
              at org.apache.maven.archiva.database.jdo.JdoAccess.saveObject(JdoAccess.java:162)
              at org.apache.maven.archiva.database.jdo.JdoProjectModelDAO.saveProjectModel(JdoProjectModelDAO.java:86)
              at org.apache.maven.archiva.consumers.database.ProjectModelToDatabaseConsumer.processArchivaArtifact(ProjectModelToDatabaseConsumer.java:177)
              at org.apache.maven.archiva.database.updater.ProcessArchivaArtifactClosure.execute(ProcessArchivaArtifactClosure.java:48)
              at org.apache.commons.collections.CollectionUtils.forAllDo(CollectionUtils.java:388)
              at org.apache.maven.archiva.database.updater.JdoDatabaseUpdater.updateUnprocessed(JdoDatabaseUpdater.java:150)
              at org.apache.maven.archiva.database.updater.JdoDatabaseUpdater.updateAllUnprocessed(JdoDatabaseUpdater.java:87)
              at org.apache.maven.archiva.scheduled.executors.ArchivaDatabaseUpdateTaskExecutor.executeTask(ArchivaDatabaseUpdateTaskExecutor.java:69)
              at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
              at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
              at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
              at java.lang.Thread.run(Thread.java:619)
      

        Attachments

          Activity

            People

            • Assignee:
              oching Maria Odea B. Ching
              Reporter:
              ben.lidgey Ben Lidgey
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: