bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
528 stars 306 forks source link

Windows error ceating folder... #1869

Closed toddmushenoatflairsoft closed 7 years ago

toddmushenoatflairsoft commented 7 years ago

I am using the aether plugin as shown in all turorials, and am getting...

Unexpected org.apache.felix:maven-bundle-plugin;version='=3.2.0', error org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.apache:felix:maven-bundle-plugin:jar:3.2.0 from/to remote (http://repo1.maven.org/maven2): C:\projects\mystuff\cnf\cache\maven\aether-local\org\apache\felix:maven-bundle-plugin\3.2.0\felix:maven-bundle-plugin-3.2.0.jar.part.lock (The filename, directory name, or volume label syntax is incorrect),

How do I fix this as I am on windows and directories cannot have the ":" character in there name in this os.

I have also been told there is great documentation, however when I go to the main website all I get is "Resolving Dependencies Discuss the model of resolving", to me this seems a bit terse to say the least.

https://web.archive.org/web/20170102064129/http://bnd.bndtools.org/chapters/250-resolving.html

Please advise.

Todd

bjhargrave commented 7 years ago

I am using the aether plugin as shown in all turorials, and am getting...

Can you provide pointers to the tutorials you are referring too?

The aether repository plugin is deprecated as of Bnd 3.2. See https://github.com/bndtools/bnd/wiki/Changes-in-3.2.0#maven-repository-support. So I would not expect any fixes to be made to the aether repository plugin.

toddmushenoatflairsoft commented 7 years ago

I looked I have no references to Aether... so, I am not sure where this is coming from.

toddmushenoatflairsoft commented 7 years ago

My bnd file...

Bundle-Version: 1.0.0.${tstamp}
Export-Package: \
    OpenSEAAPI,\
    OpenSEAAPI.uility
Import-Package: org.osgi.annotation.versioning; provide:=true, *
-runee: JavaSE-1.8
-runfw: org.apache.felix.framework;version='[5.4.0,5.4.0]'
-runfw: org.eclipse.osgi
toddmushenoatflairsoft commented 7 years ago

http://enroute.osgi.org/qs/050-start.html

bjhargrave commented 7 years ago

Look in your cnf folder. There must be an aether-local repository configured.

toddmushenoatflairsoft commented 7 years ago

Where would that be in the cnf, because mine is basically empty.

toddmushenoatflairsoft commented 7 years ago

Also a full search of my cnf for "aether-local" gives no results.

bjhargrave commented 7 years ago

Either cnf/build.bnd or cnf/ext/*.bnd.

toddmushenoatflairsoft commented 7 years ago

Ahhh there it is... when I remove it, I get errors finding... org.ops4j.pax.exam:pax-exam-container-native,\ org.ops4j.pax.exam:pax-exam-junit4,\ org.ops4j.pax.exam:pax-exam-link-mvn,\ org.ops4j.pax.url:pax-url-aether,\ org.ops4j.pax.url:pax-url-wrap,\ org.apache.felix:org.apache.felix.framework,\ org.slf4j:slf4j-jdk14

toddmushenoatflairsoft commented 7 years ago

BTW: I had aether-latest not aether-local

bjhargrave commented 7 years ago

You probably cannot just remove it. I think you will need to replace it so your workspace can still locate resources.

See http://bnd.bndtools.org/plugins/maven.html and http://bnd.bndtools.org/plugins/pomrepo.html for replacement choices.

toddmushenoatflairsoft commented 7 years ago

Well I do not have a maven build.

Do I need one to do integration testing???

Todd

bjhargrave commented 7 years ago

You are using maven repositories for dependencies. This does not mean you have a maven driven build.

toddmushenoatflairsoft commented 7 years ago
Description Resource    Path    Location    Type
Cannot find /error/org.apache.felix:org.apache.felix.framework;version=0 Not found in [bnd-cache, Release, Local, Bndtools Hub, C:\todd\R4ComplibProtoWorkspace\cnf\buildrepo r/w=true, MavenBndRepository [localRepo=C:\Users\Todd\.m2\repository, storage=Central, inited=true]]  bnd.bnd /ComplibServiceTest line 1  Bndtools Path Problem Marker
toddmushenoatflairsoft commented 7 years ago

After a bit of looking, my next issue is finding... org.osgi.annotation.versioning.ProviderType

Description Resource    Path    Location    Type
The import org.osgi cannot be resolved  IComponent.java /OpenSEAAPI/src/OpenSEAAPI  line 3  Java Problem
toddmushenoatflairsoft commented 7 years ago

my bnd.bnd for that project...

Bundle-Version: 1.0.0.${tstamp}
Export-Package: \
    OpenSEAAPI,\
    OpenSEAAPI.uility
Import-Package: org.osgi.annotation.versioning; provide:=true, *
-runee: JavaSE-1.8
-runfw: org.apache.felix.framework;version='[5.4.0,5.4.0]'
-runfw: org.eclipse.osgi
bjhargrave commented 7 years ago

Your bnd file is weird. Why do you have an Import-Package for org.osgi.annotation.versioning? Normally bnd generates the Import-Package statement from inspecting your class files. Also, you have no -buildpath which means your compile path is empty which is why you probably cannot find any types.

I think perhaps you have not fully grasped the concepts of a Bnd build and should consider going back to the enRoute tutorials and try them again.

Your workspace does not seem to be derived from the enRoute workspace examples. enRoute never used the aether repository plugin.

bjhargrave commented 7 years ago

You can also look at this repo for an example of a Bnd build.

toddmushenoatflairsoft commented 7 years ago

Yes, I am working off of existing code, but have been over the tutorials several times, is there something specific I should be focusing on in the tutorials?

toddmushenoatflairsoft commented 7 years ago

Also, previously these jars were coming in via pluginpath in conf/ext/pluginpaths.bnd... Since this is apparently no longer a valid thing to do, what is the new approach???

Todd

bjhargrave commented 7 years ago

Well in a bnd workspace build, the project's bnd.bnd file uses -buildpath to set the compile path. And generally, you never need to set Import-Package as bnd will generate it for you. The enRoute tutorials follow this.

-pluginpath does not need to be used for the standard bnd repository plugins since they are included in the bnd gradle and maven plugins and Bndtools. -pluginpath is to specify additional locations for bnd to locate reference plugin types in a -plugin instruction. -pluginpath itself does not point to artifacts that project's compile against. That is -buildpath.

toddmushenoatflairsoft commented 7 years ago

Having gone through http://bnd.bndtools.org/plugins/maven.html and http://bnd.bndtools.org/plugins/pomrepo.html... I cannot seem to resolve aQute.bnd.repository.* Where are these located???

bjhargrave commented 7 years ago

How are you running bnd? Are you using Bndtools in Eclipse? Bnd gradle plugin? What version?

I ask because the latest versions all include the standard repository plugins.

toddmushenoatflairsoft commented 7 years ago
Eclipse Java EE IDE for Web Developers.
Version: Neon.2 Release (4.6.2)
Build id: 20161208-0600

bndtools: 3.3.0REL20160922-205148-g069791c

bjhargrave commented 7 years ago

Well bndtools 3.3 includes the standard bnd repository plugins. See https://github.com/bndtools/bnd/blob/master/cnf/ext/repositories.bnd#L7-L12 for how we use the aQute.bnd.repository.maven.provider.MavenBndRepository in the bnd build.

toddmushenoatflairsoft commented 7 years ago

Ok, cleaned up some stuff, and am still getting that org.osgi.annotation.versioning.Version cannot be resolved to a type Also, I am now seeing a Baseline repo, but it does not seem to have it listed.

Todd

toddmushenoatflairsoft commented 7 years ago

Am I up to date, is there a 3.4 out or something???

bjhargrave commented 7 years ago

Am I up to date, is there a 3.4 out or something???

3.3 is the latest released version. 3.4 is currently in development.

toddmushenoatflairsoft commented 7 years ago

Cool, So I am on the correct version. :-)

toddmushenoatflairsoft commented 7 years ago

Where should I be pulling org.osgi.annotation.versioning.Version from???

bjhargrave commented 7 years ago

You should put osgi.annotation;version=6.0.1 on your project's -buildpath.

toddmushenoatflairsoft commented 7 years ago

osgi.annotation;version=6.0.1 Not found in [bnd-cache, C:\todd\R4ComplibProtoWorkspace\cnf\repo r/w=true, MavenBndRepository [localRepo=C:\Users\Todd.m2\repository, storage=Local, inited=true], MavenBndRepository [localRepo=C:\Users\Todd.m2\repository, storage=Release, inited=true], JpmRepository [writable=false, name=JPM, location=~/.bnd/shacache, digest=DA39A3EE5E6B4B0D3255BFEF95601890AFD80709], Baseline]

bjhargrave commented 7 years ago

Did you add org.osgi:osgi.annotations:6.0.1 to any of your repos?

See https://github.com/osgi/workspace/blob/master/cnf/ext/enroute.bnd#L22-L28 for an example of configuring Maven Central using a BndPomRepository. Then see https://github.com/osgi/workspace/blob/master/cnf/central.xml which is referenced by that configuration. All dependencies you will need from Maven Central must be added here. For example

<dependencies>
    <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi.annotation</artifactId>
        <version>6.0.1</version>
    </dependency>
</dependencies>

As you need more dependencies from Maven Central, add them there.

bjhargrave commented 7 years ago

I am closing this issue since there is no evidence of any bug in Bnd and this discussion is about how to use Bnd/Bndtools. This discussion should be in the bndtools-users mail list. Please join that list and continue the conversation there. Thanks.

toddmushenoatflairsoft commented 7 years ago

The example you gave showed me how to do this in maven (this was not supposed to be a requirement, has that changed?). I had already explained we do not have a maven build, and have followed everything you have said to correct this issue with your tool.

I also went through your tutorial line by line (not a small ask), and asked of assistance with specifics as to what I should be focusing (and got no response), and I must say that is extremely non informative. Also, you have sent me on another wild goose chase for some other mailing list without a link, this is I must say frustrating.

As for your suggestion that I should add my dependency to my repo, defeats the whole concept of this as a dependency management tool, are you saying I am responsible for adding every singe dependency I must use (even the ones your tool requires???), if you do not respond, I will assume you are suggesting this is not the intent of your tool, although that against the claims made by the tool, and the reason why we started using it in the first place.

Please reopen, and remove yourself as an assignee (if you are not willing to resolve the issue), otherwise I will assume it is common practice for your group to close bugs that have not been resolved, and this is what you mean by "good support".

bjhargrave commented 7 years ago

As I have mentioned on several occasions, the Feedback section in the README for this repo has links to the bndtools-users mail list. Also, there are a number of internet search engines which can help find things on the internet.

You do not show a defect in Bnd which can be fixed. Your questions in this issue are about using Bnd which is what the bndtools-users mail list is for. There are many people there who can help answer your questions. Far more people than the developers who might see this issue. Issues are for defects/new features/etc which result in code changes.

I will not further respond to this issue. See you in the bndtools-users mail list.