Comments (23)
I can add OSGi support using the sbtosgi plugin a little later ...
from config.
I don't know how to do this or how to test it so help would be very welcome :-)
from config.
I don't know how to do this or how to test it so help would be very welcome :-)
from config.
well, I do not use sbt :-)
I can show how to produce a bundle
by means of converting your project to a maven project and then with help of
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
I will be able to test your bundle with help of
http://team.ops4j.org/wiki/display/paxexam/Pax+Exam
from config.
You should consider using sbt, though. I promise you never want to go back to Maven.
Anyway, sit back and relax. I have it almost working. Give me some more time, please, beuse it's weekend and my birthday.
from config.
re: consider sbt
- only if you make sbt2e as transparent as m2e and it comes standard in eclipse :-)
re: sit back and relax
- no rush; thank you!
from config.
The necessary changes to the sbt build are in place. Havoc, could you please publish a snapshot release?
from config.
thank you. what is snapshot maven repo url?
from config.
It will be https://oss.sonatype.org/content/repositories/snapshots/ as soon as Havoc has published it.
from config.
There's a 0.4.0-SNAPSHOT now. Let me know if it doesn't work so I can fix it before publishing a non-snapshot.
from config.
@hseeberger thanks for the fix btw!
from config.
@carrot-garden please try in anger. Did I provide useful OSGi metadata (exported packages, versions, etc.)?
@havocp Sure, was fun! Finally I can make use of my OSGi plugin ;-)
from config.
bundle loads in osgi ok, thank you.
few notes:
- Include-Resource points to resources not present in jar
Include-Resource: /opt/hp/checkout/hocon/config/src/main/resources,/opt/
hp/checkout/hocon/config/target/resource_managed/main - version should advance, say 0.4.1-SNAPSHOT
since 0.4.0 is already a release
from config.
The Include-Resource header comes from bnd, the tool used to create the bundle. This cannot be avoided, but it does no harm, because all manifest headers which are not OSGi bundle headers, are ignored by the OSGi framework.
You are definitely right about the version. I completely missed that fact that there is already a 0.4.0 release, assuming that the version was bumped to the next minor number after the last release. Anyway, it is just a snapshot and we should go for a release soon, because we will need a bundelized config library for Akka, too.
@havocp, could you please release a 0.4.1 or 0.5.0 version?
from config.
Release 0.4.1-SNAPSHOT, sorry about that
from config.
you probably could remove Include-Resource with "-removeheaders"
http://www.aqute.biz/Bnd/Format
from config.
See my pull request on scalaz for an example of using -removeheaders: mpilquist/scalaz@fff4cea
from config.
Thanks for this pointer. Actually I think that these headers do no harm, so let's just keep them for this release. We could create a pull request later if we really think that they should be removed.
from config.
OK. I published a 0.4.1 as-is and we can always publish newer versions with improvements.
from config.
My project has a transitive dependency on this bundle, and I'm trying to use the maven-dependency-plugin to copy my project's dependencies at build time. However that plugin doesn't know how to handle a dependency of type 'bundle' and it results in the below error. Are there any ideas of how to avoid this?
Error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:copy-dependencies (copy-dependencies) on project my-project: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16
[ERROR] : 1 problem was encountered while building the effective model for com.typesafe:config:1.3.1
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16
My pom plugin:
<plugin> <extensions>true</extensions> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>3.1.1</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <copyPom>true</copyPom> <excludeTransitive>false</excludeTransitive> <addParentPoms>true</addParentPoms> </configuration> </execution> </executions> </plugin>
from config.
You'll need to add the maven-bundle-plugin to your build so it is aware of the bundle package type. Take a look here: https://stackoverflow.com/questions/51069767/maven-unknown-packaging-bundle-error-from-a-dependency-packaging-as-bundle/51070617#51070617
from config.
@mpilquist What would be the syntax in this case? I've tried a few options similar to below but they result in the same error.
<plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <Include-Resource> com.typesafe.config </Include-Resource> </instructions> </configuration> </plugin>
from config.
It's been a while but I think it's just this:
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
...
<dependencies>
<dependency>
<groupId>com.lightbend</groupId>
<artifactId>config</artifactId>
<version>...</version>
</dependency>
</dependencies>
from config.
Related Issues (20)
- Is this project active? HOT 4
- Find a StackOverflowError in config
- Find a StackOverflowError in config
- Find a StackOverflowError in config HOT 1
- underscore characters HOT 2
- Problems with com.typesafe/config and maven-dependency-plugin
- introduce method accepting a list of Objects to add a value
- Should this project be explicitly considered as deprecated/not supported? HOT 29
- Community fork? HOT 7
- Resolving Variable Substitutions Between Multiple Config HOT 1
- Something error when use com.typesafe.config API convert conf file to scala bean class
- withFallBack is not adding value if not present
- how to load the config with substitution details HOT 3
- Add info about which signing keys will be used for published artifacts.
- Cannot provide environment variables programmatically
- Rendering partially resolved appended array results in invalid configuration HOT 1
- Inconsistent behavior with Overflow/Underflow and Exceptions
- Regression in environment variable reading behavior HOT 2
- Add a module info HOT 6
- Question about `ConfigFactory.systemProperties()` on windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from config.