« Return to Thread: [jira] Created: (MRM-1194) Archiva doesn't cope with versions in a pom.xml that are properties

[jira] Issue Comment Edited: (MRM-1194) Archiva doesn't cope with versions in a pom.xml that are properties

by JIRA jira@codehaus.org :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View in Thread


    [ http://jira.codehaus.org/browse/MRM-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=185443#action_185443 ]

Maria Odea Ching edited comment on MRM-1194 at 7/31/09 1:36 AM:
----------------------------------------------------------------

I'm finally able to reproduce the error above in trunk. I moved up the <properties> configuration in the parent pom with the child pom referencing that property. It seems that properties are not being interpolated in the child pom if the property is declared in the parent.

      was (Author: oching):
    I'm finally able to reproduce the error above in trunk. I moved up the <properties> configuration in the parent pom with the child pom referencing that property. It seems that properties are not being interpolated if the property is declared in the parent.
 

> Archiva doesn't cope with versions in a pom.xml that are properties
> -------------------------------------------------------------------
>
>                 Key: MRM-1194
>                 URL: http://jira.codehaus.org/browse/MRM-1194
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: Ben Lidgey
>            Assignee: Maria Odea Ching
>             Fix For: 1.2.2
>
>
> 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
> {code:xml}
> <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>
> {code}
> The stack trace is
> {code}
>  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)
> {code}

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

 « Return to Thread: [jira] Created: (MRM-1194) Archiva doesn't cope with versions in a pom.xml that are properties