Discussion:
[tycho-user] Problem with Version format for builded jars.
vincent bonnier
2011-05-17 09:59:27 UTC
Permalink
Hello Tycho users !
I'm still working on an OSGI project using RAP.
I use Tycho in order to build my project. The compilation works fine.
However I can't use the standard packaging goals provided by tycho
since we are using RAP and we would like to build a war from the
warpduct file format defined by libra project.

So we tried to build the war manually by parsing the warproduct file
and by picking the jar files from the tycho build process target
folders.
The problem is that the bundle jar names format in those folders are:
bundlename-<major>.<minor>.<micro>-<qualifier>.jar when osgi standard
expects bundlename_<major>.<minor>.<micro>.<qualifier>.jar

I can't figure out how to force the names of my bundle jars I tried
using the following in my pom but it doesn't seem to change a thing:

<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>0.11.0</version>
<configuration>
<format>'v'yyyyMMdd-HHmm</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>

I tried many times with differents format string beetween <format> and
</format> but nothing change.
What is the classic way to manage the versions in tycho environment ??

Maybe I'm not running the packaging phase ? that's the only lead I
have, but I don't really believe in it.
Further the command i use to build with tycho :

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\ mvn clean integration-test -fae install /
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Hope somebody could help me.
Alex Blewitt
2011-05-17 10:05:18 UTC
Permalink
It isn't an OSGi standard to use _, it's just what Eclipse uses. There should be no reason why you can't use the format that Maven generates.

Alex
Post by vincent bonnier
Hello Tycho users !
I'm still working on an OSGI project using RAP.
I use Tycho in order to build my project. The compilation works fine.
However I can't use the standard packaging goals provided by tycho
since we are using RAP and we would like to build a war from the
warpduct file format defined by libra project.
So we tried to build the war manually by parsing the warproduct file
and by picking the jar files from the tycho build process target
folders.
bundlename-<major>.<minor>.<micro>-<qualifier>.jar when osgi standard
expects bundlename_<major>.<minor>.<micro>.<qualifier>.jar
I can't figure out how to force the names of my bundle jars I tried
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>0.11.0</version>
<configuration>
<format>'v'yyyyMMdd-HHmm</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
I tried many times with differents format string beetween <format> and
</format> but nothing change.
What is the classic way to manage the versions in tycho environment ??
Maybe I'm not running the packaging phase ? that's the only lead I
have, but I don't really believe in it.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\ mvn clean integration-test -fae install /
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hope somebody could help me.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
vincent bonnier
2011-05-17 10:13:20 UTC
Permalink
The problem is not the underscore but the <micro>-<qualifier> part. In
OSGI only the qualifier is supposed to contain letter. When equinox
sees a bundle like bundlename-1.0.0-SNAPSHOT it thinks that the micro
part is 0-SNAPSHOT and that there is no qualifier and so the micro
version is invalid because it contains letters and the bundle is not
found and not loaded.
Post by Alex Blewitt
It isn't an OSGi standard to use _, it's just what Eclipse uses. There should be no reason why you can't use the format that Maven generates.
Alex
Post by vincent bonnier
Hello Tycho users !
I'm still working on an OSGI project using RAP.
I use Tycho in order to build my project. The compilation works fine.
However I can't use the standard packaging goals provided by tycho
since we are using RAP and we would like to build a war from the
warpduct file format defined by libra project.
So we tried to build the war manually by parsing the warproduct file
and by picking the jar files from the tycho build process target
folders.
bundlename-<major>.<minor>.<micro>-<qualifier>.jar when osgi standard
expects bundlename_<major>.<minor>.<micro>.<qualifier>.jar
I can't figure out how to force the names of my bundle jars I tried
<plugin>
     <groupId>org.sonatype.tycho</groupId>
     <artifactId>maven-osgi-packaging-plugin</artifactId>
     <version>0.11.0</version>
     <configuration>
        <format>'v'yyyyMMdd-HHmm</format>
        <archiveSite>true</archiveSite>
     </configuration>
   </plugin>
I tried many times with differents format string beetween <format> and
</format> but nothing change.
What is the classic way to manage the versions in tycho environment ??
Maybe I'm not running the packaging phase ? that's the only lead I
have, but I don't really believe in it.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\ mvn  clean integration-test -fae install       /
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hope somebody could help me.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Alex Blewitt
2011-05-17 10:19:35 UTC
Permalink
Use 1.0.0-SNAPSHOT in the pom.xml and 1.0.0.qualifier in the MANIFEST.MF

