Arg.
Ok, never mind.
Those were runtime deps and not compile time deps, so they are not in
the pom file. Sorry about that.
So, how can I declare these runtime deps in the pom that needs them,
then. Like this?
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>com.springsource.javax.xml.bind</artifactId>
<version>2.1.7</version>
<scope>runtime</scope>
</dependency>
Will runtime deps be picked up as transitive deps and process by the
Maven runner? Or should I declare them as provided in that pom even if
I don't need them at compile time?
On Mar 30, 2009, at 5:33 PM, David Leangen wrote:
Here's the dep and build portions of my pom:
The deps commented out are the transitive ones. Normally I shouldn't
have to include them here. But, if I don't, pax-exam won't grab them
for
me.
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
</dependency>
<dependency>
<groupId>net.leangen.expedition.osgi</groupId>
<artifactId>expedition_osgi_api</artifactId>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam</artifactId>
<version>0.4.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit</artifactId>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-default</artifactId>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>expedition_openjpa_api</artifactId>
<version>${pom.version}</version>
<scope>provided</scope>
</dependency>
<!--dependency>
<groupId>javax.jms</groupId>
<artifactId>com.springsource.javax.jms</artifactId>
<version>1.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>com.springsource.javax.xml.bind</artifactId>
<version>2.1.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>com.springsource.javax.activation</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>com.springsource.javax.xml.stream</artifactId>
<version>1.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>com.springsource.org.apache.commons.collections</
artifactId>
<version>3.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>com.springsource.org.apache.commons.lang</artifactId>
<version>2.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>com.springsource.org.apache.commons.pool</artifactId>
<version>1.3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>serp</groupId>
<artifactId>com.springsource.serp</artifactId>
<version>1.13.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.leangen.expedition.wrapper</groupId>
<artifactId>xml-parsers</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency-->
</dependencies>
<build>
<plugins>
<!-- use pax exam maven plugin -->
<plugin>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>maven-paxexam-plugin</artifactId>
<executions>
<execution>
<id>generate-paxexam-config</id>
<goals>
<goal>generate-paxexam-config</goal>
</goals>
</execution>
</executions>
<configuration>
<settings>
<platform>equinox</platform>
<version>latest</version>
<profiles>log,url</profiles>
</settings>
</configuration>
</plugin>
</plugins>
</build>
On Mon, 2009-03-30 at 17:33 +0900, David Leangen wrote:
Hey,
Thanks for checking, but I don't understand. I am using
the @RunWith( MavenConfiguredJUnit4TestRunner.class ), but it is not
picking up the transitive deps. I can run mvn compile and check the
pax-compiler dir to confirm that they are not there.
What do you think I could be misunderstanding?
Cheers,
=David
On Mar 30, 2009, at 5:17 PM, Toni Menzel wrote:
Just tried, and works just nice.
You need to remember that:
-pax exam just picks up a file from classpath that has been
constructed by the plugin before:
target/classes/META-INF/maven/paxexam-config.args
-this is a 100% valid paxrunner args file that you also could stick
in a regular pax runner instance.
By telling paxexam to be "configured by maven" (use
the @RunWith( MavenConfiguredJUnit4TestRunner.class ) )
it will just look for that file in classpath (and sticks that as a
file reference to the embedded paxrunner).
You also can check the picked up dependencies by looking into that
file.
A "mvn compile" is enough to trigger file creation (+update) but not
run the test immediately (in case you want to check).
On Mon, Mar 30, 2009 at 10:05 AM, Toni Menzel <[email protected]>
wrote:
well they should. let me try that as well.
On Mon, Mar 30, 2009 at 9:57 AM, David Leangen
<[email protected]> wrote:
Ok, changed those deps to compile. You were right
about that.
Is there an option to also include transitive deps?
Otherwise, I have to add them by hand to the pom,
which means that the Maven stuff is only a minor
improvement. If all transitive deps also get
resolved, that would be perfect!
Thanks!
=David
On Mar 30, 2009, at 4:38 PM, David Leangen wrote:
Well...
In that case, you'd better update the tutorial. I
just used the config that was shown there. ;-)
In any case, in the meantime I'm using the regular
config (manual). The maven one would be a
reaaaaaaally nice feature to have, though.
Cheers,
=David
On Mar 30, 2009, at 4:34 PM, Toni Menzel wrote:
Well, the container is not a bundle and it
should not be provisioned to the osgi instance.
I guess you are using the maven plugin. make
sure you put it into scope != provided so its
not being picked up by exam.
There is already a jira task to make this
configurable (which scope defindes a osgi
provisioning artifact and which is "just"
something you want/need at compiletime.
As of bleeding edge: you should use this
0.4-SNAPSHOT cause it contains many new features
and should be released once paxrunner gets out.
Although i experienced some "anomalies"
yesterday with the new bnd version in pax url. -
never mind. But will have a look again at this.
On Mon, Mar 30, 2009 at 7:57 AM, Edward Yakop
<[email protected]> wrote:
On Mon, Mar 30, 2009 at 13:55, David
Leangen <[email protected]> wrote:
Any ideas?
Caused by:
org.ops4j.pax.runner.platform.PlatformException:
[file:/home/owner/.m2/repository/org/ops4j/pax/exam/pax-e
xam-container-default/0.4.0-SNAPSHOT/pax-exam-container-
default-0.4.0-SNAPSHOT.jar] is not a valid bundle
at
org
.ops4j
.pax
.runner
.platform
.internal
.PlatformImpl.validateBundleAndGetFilename(PlatformImpl.java:721)
at
org
.ops4j
.pax
.runner
.platform.internal.PlatformImpl.download(PlatformImpl.java:602)
at
org
.ops4j
.pax
.runner
.platform
.internal.PlatformImpl.downloadBundles(PlatformImpl.java:375)
at
org
.ops4j
.pax
.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:
173)
at
org.ops4j.pax.runner.Run.startPlatform(Run.java:578)
... 26 more
Bleeding edge.. I like it :)
Regards,
Edward Yakop
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
--
Toni Menzel
Software Developer
Professional Profile: http://www.osgify.com
[email protected]
http://www.ops4j.org - New Energy for OSS
Communities - Open Participation Software.
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
--
Toni Menzel
Software Developer
Professional Profile: http://www.osgify.com
[email protected]
http://www.ops4j.org - New Energy for OSS Communities -
Open Participation Software.
--
Toni Menzel
Software Developer
Professional Profile: http://www.osgify.com
[email protected]
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general