On 22 February 2010 22:23, Joe Bohn <[email protected]> wrote: > Would it be possible to use something like 0.1.1-incubating-SNAPSHOT and > 0.1.2-incubating-SNAPSHOT for the purpose of this sample (which would > translate to 0.1.1 and 0.1.2 as we release)? I doubt that we will do a > future release of 0.1.* release of all of Aries. If we do a subsequent > pre-1.0 release it would probably be named 0.2 (in which case we could use > 0.2.1 and 0.2.2 for this sample again). It seems to me that we need to pick > something that has a relationship to the related Aries release.
Won't the maven-release-plugin ask for the version the artifacts should be released at, effectively change it for all poms, create the artifacts, check in the poms, tag the HEAD, then check in new poms that say something like 0.2-incubating-SNAPSHOT. i.e. using the release plugin, the version of the artifacts have to be the same across the board. > > Joe > > > Jeremy Hughes wrote: >> >> I noticed this sample module doesn't have a version with the >> incubating-SNAPSHOT suffix like other modules. This is because it's >> part of a sample. >> >> Zoe, it looks like you're creating a JPA impl (v1.1.0) of the blog >> persistence bundle so that the JDBC impl (at v1.0.0) can be replaced >> with the JPA impl. >> >> Given this I think we need to find a way to release these bundles >> despite not having the -0.1-incubating suffix. But we are prevented >> from releasing artifacts at that version. If the artifact we were to >> release the sample bundles in a zip or preferably eba (perhaps in a >> zip distro) then we can release the zip with -0.1-incubating in its >> name and have it contain sample bundles at the 1.0.0 and 1.1.0 >> versions. >> >> So the part I'm trying to understand how to do is how to generate >> these bundle jars for inclusion with a release artifact without having >> to release the bundle jars as artifacts in themselves. >> >> Any ideas? >> >> Cheers, >> Jeremy >> >> >> On 22 February 2010 20:33, <[email protected]> wrote: >>> >>> Author: zoe >>> Date: Mon Feb 22 20:33:33 2010 >>> New Revision: 915049 >>> >>> URL: http://svn.apache.org/viewvc?rev=915049&view=rev >>> Log: >>> ARIES-199 Reverting previous changes, did not intend to overwrite the >>> JDBC persistence layer >>> >>> Removed: >>> >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/resources/META-INF/persistence.xml >>> Modified: >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/pom.xml >>> >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/AuthorImpl.java >>> >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/EntryImpl.java >>> >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/resources/OSGI-INF/blueprint/blueprint.xml >>> >>> Modified: >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/pom.xml >>> URL: >>> http://svn.apache.org/viewvc/incubator/aries/trunk/samples/blog-sample/blog-persistence/pom.xml?rev=915049&r1=915048&r2=915049&view=diff >>> >>> ============================================================================== >>> --- incubator/aries/trunk/samples/blog-sample/blog-persistence/pom.xml >>> (original) >>> +++ incubator/aries/trunk/samples/blog-sample/blog-persistence/pom.xml >>> Mon Feb 22 20:33:33 2010 >>> @@ -29,7 +29,7 @@ >>> >>> <groupId>org.apache.aries.samples</groupId> >>> <artifactId>blog-persistence</artifactId> >>> - <version>1.1.0</version> >>> + <version>1.0.0</version> >>> <name>Apache Aries blog sample persistence</name> >>> <packaging>bundle</packaging> >>> >>> @@ -43,7 +43,6 @@ >>> <instructions> >>> >>> <Bundle-SymbolicName>${pom.groupId}.blog-persistence</Bundle-SymbolicName> >>> >>> <Export-Package>!org.apache.aries.samples.*</Export-Package> >>> - >>> <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence> >>> </instructions> >>> </configuration> >>> </plugin> >>> @@ -66,11 +65,6 @@ >>> <artifactId>derby</artifactId> >>> <version>10.5.3.0_1</version> >>> </dependency> >>> - <dependency> >>> - <groupId>org.apache.geronimo.specs</groupId> >>> - <artifactId>geronimo-jpa_2.0_spec</artifactId> >>> - <version>1.0</version> >>> - </dependency> >>> </dependencies> >>> >>> </project> >>> >>> Modified: >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/AuthorImpl.java >>> URL: >>> http://svn.apache.org/viewvc/incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/AuthorImpl.java?rev=915049&r1=915048&r2=915049&view=diff >>> >>> ============================================================================== >>> --- >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/AuthorImpl.java >>> (original) >>> +++ >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/AuthorImpl.java >>> Mon Feb 22 20:33:33 2010 >>> @@ -1,144 +1,125 @@ >>> -/** >>> - * Licensed to the Apache Software Foundation (ASF) under one >>> - * or more contributor license agreements. See the NOTICE file >>> - * distributed with this work for additional information >>> - * regarding copyright ownership. The ASF licenses this file >>> - * to you under the Apache License, Version 2.0 (the >>> - * "License"); you may not use this file except in compliance >>> - * with the License. You may obtain a copy of the License at >>> - * >>> - * http://www.apache.org/licenses/LICENSE-2.0 >>> - * >>> - * Unless required by applicable law or agreed to in writing, >>> - * software distributed under the License is distributed on an >>> - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>> - * KIND, either express or implied. See the License for the >>> - * specific language governing permissions and limitations >>> - * under the License. >>> - */ >>> -package org.apache.aries.samples.blog.persistence.entity; >>> - >>> - >>> -import java.util.Date; >>> -import java.util.List; >>> - >>> -import javax.persistence.CascadeType; >>> -import javax.persistence.Column; >>> -import javax.persistence.Entity; >>> -import javax.persistence.FetchType; >>> -import javax.persistence.Id; >>> -import javax.persistence.OneToMany; >>> -import javax.persistence.OrderBy; >>> -import javax.persistence.Table; >>> - >>> -import org.apache.aries.samples.blog.persistence.api.Author; >>> - >>> -/** >>> - * This class represents a blog post Author >>> - */ >>> - >>> -...@entity(name = "AUTHOR") >>> -...@table(name = "AUTHOR") >>> -public class AuthorImpl implements Author >>> -{ >>> - /** The author's email address */ >>> - �...@id >>> - �...@column(nullable = false, unique = true) >>> - private String email; >>> - >>> - /** The author's full name */ >>> - private String name; >>> - /** The display name for this author */ >>> - private String displayName; >>> - /** A short bio for this author */ >>> - private String bio; >>> - /** The Author's date of birth */ >>> - private Date dob; >>> - >>> - /** The blog entries posted by this user */ >>> - �...@onetomany(cascade = {CascadeType.REMOVE}, fetch = FetchType.EAGER) >>> - �...@orderby("publishDate DESC") >>> - private List<EntryImpl> posts; >>> - >>> - /** Get the author's email address */ >>> - public String getEmail() >>> - { >>> - return email; >>> - } >>> - >>> - /** Get the author's full name */ >>> - public String getName() >>> - { >>> - return name; >>> - } >>> - >>> - /** Get the author's displayed name */ >>> - public String getDisplayName() >>> - { >>> - return displayName; >>> - } >>> - >>> - /** Get the author's biographical information */ >>> - public String getBio() >>> - { >>> - return bio; >>> - } >>> - >>> - /** Get the author's date of birth */ >>> - public Date getDob() >>> - { >>> - return dob; >>> - } >>> - >>> - /** Get the author's blog posts */ >>> - public List<EntryImpl> getEntries() >>> - { >>> - return posts; >>> - } >>> - >>> - // Set methods are not defined in the interface >>> - >>> - /** Set the author's email address */ >>> - public void setEmail(String email) >>> - { >>> - this.email = email; >>> - } >>> - >>> - /** Set the author's full name */ >>> - public void setName(String name) >>> - { >>> - this.name = name; >>> - } >>> - >>> - /** Set the author's displayed name */ >>> - public void setDisplayName(String displayName) >>> - { >>> - this.displayName = displayName; >>> - } >>> - >>> - /** Set the author's biographical information */ >>> - public void setBio(String bio) >>> - { >>> - this.bio = bio; >>> - } >>> - >>> - /** Set the author's date of birth */ >>> - public void setDob(Date dob) >>> - { >>> - this.dob = dob; >>> - } >>> - >>> - /** Update the author's blog posts */ >>> - public void updateEntries(EntryImpl b) >>> - { >>> - this.posts.add(b); >>> - } >>> - >>> - /** set the author's blog posts */ >>> - public void setEntries(List<EntryImpl> lb) >>> - { >>> - this.posts = lb; >>> - } >>> - >>> -} >>> - >>> +/** >>> + * Licensed to the Apache Software Foundation (ASF) under one >>> + * or more contributor license agreements. See the NOTICE file >>> + * distributed with this work for additional information >>> + * regarding copyright ownership. The ASF licenses this file >>> + * to you under the Apache License, Version 2.0 (the >>> + * "License"); you may not use this file except in compliance >>> + * with the License. You may obtain a copy of the License at >>> + * >>> + * http://www.apache.org/licenses/LICENSE-2.0 >>> + * >>> + * Unless required by applicable law or agreed to in writing, >>> + * software distributed under the License is distributed on an >>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>> + * KIND, either express or implied. See the License for the >>> + * specific language governing permissions and limitations >>> + * under the License. >>> + */ >>> + >>> +package org.apache.aries.samples.blog.persistence.entity; >>> + >>> +import java.util.Date; >>> +import java.util.List; >>> + >>> +import org.apache.aries.samples.blog.persistence.api.Author; >>> + >>> + >>> + >>> +/** >>> + * This class represents a blog post Author >>> + */ >>> + >>> +public class AuthorImpl implements Author >>> +{ >>> + /** The author's email address */ >>> + >>> + >>> + private String email; >>> + >>> + /** The author's full name */ >>> + private String name; >>> + /** The display name for this author */ >>> + private String displayName; >>> + /** A short bio for this author */ >>> + private String bio; >>> + /** The Author's date of birth */ >>> + private Date dob; >>> + >>> + /** The blog entries posted by this user */ >>> + >>> + private List<EntryImpl> posts; >>> + >>> + /** Get the author's email address */ >>> + public String getEmail() >>> + { >>> + return email; >>> + } >>> + >>> + /** Set the author's email address */ >>> + public void setEmail(String email) >>> + { >>> + this.email = email; >>> + } >>> + >>> + /** Get the author's full name */ >>> + public String getName() >>> + { >>> + return name; >>> + } >>> + >>> + /** Set the author's full name */ >>> + public void setName(String name) >>> + { >>> + this.name = name; >>> + } >>> + >>> + /** Get the author's displayed name */ >>> + public String getDisplayName() >>> + { >>> + return displayName; >>> + } >>> + >>> + /** Set the author's displayed name */ >>> + public void setDisplayName(String displayName) >>> + { >>> + this.displayName = displayName; >>> + } >>> + >>> + /** Get the author's biographical information */ >>> + public String getBio() >>> + { >>> + return bio; >>> + } >>> + >>> + /** Set the author's biographical information */ >>> + public void setBio(String bio) >>> + { >>> + this.bio = bio; >>> + } >>> + >>> + /** Get the author's date of birth */ >>> + public Date getDob() >>> + { >>> + return dob; >>> + } >>> + >>> + /** Set the author's date of birth */ >>> + public void setDob(Date dob) >>> + { >>> + this.dob = dob; >>> + } >>> + >>> + /** Get the author's blog posts */ >>> + public List<EntryImpl> getEntries() >>> + { >>> + return posts; >>> + } >>> + >>> + /** Set the author's blog posts */ >>> + public void setEntries(List<EntryImpl> posts) >>> + { >>> + this.posts = posts; >>> + } >>> + >>> +} >>> >>> Modified: >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/EntryImpl.java >>> URL: >>> http://svn.apache.org/viewvc/incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/EntryImpl.java?rev=915049&r1=915048&r2=915049&view=diff >>> >>> ============================================================================== >>> --- >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/EntryImpl.java >>> (original) >>> +++ >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/java/org/apache/aries/samples/blog/persistence/entity/EntryImpl.java >>> Mon Feb 22 20:33:33 2010 >>> @@ -1,156 +1,147 @@ >>> -/** >>> - * Licensed to the Apache Software Foundation (ASF) under one >>> - * or more contributor license agreements. See the NOTICE file >>> - * distributed with this work for additional information >>> - * regarding copyright ownership. The ASF licenses this file >>> - * to you under the Apache License, Version 2.0 (the >>> - * "License"); you may not use this file except in compliance >>> - * with the License. You may obtain a copy of the License at >>> - * >>> - * http://www.apache.org/licenses/LICENSE-2.0 >>> - * >>> - * Unless required by applicable law or agreed to in writing, >>> - * software distributed under the License is distributed on an >>> - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>> - * KIND, either express or implied. See the License for the >>> - * specific language governing permissions and limitations >>> - * under the License. >>> - */ >>> -package org.apache.aries.samples.blog.persistence.entity; >>> - >>> -import java.util.Date; >>> -import java.util.List; >>> - >>> -import javax.persistence.Column; >>> -import javax.persistence.Entity; >>> -import javax.persistence.FetchType; >>> -import javax.persistence.GeneratedValue; >>> -import javax.persistence.Id; >>> -import javax.persistence.ManyToOne; >>> -import javax.persistence.Table; >>> - >>> -import org.apache.aries.samples.blog.persistence.api.Entry; >>> - >>> -/** >>> - * This class represents a blog entry >>> - */ >>> -...@entity(name = "BLOGENTRY") >>> -...@table(name = "BLOGENTRY") >>> -public class EntryImpl implements Entry >>> -{ >>> - /** An auto-generated primary key */ >>> - �...@id >>> - �...@generatedvalue >>> - private long id; >>> - >>> - /** The author of the blog post */ >>> - �...@manytoone(fetch = FetchType.EAGER) >>> - private AuthorImpl author; >>> - >>> - /** The date the post was published */ >>> - private Date publishDate; >>> - /** The date the post was last updated */ >>> - private Date updatedDate; >>> - /** The title of the post */ >>> - private String title; >>> - /** Tags associated with the post */ >>> - private List<String> tags; >>> - /** The text of the blog */ >>> - �...@column(length=10000) >>> - private String blogText; >>> - >>> - /** Get the author of this blog post */ >>> - public AuthorImpl getAuthor() >>> - { >>> - return author; >>> - } >>> - >>> - /** Get the publish date of this blog post */ >>> - public Date getPublishDate() >>> - { >>> - return publishDate; >>> - } >>> - >>> - /** Get the title of this blog post */ >>> - public String getTitle() >>> - { >>> - return title; >>> - } >>> - >>> - /** Get the tags for this blog post */ >>> - public List<String> getTags() >>> - { >>> - return tags; >>> - } >>> - >>> - >>> - /** Get the text for this blog post */ >>> - public String getBlogText() >>> - { >>> - return blogText; >>> - } >>> - >>> - >>> - /** get the Blog post id */ >>> - public long getId() >>> - { >>> - return id; >>> - } >>> - >>> - /** >>> - * @return The date of the last update to this blog >>> - * or null if it has never been modified >>> - */ >>> - public Date getUpdatedDate() >>> - { >>> - return updatedDate; >>> - } >>> - >>> - >>> - //set methods are only defined in implementation class. Not part of >>> interface. >>> - >>> - >>> - /** Set the author of this blog post */ >>> - public void setAuthor(AuthorImpl author) >>> - { >>> - this.author = author; >>> - } >>> - >>> - >>> - /** Set the publish date of this blog post */ >>> - public void setPublishDate(Date publishDate) >>> - { >>> - this.publishDate = publishDate; >>> - } >>> - >>> - /** Set the title of this blog post */ >>> - public void setTitle(String title) >>> - { >>> - this.title = title; >>> - } >>> - >>> - /** Set the text for this blog post */ >>> - public void setBlogText(String blogText) >>> - { >>> - this.blogText = blogText; >>> - } >>> - >>> - >>> - /** Set the tags for this blog post */ >>> - public void setTags(List<String> tags) >>> - { >>> - this.tags = tags; >>> - } >>> - >>> - /** >>> - * Set the date that the blog post was last updated >>> - * >>> - * @param updatedDate >>> - */ >>> - public void setUpdatedDate(Date updatedDate) >>> - { >>> - this.updatedDate = updatedDate; >>> - } >>> - >>> -} >>> - >>> +/** >>> + * Licensed to the Apache Software Foundation (ASF) under one >>> + * or more contributor license agreements. See the NOTICE file >>> + * distributed with this work for additional information >>> + * regarding copyright ownership. The ASF licenses this file >>> + * to you under the Apache License, Version 2.0 (the >>> + * "License"); you may not use this file except in compliance >>> + * with the License. You may obtain a copy of the License at >>> + * >>> + * http://www.apache.org/licenses/LICENSE-2.0 >>> + * >>> + * Unless required by applicable law or agreed to in writing, >>> + * software distributed under the License is distributed on an >>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>> + * KIND, either express or implied. See the License for the >>> + * specific language governing permissions and limitations >>> + * under the License. >>> + */ >>> +package org.apache.aries.samples.blog.persistence.entity; >>> + >>> +import java.util.Date; >>> +import java.util.List; >>> + >>> +import org.apache.aries.samples.blog.persistence.api.Entry; >>> + >>> + >>> + >>> +/** >>> + * This class represents a blog entry >>> + */ >>> + >>> +public class EntryImpl implements Entry >>> +{ >>> + /** An auto-generated primary key */ >>> + >>> + private Long id; >>> + >>> + /** The author of the blog post */ >>> + >>> + private AuthorImpl author; >>> + >>> + /** The date the post was published */ >>> + private Date publishDate; >>> + /** The date the post was last updated */ >>> + private Date updatedDate; >>> + /** The title of the post */ >>> + private String title; >>> + /** Tags associated with the post */ >>> + private List<String> tags; >>> + /** The text of the blog */ >>> + >>> + private String blogText; >>> + >>> + /** Get the author of this blog post */ >>> + public AuthorImpl getAuthor() >>> + { >>> + return author; >>> + } >>> + >>> + /** Set the author of this blog post */ >>> + public void setAuthor(AuthorImpl author) >>> + { >>> + this.author = author; >>> + } >>> + >>> + /** Get the publish date of this blog post */ >>> + public Date getPublishDate() >>> + { >>> + return publishDate; >>> + } >>> + >>> + /** Set the publish date of this blog post */ >>> + public void setPublishDate(Date publishDate) >>> + { >>> + this.publishDate = publishDate; >>> + } >>> + >>> + /** Get the title of this blog post */ >>> + public String getTitle() >>> + { >>> + return title; >>> + } >>> + >>> + /** Set the title of this blog post */ >>> + public void setTitle(String title) >>> + { >>> + this.title = title; >>> + } >>> + >>> + >>> + /** Get the tags for this blog post */ >>> + public List<String> getTags() >>> + { >>> + return tags; >>> + } >>> + >>> + /** Set the tags for this blog post */ >>> + public void setTags(List<String> tags) >>> + { >>> + this.tags = tags; >>> + } >>> + >>> + /** Get the text for this blog post */ >>> + public String getBlogText() >>> + { >>> + return blogText; >>> + } >>> + >>> + /** Set the text for this blog post */ >>> + public void setBlogText(String blogText) >>> + { >>> + this.blogText = blogText; >>> + } >>> + >>> + /** get the Blog post id */ >>> + public long getId() >>> + { >>> + return id; >>> + } >>> + >>> + /** Set the id */ >>> + public void setId(Long id) >>> + { >>> + this.id = id; >>> + } >>> + >>> + /** >>> + * @return The date of the last update to this blog >>> + * or null if it has never been modified >>> + */ >>> + public Date getUpdatedDate() >>> + { >>> + return updatedDate; >>> + } >>> + >>> + /** >>> + * Set the date that the blog post was last updated >>> + * >>> + * @param updatedDate >>> + */ >>> + public void setUpdatedDate(Date updatedDate) >>> + { >>> + this.updatedDate = updatedDate; >>> + } >>> + >>> + >>> +} >>> >>> Modified: >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/resources/OSGI-INF/blueprint/blueprint.xml >>> URL: >>> http://svn.apache.org/viewvc/incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=915049&r1=915048&r2=915049&view=diff >>> >>> ============================================================================== >>> --- >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/resources/OSGI-INF/blueprint/blueprint.xml >>> (original) >>> +++ >>> incubator/aries/trunk/samples/blog-sample/blog-persistence/src/main/resources/OSGI-INF/blueprint/blueprint.xml >>> Mon Feb 22 20:33:33 2010 >>> @@ -15,19 +15,20 @@ >>> See the License for the specific language governing permissions and >>> limitations under the License. >>> --> >>> -<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" >>> - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> - >>> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0" >>> - xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0" >>> - xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0" >>> - default-activation="lazy"> >>> >>> - <bean id="persistenceImpl" >>> class="org.apache.aries.samples.blog.persistence.BlogPersistenceServiceImpl"> >>> - <tx:transaction method="*" value="Required"/> >>> - <jpa:context property="entityManager" unitname="blogExample"/> >>> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" >>> + >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> + >>> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0"> >>> + >>> + <bean id="datasource" >>> class="org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource"> >>> + <property name="databaseName" value="blogDB"/> >>> </bean> >>> >>> - <service ref="persistenceImpl" >>> interface="org.apache.aries.samples.blog.persistence.api.BlogPersistenceService"> >>> - </service> >>> + <bean id="persistenceImpl" >>> class="org.apache.aries.samples.blog.persistence.BlogPersistenceServiceImpl" >>> activation="lazy"> >>> + <property name="dataSource" ref="datasource" /> >>> + </bean> >>> >>> -</blueprint> >>> + <service ref="persistenceImpl" >>> interface="org.apache.aries.samples.blog.persistence.api.BlogPersistenceService"/> >>> + >>> + >>> +</blueprint> >>> \ No newline at end of file >>> >>> >>> >> > > > -- > Joe >