e.g.

https://github.com/sonatype/sonatype-tycho/blob/master/tycho-demo/itp03-crossplatform/org.tycho.demo.crossplatform/META-INF/MANIFEST.MF

https://github.com/sonatype/sonatype-tycho/blob/master/tycho-demo/itp03-crossplatform/org.tycho.demo.crossplatform/pom.xml
Post by vincent bonnier
The problem is not the underscore but the <micro>-<qualifier> part. In
OSGI only the qualifier is supposed to contain letter. When equinox
sees a bundle like bundlename-1.0.0-SNAPSHOT it thinks that the micro
part is 0-SNAPSHOT and that there is no qualifier and so the micro
version is invalid because it contains letters and the bundle is not
found and not loaded.
Post by Alex Blewitt
It isn't an OSGi standard to use _, it's just what Eclipse uses. There should be no reason why you can't use the format that Maven generates.
Alex
Post by vincent bonnier
Hello Tycho users !
I'm still working on an OSGI project using RAP.
I use Tycho in order to build my project. The compilation works fine.
However I can't use the standard packaging goals provided by tycho
since we are using RAP and we would like to build a war from the
warpduct file format defined by libra project.
So we tried to build the war manually by parsing the warproduct file
and by picking the jar files from the tycho build process target
folders.
bundlename-<major>.<minor>.<micro>-<qualifier>.jar when osgi standard
expects bundlename_<major>.<minor>.<micro>.<qualifier>.jar
I can't figure out how to force the names of my bundle jars I tried
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>0.11.0</version>
<configuration>
<format>'v'yyyyMMdd-HHmm</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
I tried many times with differents format string beetween <format> and
</format> but nothing change.
What is the classic way to manage the versions in tycho environment ??
Maybe I'm not running the packaging phase ? that's the only lead I
have, but I don't really believe in it.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\ mvn clean integration-test -fae install /
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hope somebody could help me.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
vincent bonnier
2011-05-17 12:07:35 UTC
Permalink
Hi Alex,

I already use 1.0.0-SNAPSHOT in pom.xml and 1.0.0.qualifier in the
MANIFEST.MF but my problem is that the *jar name *generated by tycho looks
like : bundlename-1.0.0-SNAPSHOT.jar


Regards,
Vincent
Post by Alex Blewitt
Use 1.0.0-SNAPSHOT in the pom.xml and 1.0.0.qualifier in the MANIFEST.MF
e.g.
https://github.com/sonatype/sonatype-tycho/blob/master/tycho-demo/itp03-crossplatform/org.tycho.demo.crossplatform/META-INF/MANIFEST.MF
https://github.com/sonatype/sonatype-tycho/blob/master/tycho-demo/itp03-crossplatform/org.tycho.demo.crossplatform/pom.xml
Post by Alex Blewitt
Post by vincent bonnier
The problem is not the underscore but the <micro>-<qualifier> part. In
OSGI only the qualifier is supposed to contain letter. When equinox
sees a bundle like bundlename-1.0.0-SNAPSHOT it thinks that the micro
part is 0-SNAPSHOT and that there is no qualifier and so the micro
version is invalid because it contains letters and the bundle is not
found and not loaded.
Post by Alex Blewitt
It isn't an OSGi standard to use _, it's just what Eclipse uses. There
should be no reason why you can't use the format that Maven generates.
Post by Alex Blewitt
Post by vincent bonnier
Post by Alex Blewitt
Alex
Post by vincent bonnier
Hello Tycho users !
I'm still working on an OSGI project using RAP.
I use Tycho in order to build my project. The compilation works fine.
However I can't use the standard packaging goals provided by tycho
since we are using RAP and we would like to build a war from the
warpduct file format defined by libra project.
So we tried to build the war manually by parsing the warproduct file
and by picking the jar files from the tycho build process target
folders.
bundlename-<major>.<minor>.<micro>-<qualifier>.jar when osgi standard
expects bundlename_<major>.<minor>.<micro>.<qualifier>.jar
I can't figure out how to force the names of my bundle jars I tried
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>0.11.0</version>
<configuration>
<format>'v'yyyyMMdd-HHmm</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
I tried many times with differents format string beetween <format> and
</format> but nothing change.
What is the classic way to manage the versions in tycho environment ??
Maybe I'm not running the packaging phase ? that's the only lead I
have, but I don't really believe in it.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\ mvn clean integration-test -fae install /
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hope somebody could help me.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Alex Blewitt
2011-05-17 12:23:09 UTC
Permalink
Again, this should not be a problem. The bundle symbolic name is read from the entry in the manifest, not the file name.

