Skip to main content



      Home
Home » Eclipse Projects » Oomph » How to create a repository id in a generated target?
How to create a repository id in a generated target? [message #1784075] Thu, 22 March 2018 05:36 Go to next message
Eclipse UserFriend
We define our targlet in Oomph and generate a target definition from it using TargetDefinitionGenerator.

Our build server uses this target definition. In order to access some of the repositories, we need to supply an repository id, so maven can relate this to the correct credentials.

Is there any way to store the ID in Oomph? Currently, we need to adjust the generated target definition manually.

The current generated target definition looks like

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="Generated from My GIT" sequenceNumber="23">
  <locations>
    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
      <unit id="org.eclipse.egit.feature.group" version="4.9.2.201712150930-r"/>

      <repository  location="https://some/internal/repo/requiring/authentication/"/>

      <repository location="http://download.eclipse.org/releases/oxygen"/>
    </location>
  </locations>
</target>


We need to supply an id to the first repository location:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="Generated from My GIT" sequenceNumber="23">
  <locations>
    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
      <unit id="org.eclipse.egit.feature.group" version="4.9.2.201712150930-r"/>

<!-- ID ADDED-->
      <repository id="myCustomId" location="https://some/internal/repo/requiring/authentication/"/>

      <repository location="http://download.eclipse.org/releases/oxygen"/>
    </location>
  </locations>
</target>


If there was no way to do this, we might develop a patch for Oomph. What do you think would be the best way to store the ID within the oomph file? I could imagine extending the internal model for repositories, or creating an annotation for repositories that's recognized by the TargetDefinitionGenerator.
Re: How to create a repository id in a generated target? [message #1784081 is a reply to message #1784075] Thu, 22 March 2018 06:10 Go to previous messageGo to next message
Eclipse UserFriend
Is this something the PDE editor allows you to specify? It seems to me this isn't something PDE would ever produce or allow you to specify via the forms, but you can add it by hand and it does no harm, right?

I'd definitely not extend the model for Repository in this regard, but some additional annotation for the target definition generator seems okay. I wonder if it's important to be able to specify exactly the ID, or if it would be sufficient to synthesize an ID from the location value? It would of course be simpler to have a boolean flag asking to generate IDs as opposed to annotations with the specific IDs, but of course either are possible...
Re: How to create a repository id in a generated target? [message #1784100 is a reply to message #1784081] Thu, 22 March 2018 10:19 Go to previous messageGo to next message
Eclipse UserFriend
It seems the id attribute is specific to Tycho. It is read into this Tycho class: https://github.com/eclipse/tycho/blob/master/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/resolver/shared/MavenRepositoryLocation.java

Handling authorization credentials is not an easy task in itself, so I'd rather have no limitations on the id we use.
Re: How to create a repository id in a generated target? [message #1784119 is a reply to message #1784100] Thu, 22 March 2018 12:16 Go to previous messageGo to next message
Eclipse UserFriend
Feel free to open a Bugzilla. It shouldn't be so hard to implement, as long you're clear on the intended design. I.e., an annotation on the Repository? A annotation specifying mappings between URLs and IDs?
Re: How to create a repository id in a generated target? [message #1819173 is a reply to message #1784075] Thu, 09 January 2020 08:04 Go to previous messageGo to next message
Eclipse UserFriend
I'm experiencing the same problem, was a bug report written on this? If so, please share its ID.
Re: How to create a repository id in a generated target? [message #1819200 is a reply to message #1819173] Thu, 09 January 2020 16:07 Go to previous message
Eclipse UserFriend
I didn't open a bugzilla on this.
Previous Topic:Task to search and replace in all .classpath files
Next Topic:Predefining the Git clone location rule and Root Git-container folder
Goto Forum:
  


Current Time: Sun Jul 06 14:47:43 EDT 2025

Powered by FUDForum. Page generated in 0.24267 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top