I have tried to add http://repository.springsource.com/ivy/bundles/external/ as (proxy) remote repository location to our Nexus repository.
The developers are using the following inside they're iv
Inside the ivy-settings.xml is as follows
<?xml version="1.0" encoding="ISO-8859-1"?>
<ivysettings>
<settings defaultResolver="spring.compass.ibiblio" checkUpToDate="true" />
<resolvers>
<chain name="spring.compass.ibiblio">
<url name="com.springsource.repository.bundles.release">
<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<ibiblio name="compass" m2compatible="true" root="http://repo.compass-project.org" />
<ibiblio name="ibiblio" m2compatible="true" checkconsistency="false"/>
<ibiblio name="javanet" root="http://download.java.net/maven/2/" m2compatible="true" usepoms="false"/>
<ibiblio name="libraries" m2compatible="true" usepoms="false"/>
<ibiblio name="jboss" root="http://repository.jboss.com/maven2" m2compatible="true" usepoms="false"/>
</chain>
</resolvers>
</ivysettings>
However when I try to browse the nexus repository that is set up I cannot see anything under the repository except of
/.index/nexus-maven-repository-index.gz
/.index/nexus-maven-repository-index.gz.sha1
/.index/nexus-maven-repository-index.gz.md5
/.index/nexus-maven-repository-index.properties
/.index/nexus-maven-repository-index.properties.sha1
/.index/nexus-maven-repository-index.properties.md5
As a result the dependencies cannot be resolved.
Can anyone help?
Randall
Check the answer to this question
Basically I'd suggest you use the following settings file to download spring depenencies:
<ivysettings>
<settings defaultResolver="chain"/>
<resolvers>
<chain name="chain">
<ibiblio name="central" m2compatible="true"/>
<ibiblio name="spring-release" root="http://repository.springsource.com/maven/bundles/release" m2compatible="true"/>
<ibiblio name="spring-external" root="http://repository.springsource.com/maven/bundles/external" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
These are the Maven repository URLs and the ivy resolver is configured to understand them as Maven2 formatted repositories.
Finally, I think the spring repos are setup to discourage adhoc browsing using web browser.
Related
I made a vb6 reg free com one click deployment project
I added manifest file after publish and change content to use my vb name Green.exe instead of vb.net project name. also changed properties to content and copy if newer. When I install it on client, vb6 program cant start cause of not registered ocx. it means reg free com is not right.
we created lots of ocx which main vb6 program will using. Here is manifest file I created:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="Green.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" type="win32" />
<application />
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!--
UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="10" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
</dependentAssembly>
</dependency>
<file name="Green.exe" size="7184384">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>rqeYDzIVrIY9m/pVlyFdJ6tFpAc=</dsig:DigestValue>
</hash>
</file>
<file name="Green.ReportControl.v15.0.1.ocx" size="1370104">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>DR4oqg8TvRGA7901DvJ8kwQZt48=</dsig:DigestValue>
</hash>
</file>
<file name="GreenACITrans.ocx" size="937984">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>LbPTQBKEGlaE2nD02Lle+jPz1gU=</dsig:DigestValue>
</hash>
</file>
<file name="GreenBackUpRestore.ocx" size="217088">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>EALTeLxgFCOKv256oJyr7T0eRg8=</dsig:DigestValue>
</hash>
</file>
</asmv1:assembly>
Edited: I fixed it. there was a component which it cant be register and i didnt know. i placed it in setup package and now its working.
using this link steps:
https://msdn.microsoft.com/en-US/library/aa697429(v=vs.80).aspx
Thanks guys. it is not a hack. it is from microsoft link:
here . one of my ocx was from prev developer. i didnt know it makes a problem and shouldnt be in manifest. now it works as the link i placed said!
I'm struggling to get my head around the exact behaviour of exclusions in Ivy.
In the following Ivy file, why does putting commons-logging before log4j pull in javax.activation and javax.mail from log4j whereas putting it after doesn't.
<ivy-module version="2.0">
<info organisation="test" module="test" />
<configurations defaultconfmapping="default->runtime(*)" />
<dependencies>
<dependency org="log4j" name="log4j" rev="1.2.15">
<exclude org="javax.activation" />
<exclude org="javax.mail" />
</dependency>
<dependency org="commons-logging" name="commons-logging" rev="1.1" />
<exclude org="com.sun.jdmk" />
<exclude org="com.sun.jmx" />
<exclude org="javax.jms" />
</dependencies>
</ivy-module>
The activation and mail jars are dependencies of commons logging, yet you've excluded them on the log4j dependency...
When you only use a single configuration this sends a mixed message to ivy, should they be excluded or not? The following would be a lot more explicit:
<dependencies>
<dependency org="log4j" name="log4j" rev="1.2.15"/>
<dependency org="commons-logging" name="commons-logging" rev="1.1" />
<exclude org="javax.activation" />
<exclude org="javax.mail" />
<exclude org="com.sun.jdmk" />
<exclude org="com.sun.jmx" />
<exclude org="javax.jms" />
</dependencies>
It's less confusing when the excludes are set globally.
If you want to keep the dependency resolution separate then you'll need to set up more than one configuration (think of these as dependency sets):
<ivy-module version="2.0">
<info organisation="test" module="test" />
<configurations>
<conf name="log4j_deps" description="log4j dependencies"/>
<conf name="commons_deps" description="commons-logging dependencies"/>
</configurations>
<dependencies>
<dependency org="log4j" name="log4j" rev="1.2.15" conf="log4j_deps->runtime">
<exclude org="javax.activation" />
<exclude org="javax.mail" />
</dependency>
<dependency org="commons-logging" name="commons-logging" rev="1.1" conf="commons_deps->runtime"/>
<exclude org="com.sun.jdmk" />
<exclude org="com.sun.jmx" />
<exclude org="javax.jms" />
</dependencies>
</ivy-module>
Switching around the dependency tags will have no effect now, because the dependency resolution is explicit.
Log4j and its dependencies are associated with the log4j_deps configuration
commons dependencies are placed onto the commons_deps configuration.
I am new to the apache IVY. I was not able to download the springframework.web.servlet from the default repository(MAVEN) as this jar file is not present in maven repository so for adding a new repository which have this file i have used the Chain tag. But the problem is its downloading all the jar files from maven repo and the springframework.web.servlet from other repository but after that its again try to download all the other jar files from the second repository.
ivysettings.xml
<ivysettings>
<settings defaultCache="${ivy.settings.dir}/ivy-cache" defaultResolver="libraries"/>
<resolvers>
<filesystem name="projects">
<artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" />
<ivy pattern="${repository.dir}/[module]-[revision].xml" />
</filesystem>
<chain name="chained">
<ibiblio name="libraries" m2compatible="true" usepoms="false" />
<ibiblio name="lib" m2compatible="true" root="https://oss.sonatype.org/content/repositories/springsource-releases"/>
</chain>
</resolvers>
<modules>
<module organisation="com.virtusa" name="dependee" resolver="projects"/>
<module organisation="org.springframework" name="org.springframework.web.servlet" resolver="lib"/>
</modules>
</ivysettings>
ivy.xml
<ivy-module version="1.0">
<info organisation="com.virtusa" module="depender"/>
<dependencies>
<dependency org="org.springframework" name="spring-core" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-aop" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-hibernate3" rev="2.0.8" />
<dependency org="org.springframework" name="spring-context" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-beans" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-web" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-webmvc" rev="3.0.4.RELEASE" />
<!-- Added -Bauddhik-->
<dependency org="org.springframework.security" name="spring-security-web" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-taglibs" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-core" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-config" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-acl" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-instrument-tomcat" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-jdbc" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-context-support" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-orm" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-jms" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-aspects" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-asm" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-expression" rev="3.0.4.RELEASE"/>
<dependency org="javax.transaction" name="jta" rev="1.1"/>
<dependency org="cglib" name="cglib" rev="2.1_3"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1"/>
<dependency org="antlr" name="antlr" rev="2.7.6rc1"/>
<dependency org="org.springframework" name="spring-tx" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-test" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-instrument" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-webmvc-portlet" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-oxm" rev="3.0.4.RELEASE"/>
<dependency org="asm" name="asm" rev="3.3.1"/>
<dependency org="asm" name="asm-attrs" rev="2.2.3"/>
<dependency org="org.springframework" name="org.springframework.web.servlet" rev="3.0.4.RELEASE" />
<!-- end -->
<dependency org="mysql" name="mysql-connector-java" rev="5.1.6" />
<dependency org="org.hibernate" name="hibernate-core" rev="3.3.1.GA" />
<dependency org="org.hibernate" name="hibernate-annotations" rev="3.4.0.GA" />
<dependency org="org.hibernate" name="hibernate-commons-annotations" rev="3.3.0.ga" />
<dependency org="javax.servlet" name="servlet-api" rev="2.5"/>
<dependency org="taglibs" name="standard" rev="1.0.6"/>
<dependency org="javax.servlet" name="jstl" rev="1.2"/>
<dependency org="commons-lang" name="commons-lang" rev="2.0"/>
<dependency org="commons-collections" name="commons-collections" rev="3.1"/>
<dependency org="org.hibernate" name="ejb3-persistence" rev="3.3.2.Beta1"/>
<dependency org="org.hibernate" name="hibernate-ehcache" rev="4.0.1.Final"/>
</dependencies>
</ivy-module>
I think your issue is that your default resolver is still set to be libraries instead of chained.....
Am I correct in assuming you want to use Maven Central for all dependencies, except those exceptions listed in your modules section? If that is so, then you don't need a chained resolver. The following settings file is much simpler:
<ivysettings>
<settings defaultCache="${ivy.settings.dir}/ivy-cache" defaultResolver="central"/>
<resolvers>
<ibiblio name="central" m2compatible="true"/>
<filesystem name="local-projects">
<artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" />
<ivy pattern="${repository.dir}/[module]-[revision].xml" />
</filesystem>
<ibiblio name="spring-releases" m2compatible="true" root="https://oss.sonatype.org/content/repositories/springsource-releases"/>
</resolvers>
<modules>
<module organisation="com.virtusa" name="dependee" resolver="local-projects"/>
<module organisation="org.springframework" name="org.springframework.web.servlet" resolver="spring-releases"/>
</modules>
</ivysettings>
Note:
I've dropped the "usePoms=false" attribute to the Maven central resolver. You're losing one to the main benefits of using a Maven repo. Pulling down dependencies automatically instead of having to reverse engineer other people's builds :-)
I have a project that depends on JBoss(specifically 5.1.0.GA) and I was playing around with trying to set this project up using SBT. What I was wondering is if there is a way to say "this project depends on JBoss version X and everything that goes with it" or do I have do declare every single dependency individually? My hope is that SBT will then download all the appropriate dependencies needed to compile the project.
I am pretty new to dependency management so any direction is appreciated. I am trying to do this using SBT (which uses Ivy) but an example in maven is also welcome.
You have to declare every dependency manually, there is no super-pom, that includes all dependencies.
This is mostly very tricky, because it is hard to find out, what you need exactly in some cases.
A good start is to take every lib, that is also under jboss_home/lib and start reducing from there.
If you have your own repository proxy (like artifactory or archiva), you could create such a super pom.
This is from my own repository and might help getting you started. But this is in no way official and fitted to my needs.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="http://www.jayasoft.fr/org/ivyrep/ivy-doc.xsl"?>
<ivy-module version="1.0">
<info
organisation="jboss"
module="jboss"
revision="5.1.0"
status="release"
publication="20110801120000"/>
<configurations>
<conf name="compile" visibility="public" />
<conf name="client" visibility="public" extends="compile,mail,activation, aop"/>
<conf name="server" visibility="public" extends="compile,servlet,jmx"/>
<conf name="hibernate" visibility="public" />
<conf name="activation" visibility="public" />
<conf name="mail" visibility="public" />
<conf name="servlet" visibility="public" />
<conf name="jmx" visibility="public" />
<conf name="jmx-client" visibility="public" extends="client,jmx"/>
<conf name="aop" visibility="public" />
<conf name="javaee" visibility="public" />
<conf name="ant" visibility="public" />
<conf name="logging" visibility="public" />
</configurations>
<publications>
<!-- from jbossall-client readme.txt -->
<artifact name="commons-logging" type="jar" conf="client"/>
<artifact name="concurrent" type="jar" conf="client"/>
<artifact name="ejb3-persistence" type="jar" conf="client"/>
<artifact name="jboss-aop-client" type="jar" conf="client"/>
<artifact name="jboss-appclient" type="jar" conf="client"/>
<artifact name="jboss-aspect-jdk50-client" type="jar" conf="client"/>
<artifact name="jboss-client" type="jar" conf="client,ant"/>
<artifact name="jboss-common-core" type="jar" conf="client,ant"/>
<artifact name="jboss-ejb3-common-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-core-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-proxy-impl-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-proxy-spi-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-security-client" type="jar" conf="client"/>
<artifact name="jboss-j2se" type="jar" conf="client"/>
<artifact name="jboss-javaee" type="jar" conf="client,javaee,ant"/>
<artifact name="jboss-logging-log4j" type="jar" conf="client"/>
<artifact name="jboss-logging-spi" type="jar" conf="client,ant"/>
<artifact name="jboss-messaging-client" type="jar" conf="client"/>
<artifact name="jboss-remoting" type="jar" conf="client"/>
<artifact name="jboss-security-spi" type="jar" conf="client,ant"/>
<artifact name="jboss-serialization" type="jar" conf="client,ant"/>
<artifact name="jboss-system-client" type="jar" conf="client"/>
<artifact name="jboss-system-jmx-client" type="jar" conf="client"/>
<artifact name="jbosssx-as-client" type="jar" conf="client,ant"/>
<artifact name="jbosssx-client" type="jar" conf="client,ant"/>
<artifact name="jmx-client" type="jar" conf="client,ant"/>
<artifact name="jnp-client" type="jar" conf="client"/>
<artifact name="jboss-mdr" type="jar" conf="client"/>
<!--END from jbossall-client readme.txt -->
<!-- additional client-libs -->
<artifact name="jbosscache-core" type="jar" conf="client"/>
<artifact name="trove" type="jar" conf="client"/>
<artifact name="javassist" type="jar" conf="client,hibernate"/>
<!-- END additional client-libs -->
<artifact name="activation" type="jar" conf="activation"/>
<artifact name="mail" type="jar" conf="mail"/>
<artifact name="jboss-javaee" type="jar" conf="compile"/>
<artifact name="jboss-j2se" type="jar" conf="compile"/>
<artifact name="jboss-system-jmx" type="jar" conf="compile,jmx"/>
<artifact name="jbosscache-core" type="jar" conf="compile"/>
<artifact name="jboss-remoting" type="jar" conf="compile,ant"/>
<artifact name="jboss-kernel" type="jar" conf="compile"/>
<artifact name="jboss-logging-spi" type="jar" conf="compile, logging"/>
<artifact name="jboss-security-spi" type="jar" conf="compile"/>
<artifact name="jboss-ejb3-ext-api" type="jar" conf="server"/>
<artifact name="jboss-ejb3-core" type="jar" conf="server"/>
<artifact name="jboss-integration" type="jar" conf="compile,ant"/>
<artifact name="ejb3-persistence" type="jar" conf="hibernate"/>
<artifact name="hibernate-core" type="jar" conf="hibernate"/>
<artifact name="hibernate-entitymanager" type="jar" conf="hibernate"/>
<artifact name="hibernate-annotations" type="jar" conf="hibernate"/>
<artifact name="hibernate-commons-annotations" type="jar" conf="hibernate"/>
<artifact name="jboss-system-client" type="jar" conf="server"/>
<artifact name="servlet-api" type="jar" conf="servlet"/>
<artifact name="jbosssx" type="jar" conf="server"/>
<artifact name="jmx-invoker-adaptor-client" type="jar" conf="server,jmx,ant"/>
<artifact name="antlr" type="jar" conf="hibernate"/>
<artifact name="slf4j-api" type="jar" conf="server, logging"/>
<artifact name="slf4j-jboss-logging" type="jar" conf="server, logging"/>
<artifact name="jboss-aop-client" type="jar" conf="aop"/>
<artifact name="jbossjmx-ant" type="jar" conf="ant"/>
</publications>
</ivy-module>
I`m trying to set up ivy to get jars from the springsource repo.
So far I have for my ivy.xml:-
<dependencies>
<dependency org="org.springframework" name="org.springframework.core" rev="3.0.1.RELEASE"/>
<dependency org="org.springframework" name="org.springframework.aop" rev="3.0.1.RELEASE" />
<dependency org="com.adobe.flex" name="com.springsource.flex.messaging.common" rev="3.2.0.3978"/>
<dependency org="com.adobe.flex" name="com.springsource.flex.messaging" rev="3.2.0.3978" />
</dependencies>
and for my ivysettings.xml:-
<ivysettings>
<settings defaultresolver="spring.chain" deafultcache="C:/repo" />
<resolvers>
<chain name="spring.chain">
<url name="com.springsource.repository.bundles.release">
<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<ibiblio name="ibiblio" m2compatible="true"/>
</chain>
</resolvers>
But I keep getting the errors:-
unknown resolver null
no resolver found for org.springframework#org.springframework.core: check your configuration
unknown resolver null
no resolver found for org.springframework#org.springframework.aop: check your configuration
unknown resolver null
no resolver found for com.adobe.flex#com.springsource.flex.messaging.common: check your configura
unknown resolver null
no resolver found for com.adobe.flex#com.springsource.flex.messaging: check your configuration
Am I missign somethign with regards to the resolvers?
Its due to a typo defaultresolver="spring.chain" should be defaultResolver="spring.chain"