Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:36 Go to next message
Niko Stotz is currently offline Niko StotzFriend
Messages: 5
Registered: June 2010
Junior Member
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 10:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29555
Registered: July 2009
Senior Member
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 14:19 Go to previous messageGo to next message
Niko Stotz is currently offline Niko StotzFriend
Messages: 5
Registered: June 2010
Junior Member
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 16:16 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29555
Registered: July 2009
Senior Member
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?
Previous Topic:Oxygen composite
Next Topic:[NEED HELP] An internal error occurred during: "JavaEditorMessages.SemanticHighlighting_job&quo
Goto Forum:
  


Current Time: Wed Sep 26 08:22:08 GMT 2018

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

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

Back to the top