archiva extra file not visible - maven

I'm trying to also upload a deployment plan for certain web application projects.
This file has the extension '.dat'.
I can upload the file to archiva successfully using the deploy:deploy-file command. (checked by calling the url and it's there)
The problem i'm having is that i can't see the file in the downloads box on the screen when browsing to it, which makes it pretty pointless to upload it to archiva if noone can see that it's there.
Is this archiva only showing certain file types or is this a caching issue?
Where can I find more information about what is being shown in that box?
archiva version:
Apache Archiva 1.3.3

What you need to do is go to the "Repository Scanning" tab, and ensure that **/*.dat files are included in the list of artifacts to be detected. Afterwards, you will need to go t the "Repositories" tab and scan the repository again to have it appear.

Uhm that's not part of the visible files.
BTW that should work with last 1.4*

Related

Download maven2 repository for offline use

We are developing offline due to limited internet resources and would like to run once every several months a whole grab of an external repository (e.g repo1.maven.org/maven2 - Disk space isn't an issue).
Today I'm using a simple POM that contains a lot of common dependencies that we are using, I've set my local maven to use a mirror to proxy thru a local nexus repository to cache locally and this is how I'm grabbing for offline use - but that isn't very effective.
I'm now looking for a command line tool that allow me to run searches on maven repositories so that I can write a script that grab them all to my local nexus installation and would like to hear if there is any or if there is another way to achieve that.
Thanks
Not a whole solution (yet) but I'm using httrack to grab the whole content of repo1.maven.org/maven2 - That is already better than nothing :)
In general, there is a goal in Maven dependency plugin called "go-offline"
So it allows to grab all the project dependencies and to store them in local .m2 repo.
You can find more information here.
If you want to run Maven and tell it to behave like the network does not exist you can run it with "-o" option (offline mode). So that if there is no dependency installed locally, Maven won't even try to go to network and bring it - but will fail the build.
On the opposite, if you want to force Maven to check and bring new versions (otherwise they already should be in your repo), you can use "-U" option.
I'm not really sure I've got the point about general search-and-download use case. Usually people install Nexus or Artifactory once in a network so that each dependency will be downloaded only once. In local development machines people usually just work with filesystem and don't maintain tools like this.
Now if you want to copy the whole repository from internet (for copying it later to some other network or something) you can just use crawlers like Apache Nutch for example or craft your own script that will recursively download all the files.

Change build configuration artifacts manually

I am using TC10.x and one of my build generates an artifact which is then loaded in one of my custom configuration tabs.
Now after 10 runs, I wanted to change something in that file, so i edited all the artifacts that are created in .buildserver/../../artifacts folder.
When i go to the build configuration and downloaded the artifacts and see the contents are all changed but when i click on the link in the teamcity, it still loads the old stuff how can i work around this?
Do i need to bounce the teamcity server instance or the agent?
Restarting the apache web server resolved the issue. New files were taken up.
Could not see cache folder mention in the conf file, nor found any cache folder under apache or c:\program data etc.

Maven - Not able to open jars it is downloading

Whenever I try to run mvn clean install on my code, maven runs and start downloading jars, after downloading some jars It give an error i.e. Not able to open xxxxx.jar
On first though i changed that particular jar , but this error is coming for more jars, then i tried to take my friends repository.
And then it works fine for the jars already available in my friends repository. But whenever it have to download new jars from central repository same error occurs.
I tried 100 of time deleting .m2 folder and create it again but no luck.
I also tried switching maven installations or version from different friend and maven official websites but still No Luck
I am fed up of this. Trying from last week.
Please Help
Just a quick suggestion from the top of my head:
You could take a look at the .jar-Files that get downloaded using a text editor or even better some hex-editor. Depending on the network from that you are accessing the repository there might be some kind of proxy-server that intercepts the jar-download-requests and sends back some html-page - at least it might do so in our company-network.
If the text-editor just shows some strange characters try opening the jar-file with some zip-tool (eg. 7zip) and see if that shows some error.

Maven is over 100%! [downloading no-stop] [duplicate]

everytime i start with a fresh new workspace, m2eclipse downloads nexus-maven-repository-index.gz from the maven central repository.
this is good.
but,
some times, i just want to start a new workspace, and not wait for it to download,
it tried copying the whole .metadata directory from an old workspace to the new one,
but the list of maven artifacts are still empty.
is there a way i can cache it?
or at least download the file once, and the copy/extract/repackage it so that m2eclipse thinks it has already downloaded it and allows me to search for maven artifacts.
or a short version of the question
where and in what format is the "nexus-maven-repository-index.gz" file stored in the workspace?
The index is stored in the plugin's metadata location, i.e.
[workspace root]/.metadata/.plugins/org.maven.ide.eclipse/nexus
There will be one folder for each remote repository index in use.
You can configure the plugin to not download the index at startup too. Got to Window->Preferences->Maven and uncheck Download repository indexes at startup, you'll have to remember to reactivate it to get any updates though
Update:
I just verified that copying the metadata works. M2Eclipse will still contact the repository to download the deltas (assuming the above option is checked), but that only takes a few moments as it is only downloading the deltas.
Depending on your situation, you may want to try running a managed repository such as artifactory or nexus.
Configure it as the one-true-source-of-everything in maven, that way the initial download should only be from a local location and hence fast.
There is similar problem in my company, due to the network/security restrictions, the index file can't be downloaded by m2eclipse.
I have tried to use apache, to direct maven.org to my localhost to provide the index.(it should work, you can try). But again, network restriction disables local pc level ds resolution.
Last solution is try to downlaod nexus-maven-repository-index.zip, extract everything inside this zip, except the timestamp file, and extract and replace everything into the corresponding index folder for central repository.
It works. :-D

Maven update site creation and deployment

I am trying to build an update site for my plugins built with maven. I have a site project with following entry;
<packaging>eclipse-update-site</packaging>
I get the site.zip in the end containing only site.xml in it even though within target/site I have all the folders i.e features/.jar, plugin/.jar, artefacts.jar, content.jar and site.xml.
Secondly I would like to upload the site.zip (with all the contents) on to the FTP site (delete the old version on remote machine and extract this new zip for DEV, for version releases I would like to keep the older releases)
Could you please point me to right direction as I am new to this whole thing.
Thanks
--
Sjunejo
packaging type eclipse-update-site is deprecated, use eclipse-repository instead which will create a repository zip by default.
For details see http://wiki.eclipse.org/Tycho/Reference_Card#Update_Site

Resources