[ 
https://issues.apache.org/jira/browse/ARIES-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857071#action_12857071
 ] 

Lin Sun commented on ARIES-283:
-------------------------------

Yes I had the same impression that it looked like for maven 1 layout when I 
first looked at this code in geronimo.  I think it is probably because the code 
was first written for maven 1.

In any way, the code actually keeps looking for the jar till it find it in the 
getArtifacts method

Regarding overwrite existing repository.xml, my initial thought is to get a 
refreshed one when the server starts in case users have added files to the 
repository without refreshing the repository.xml file.   Of course, that is 
before I know your command.  

I 've tried your command in the subsystem dir.  I may not be using it 
correctly, here is what i did:
1. when I remove ~/.m2/repository/repository.xml file, and run the command, i 
got java.io.FileNotFoundException: /Users/linsun/.m2/repository/repository.xml 
(No such file or directory)
2. then i ran mvn clean install in subsystem dir, which generated the 
~/.m2/repository/repository.xml file.  Then I ran your command, it failed at 
NPE,

[WARNING] Exception while updating local OBR: null
java.lang.NullPointerException
        at 
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.toXml(DataModelHelperImpl.java:395)
        at 
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.toXml(DataModelHelperImpl.java:351)
        at 
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.toXml(DataModelHelperImpl.java:314)
        at 
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.writeRepository(DataModelHelperImpl.java:201)
        at org.apache.felix.obrplugin.ObrIndex.execute(ObrIndex.java:118)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)


I opened up the ~/.m2/repository/repository.xml file, and I saw only one 
resource there and didn't look like complete.

> Provide an implementation of ResourceResolver that can find/resolve resources 
> in local .m2 repo or any other specified repo
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-283
>                 URL: https://issues.apache.org/jira/browse/ARIES-283
>             Project: Aries
>          Issue Type: Improvement
>          Components: Subsystem
>    Affects Versions: Incubation
>            Reporter: Lin Sun
>            Assignee: Lin Sun
>             Fix For: Incubation
>
>


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

        

Reply via email to