Alex
Post by vincent bonnier
Hi Alex,
I already use 1.0.0-SNAPSHOT in pom.xml and 1.0.0.qualifier in the MANIFEST.MF but my problem is that the jar name generated by tycho looks like : bundlename-1.0.0-SNAPSHOT.jar
Regards,
Vincent
Post by Alex Blewitt
Use 1.0.0-SNAPSHOT in the pom.xml and 1.0.0.qualifier in the MANIFEST.MF
e.g.
https://github.com/sonatype/sonatype-tycho/blob/master/tycho-demo/itp03-crossplatform/org.tycho.demo.crossplatform/META-INF/MANIFEST.MF
https://github.com/sonatype/sonatype-tycho/blob/master/tycho-demo/itp03-crossplatform/org.tycho.demo.crossplatform/pom.xml
Post by vincent bonnier
The problem is not the underscore but the <micro>-<qualifier> part. In
OSGI only the qualifier is supposed to contain letter. When equinox
sees a bundle like bundlename-1.0.0-SNAPSHOT it thinks that the micro
part is 0-SNAPSHOT and that there is no qualifier and so the micro
version is invalid because it contains letters and the bundle is not
found and not loaded.
Post by Alex Blewitt
It isn't an OSGi standard to use _, it's just what Eclipse uses. There should be no reason why you can't use the format that Maven generates.
Alex
Post by vincent bonnier
Hello Tycho users !
I'm still working on an OSGI project using RAP.
I use Tycho in order to build my project. The compilation works fine.
However I can't use the standard packaging goals provided by tycho
since we are using RAP and we would like to build a war from the
warpduct file format defined by libra project.
So we tried to build the war manually by parsing the warproduct file
and by picking the jar files from the tycho build process target
folders.
bundlename-<major>.<minor>.<micro>-<qualifier>.jar when osgi standard
expects bundlename_<major>.<minor>.<micro>.<qualifier>.jar
I can't figure out how to force the names of my bundle jars I tried
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>0.11.0</version>
<configuration>
<format>'v'yyyyMMdd-HHmm</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
I tried many times with differents format string beetween <format> and
</format> but nothing change.
What is the classic way to manage the versions in tycho environment ??
Maybe I'm not running the packaging phase ? that's the only lead I
have, but I don't really believe in it.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\ mvn clean integration-test -fae install /
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hope somebody could help me.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Igor Fedorenko
2011-05-17 13:48:17 UTC
Permalink
If you are writing a maven plugin, then
MavenProject.getArtifact().getFile() is the correct way to access main
project artifact.

I you want to access file on filesystem directory, beware that artifact
filename under target/ folder is not part of tycho API and can change
with future version of Tycho. Currently, it uses Maven naming
convention, which is <artifactId>-<version>-<classifier>.<extension>.

--
Regards,
Igor
Post by vincent bonnier
Hello Tycho users !
I'm still working on an OSGI project using RAP.
I use Tycho in order to build my project. The compilation works fine.
However I can't use the standard packaging goals provided by tycho
since we are using RAP and we would like to build a war from the
warpduct file format defined by libra project.
So we tried to build the war manually by parsing the warproduct file
and by picking the jar files from the tycho build process target
folders.
bundlename-<major>.<minor>.<micro>-<qualifier>.jar when osgi standard
expects bundlename_<major>.<minor>.<micro>.<qualifier>.jar
I can't figure out how to force the names of my bundle jars I tried
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>0.11.0</version>
<configuration>
<format>'v'yyyyMMdd-HHmm</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
I tried many times with differents format string beetween<format> and
</format> but nothing change.
What is the classic way to manage the versions in tycho environment ??
Maybe I'm not running the packaging phase ? that's the only lead I
have, but I don't really believe in it.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\ mvn clean integration-test -fae install /
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hope somebody could help me.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Loading...